/[winpt]/trunk/MyGPGME/debug.c
ViewVC logotype

Diff of /trunk/MyGPGME/debug.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 7 by twoaday, Mon Apr 4 07:01:43 2005 UTC
# Line 54  debug_cleanup (void) Line 54  debug_cleanup (void)
54   * remove leading and trailing white spaces   * remove leading and trailing white spaces
55   */   */
56  static char *  static char *
57  trim_spaces( char *str )  trim_spaces (char *str)
58  {  {
59      char *string, *p, *mark;      char *string, *p, *mark;
60    
# Line 63  trim_spaces( char *str ) Line 63  trim_spaces( char *str )
63      for( p=string; *p && isspace( *(byte*)p ) ; p++ )      for( p=string; *p && isspace( *(byte*)p ) ; p++ )
64          ;          ;
65      /* move characters */      /* move characters */
66      for( (mark = NULL); (*string = *p); string++, p++ )      for( (mark = NULL); (*string = *p) != 0; string++, p++ )
67          if( isspace( *(byte*)p ) ) {          if( isspace( *(byte*)p ) ) {
68              if( !mark )              if( !mark )
69                  mark = string ;                  mark = string ;
# Line 113  debug_init (void) Line 113  debug_init (void)
113                  FILE *fp;                  FILE *fp;
114    
115                  s1++;                  s1++;
116                  if ( !(s2 = strchr (s1, ':')) )                  if ( (s2 = strchr (s1, ':')) == NULL )
117                      s2 = s1 + strlen(s1);                      s2 = s1 + strlen(s1);
118                  p = malloc (s2-s1+1);                  p = malloc (s2-s1+1);
119                  if (p) {                  if (p) {

Legend:
Removed from v.6  
changed lines
  Added in v.7

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26