*/
void cmd_regi(char *argbuf) {
int a,b,c;
- char buf[SIZ];
+ char *ibuf;
struct vCard *my_vcard;
char tmpaddr[SIZ];
cprintf("%d Send registration...\n", SEND_LISTING);
a=0;
- while (client_gets(buf), strcmp(buf,"000")) {
- if (a==0) vcard_set_prop(my_vcard, "n", buf);
- if (a==1) strcpy(tmpaddr,buf);
- if (a==2) strcpy(tmpcity,buf);
- if (a==3) strcpy(tmpstate,buf);
+ while (client_gets(&ibuf), strcmp(ibuf,"000")) {
+ if (a==0) vcard_set_prop(my_vcard, "n", ibuf);
+ if (a==1) strcpy(tmpaddr,ibuf);
+ if (a==2) strcpy(tmpcity,ibuf);
+ if (a==3) strcpy(tmpstate,ibuf);
if (a==4) {
- for (c=0; c<strlen(buf); ++c) {
- if ((buf[c]>='0')&&(buf[c]<='9')) {
+ for (c=0; c<strlen(ibuf); ++c) {
+ if ((ibuf[c]>='0')&&(ibuf[c]<='9')) {
b=strlen(tmpzip);
- tmpzip[b]=buf[c];
+ tmpzip[b]=ibuf[c];
tmpzip[b+1]=0;
}
}
}
- if (a==5) vcard_set_prop(my_vcard, "tel;home", buf);
- if (a==6) vcard_set_prop(my_vcard, "email;internet", buf);
- if (a==7) strcpy(tmpcountry, buf);
+ if (a==5) vcard_set_prop(my_vcard, "tel;home", ibuf);
+ if (a==6) vcard_set_prop(my_vcard, "email;internet", ibuf);
+ if (a==7) strcpy(tmpcountry, ibuf);
++a;
}
sprintf(tmpaddress, ";;%s;%s;%s;%s;%s",