]> code.citadel.org Git - citadel.git/commitdiff
* Saw what IO did with strchr() and did the same in a few more places
authorArt Cancro <ajc@citadel.org>
Tue, 19 Mar 2002 04:19:33 +0000 (04:19 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 19 Mar 2002 04:19:33 +0000 (04:19 +0000)
citadel/ChangeLog
citadel/mime_parser.c

index cbb90c38cb1e082856c4c444eb7e37b5fa5409b2..3d5c1ed5c4f54041d862e0fb81c1f019ead16ae9 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.157  2002/03/19 04:19:33  ajc
+ * Saw what IO did with strchr() and did the same in a few more places
+
  Revision 590.156  2002/03/17 00:08:02  error
  * mime_parser.c: more robust parsing of Content-Type header
 
@@ -3516,4 +3519,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index f64005c170005cb807ed08b9cba8eefa1741877a..6d99bf47774360d41ff03613ba4aec006b9bef3a 100644 (file)
@@ -371,16 +371,12 @@ void the_mime_parser(char *partnum,
                        strcat(header, buf);
        } while ((strlen(buf) > 0) && (*ptr != 0));
 
-       for (i = 0; i < strlen(disposition); ++i)
-               if (disposition[i] == ';')
-                       disposition[i] = 0;
-       while (isspace(disposition[0]))
-               strcpy(disposition, &disposition[1]);
-       for (i = 0; i < strlen(content_type); ++i)
-               if (content_type[i] == ';')
-                       content_type[i] = 0;
-       while (isspace(content_type[0]))
-               strcpy(content_type, &content_type[1]);
+       if (strchr(disposition, ';'))
+               *(strchr(disposition, ';')) = '\0';
+       striplt(disposition);
+       if (strchr(content_type, ';'))
+               *(strchr(content_type, ';')) = '\0';
+       striplt(content_type);
 
        if (strlen(boundary) > 0) {
                is_multipart = 1;