Changeset ae3c4fa for help.c


Ignore:
Timestamp:
2007-07-01T14:52:45Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
19a8088
Parents:
f7b44f2 (diff), 348c11b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from Jelmer (mainly unit testing things).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • help.c

    rf7b44f2 rae3c4fa  
    3131#define BUFSIZE 1100
    3232
    33 help_t *help_init( help_t **help )
     33help_t *help_init( help_t **help, const char *helpfile )
    3434{
    3535        int i, buflen = 0;
     
    4141        *help = h = g_new0 ( help_t, 1 );
    4242       
    43         h->fd = open( global.helpfile, O_RDONLY
     43        h->fd = open( helpfile, O_RDONLY
    4444#ifdef _WIN32
    4545                                  | O_BINARY
     
    109109        help_t *h;
    110110
    111         h=*help;       
    112 
    113         while( h )
     111        for( h = *help; h; h = h->next )
    114112        {
    115                 if( g_strcasecmp( h->string, string ) == 0 ) break;
    116                 h = h->next;
     113                if( h->string != NULL &&
     114                        g_strcasecmp( h->string, string ) == 0 )
     115                        break;
    117116        }
    118117        if( h && h->length > 0 )
Note: See TracChangeset for help on using the changeset viewer.