From: Art Cancro Date: Wed, 23 Nov 2022 20:57:03 +0000 (-0500) Subject: Replace striplt() with string_trim() in all the places VS Code simply decided not to. X-Git-Tag: v960~9 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a34ab2fe2c99fda491eb8ae91371774a32c2612e Replace striplt() with string_trim() in all the places VS Code simply decided not to. --- diff --git a/textclient/citadel_ipc.c b/textclient/citadel_ipc.c index a2f583c6e..f4a5695b8 100644 --- a/textclient/citadel_ipc.c +++ b/textclient/citadel_ipc.c @@ -671,7 +671,7 @@ int CtdlIPCGetSingleMessage(CtdlIPC * ipc, long msgnum, int headers, int as_mime if (!strncasecmp(bbb, "Content-type:", 13)) { extract_token(mret[0]->content_type, bbb, 0, '\n', sizeof mret[0]->content_type); strcpy(mret[0]->content_type, &mret[0]->content_type[13]); - striplt(mret[0]->content_type); + string_trim(mret[0]->content_type); /* strip out ";charset=" portion. FIXME do something with * the charset (like... convert it) instead of just throwing @@ -685,12 +685,12 @@ int CtdlIPCGetSingleMessage(CtdlIPC * ipc, long msgnum, int headers, int as_mime if (!strncasecmp(bbb, "X-Citadel-MSG4-Partnum:", 23)) { extract_token(mret[0]->mime_chosen, bbb, 0, '\n', sizeof mret[0]->mime_chosen); strcpy(mret[0]->mime_chosen, &mret[0]->mime_chosen[23]); - striplt(mret[0]->mime_chosen); + string_trim(mret[0]->mime_chosen); } if (!strncasecmp(bbb, "Content-transfer-encoding:", 26)) { extract_token(encoding, bbb, 0, '\n', sizeof encoding); strcpy(encoding, &encoding[26]); - striplt(encoding); + string_trim(encoding); } remove_token(bbb, 0, '\n'); } while ((bbb[0] != 0) && (bbb[0] != '\n')); diff --git a/webcit/availability.c b/webcit/availability.c index 17edb3393..dcb6f1436 100644 --- a/webcit/availability.c +++ b/webcit/availability.c @@ -248,7 +248,7 @@ void check_attendee_availability(icalcomponent *vevent) { /** screen name or email address */ safestrncpy(attendee_string, ch + 7, sizeof(attendee_string)); - striplt(attendee_string); + string_trim(attendee_string); check_individual_attendee(attendee_string, dtstart_t, dtend_t, diff --git a/webcit/calendar.c b/webcit/calendar.c index 1185bfc22..f0f34ef84 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -175,7 +175,7 @@ void cal_process_object(StrBuf *Target, // screen name or email address safestrncpy(buf, ch + 7, sizeof(buf)); - striplt(buf); + string_trim(buf); StrEscAppend(Target, NULL, buf, 0, 0); StrBufAppendPrintf(Target, " "); @@ -683,11 +683,11 @@ void load_ical_object(long msgnum, int unread, if (!IsEmptyStr(bptr)) { if (!strncasecmp(bptr, "Content-type: ", 14)) { safestrncpy(msg4_content_type, &bptr[14], sizeof msg4_content_type); - striplt(msg4_content_type); + string_trim(msg4_content_type); } else if (!strncasecmp(bptr, "Content-transfer-encoding: ", 27)) { safestrncpy(msg4_content_encoding, &bptr[27], sizeof msg4_content_encoding); - striplt(msg4_content_type); + string_trim(msg4_content_type); } else if ((!strncasecmp(bptr, "Content-length: ", 16))) { msg4_content_length = atoi(&bptr[16]); diff --git a/webcit/dav_get.c b/webcit/dav_get.c index 73f0c5514..9c57f52ad 100644 --- a/webcit/dav_get.c +++ b/webcit/dav_get.c @@ -201,15 +201,15 @@ void dav_get(void) if (!in_body) { if (!strncasecmp(buf, "Date:", 5)) { safestrncpy(date, &buf[5], sizeof date); - striplt(date); + string_trim(date); } if (!strncasecmp(buf, "Content-type:", 13)) { safestrncpy(content_type, &buf[13], sizeof content_type); - striplt(content_type); + string_trim(content_type); ptr = bmstrcasestr(&buf[13], "charset="); if (ptr) { safestrncpy(charset, ptr+8, sizeof charset); - striplt(charset); + string_trim(charset); endptr = strchr(charset, ';'); if (endptr != NULL) strcpy(endptr, ""); } diff --git a/webcit/event.c b/webcit/event.c index d786998ab..e2894d1dc 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -359,7 +359,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, strcpy(organizer_string, icalproperty_get_organizer(organizer)); if (!strncasecmp(organizer_string, "mailto:", 7)) { strcpy(organizer_string, &organizer_string[7]); - striplt(organizer_string); + string_trim(organizer_string); serv_printf("ISME %s", organizer_string); serv_getln(buf, sizeof buf); if (buf[0] == '2') { @@ -470,7 +470,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, /* screen name or email address */ safestrncpy(attendee_string, ch + 7, sizeof(attendee_string)); - striplt(attendee_string); + string_trim(attendee_string); if (i++) wc_printf("\n"); escputs(attendee_string); wc_printf(" "); @@ -1098,7 +1098,7 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum, char *fr /* Now iterate! */ for (i=0; i