dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/csdoc doc_load.c,1.9,1.10


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/csdoc doc_load.c,1.9,1.10
Date: Mon, 31 Mar 2003 21:43:45 -0500

Update of /cvsroot/dotgnu-pnet/pnet/csdoc
In directory subversions:/tmp/cvs-serv684/csdoc

Modified Files:
        doc_load.c 
Log Message:


Strip white space from the start and end of member names, as
"All.xml" contains some names that end in white space.


Index: doc_load.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csdoc/doc_load.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** doc_load.c  18 Jun 2002 04:25:38 -0000      1.9
--- doc_load.c  1 Apr 2003 02:43:40 -0000       1.10
***************
*** 76,79 ****
--- 76,102 ----
  
  /*
+  * Duplicate a string after stripping white space from the
+  * start and end of it.
+  */
+ static char *DupStrippedString(const char *str)
+ {
+       int len;
+       if(!str)
+       {
+               return 0;
+       }
+       while(*str != '\0' && *str == ' ')
+       {
+               ++str;
+       }
+       len = strlen(str);
+       while(len > 0 && str[len - 1] == ' ')
+       {
+               --len;
+       }
+       return ILDupNString(str, len);
+ }
+ 
+ /*
   * Parse a documentation element.  The XML stream is positioned
   * on the "Docs" element itself.
***************
*** 409,413 ****
        if(name)
        {
!               if((member->name = ILDupString(name)) == 0)
                {
                        return 0;
--- 432,436 ----
        if(name)
        {
!               if((member->name = DupStrippedString(name)) == 0)
                {
                        return 0;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]