- Timestamp:
- Mar 10, 2014, 10:22:15 AM (11 years ago)
- Branches:
- master
- Children:
- e80f9fc
- Parents:
- c102bbf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
icb.c
rc102bbf rb6c9dd3 37 37 void icb_login(struct icb_session *, char *, char *, char *); 38 38 int icb_dowho(struct icb_session *, struct icb_group *); 39 char *icb_nextfield(char ** );39 char *icb_nextfield(char **, int); 40 40 41 41 /* … … 92 92 char *nick, *group, *client, *cmd; 93 93 94 client = icb_nextfield(&msg );95 nick = icb_nextfield(&msg );96 group = icb_nextfield(&msg );97 cmd = icb_nextfield(&msg );94 client = icb_nextfield(&msg, 1); 95 nick = icb_nextfield(&msg, 1); 96 group = icb_nextfield(&msg, 1); 97 cmd = icb_nextfield(&msg, 1); 98 98 if (strlen(cmd) > 0 && cmd[0] == 'w') { 99 99 icb_error(is, "Command not implemented"); … … 112 112 char *grpmsg; 113 113 114 grpmsg = icb_nextfield(&msg );114 grpmsg = icb_nextfield(&msg, 0); 115 115 icb_groupmsg(is, grpmsg); 116 116 break; … … 119 119 char *cmd, *arg; 120 120 121 cmd = icb_nextfield(&msg );122 arg = icb_nextfield(&msg );121 cmd = icb_nextfield(&msg, 1); 122 arg = icb_nextfield(&msg, 0); 123 123 icb_command(is, cmd, arg); 124 124 break; … … 588 588 */ 589 589 char * 590 icb_nextfield(char **buf )590 icb_nextfield(char **buf, int notrspace) 591 591 { 592 592 char *start = *buf; … … 601 601 } else 602 602 end = *buf; 603 while ( end && *(--end) == ' ' && end > start)603 while (notrspace && end && *(--end) == ' ' && end > start) 604 604 *end = '\0'; 605 605 return (start);
Note:
See TracChangeset
for help on using the changeset viewer.