[BACK]Return to extract_func.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc

Diff for /OpenXM/src/asir-doc/extract_func.c between version 1.5 and 1.6

version 1.5, 2009/02/22 17:59:25 version 1.6, 2009/02/22 20:27:25
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/asir-doc/extract_func.c,v 1.4 2006/02/12 08:55:26 noro Exp $ */  /* $OpenXM: OpenXM/src/asir-doc/extract_func.c,v 1.5 2009/02/22 17:59:25 ohara Exp $ */
   
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
Line 7 
Line 7 
 #include <ctype.h>  #include <ctype.h>
 #include <sys/stat.h>  #include <sys/stat.h>
   
   #if defined(__MINGW32__)
   #include <io.h>
   #define mkdir(d,m)   ((mkdir)((d)))
   #endif
   
 void create_dir(char *);  void create_dir(char *);
 int fname(char *,char **);  int fname(char *,char **);
   
Line 113  char **name;
Line 118  char **name;
   
         if ( *buf != '`' ) {          if ( *buf != '`' ) {
                 /* skip X.X.X if exists */                  /* skip X.X.X if exists */
                 space = index(buf,' ');                  space = strchr(buf,' ');
                 if ( !space ) return 0;                  if ( !space ) return 0;
                 for ( p = buf; p < space; p++ )                  for ( p = buf; p < space; p++ )
                         if ( !isdigit(*p) && *p != '.' ) return 0;                          if ( !isdigit(*p) && *p != '.' ) return 0;
Line 122  char **name;
Line 127  char **name;
         i = 0;          i = 0;
         while ( 1 ) {          while ( 1 ) {
                 /* search a back quote */                  /* search a back quote */
                 bquote = index(buf,'`' );                  bquote = strchr(buf,'`' );
                 if ( !bquote )                  if ( !bquote )
                         return 0;                          return 0;
                 buf = bquote+1;                  buf = bquote+1;
   
                 /* buf points to a function; search a quote */                  /* buf points to a function; search a quote */
                 quote = index(buf,'\'');                  quote = strchr(buf,'\'');
                 if ( !quote )                  if ( !quote )
                         return 0;                          return 0;
                 len = quote-buf;                  len = quote-buf;
Line 138  char **name;
Line 143  char **name;
                 i++;                  i++;
                 buf = quote+1;                  buf = quote+1;
                 /* buf points to ',' or a space char; search a comma */                  /* buf points to ',' or a space char; search a comma */
                 comma = index(buf,',');                  comma = strchr(buf,',');
                 if ( !comma ) {                  if ( !comma ) {
                         /* if the rest chars include a non-space char, then return 0 */                          /* if the rest chars include a non-space char, then return 0 */
                         while ( *buf && isspace(*buf) ) buf++;                          while ( *buf && isspace(*buf) ) buf++;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>