/[projet1]/public/pc/emulators/caloric/src/host.c
Defence Force logotype

Diff of /public/pc/emulators/caloric/src/host.c

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

revision 39 by dbug, Mon Mar 9 18:26:07 2009 UTC revision 40 by Jede, Tue Mar 10 22:20:19 2009 UTC
# Line 539  void remove_eol(char *str) Line 539  void remove_eol(char *str)
539  void setup(char *env[])  void setup(char *env[])
540  {  {
541    int i;    int i;
542    const char **p;    const char **p;
543    int count = 0;    int count = 0;
544      FILE *fp;
545    for (i = 0; i < 35; i++)    for (i = 0; i < 35; i++)
546      messages[i][0] = 0;      messages[i][0] = 0;
547    for(i=0;env[i]!=NULL;i++)    for(i=0;env[i]!=NULL;i++)
# Line 552  void setup(char *env[]) Line 552  void setup(char *env[])
552    
553    for (p = rcfiles; *p != NULL; p++)    for (p = rcfiles; *p != NULL; p++)
554    {    {
555      FILE *fp;  
556      char *pathname = NULL;      char *pathname = NULL;
557    
558      pathname = expand_path (*p);      pathname = expand_path (*p);
559         #ifdef DEBUG_RELEASE
560          printf("Trying to find %s in %s\n",*p,pathname);
561         #endif
562    
563      fp = fopen (pathname, "r");      fp = fopen (pathname, "r");
564      if (fp == NULL)      if (fp == NULL)
565      {      {
566        if (errno != ENOENT)        if (errno != ENOENT)
567          err("warning: %s: %s", pathname, strerror (errno));          err("warning: %s: %s", pathname, strerror (errno));
568         #ifdef DEBUG_RELEASE
569          printf("Can't found %s\n",pathname);
570         #endif
571    
572    
573      }      }
574      else      else
575      {      {
576        parse_rcfile (pathname, fp);        parse_rcfile (pathname, fp);
577          #ifdef DEBUG_RELEASE
578          printf("Reading %s\n",pathname);
579          #endif
580        count++;        count++;
581        fclose (fp);        fclose (fp);
582      }      }
583      free (pathname);      free (pathname);
584    }    }
585     // #endif
586    if (count == 0)    if (count == 0)
587      err("warning: no config file found");      err("warning: no config file found");
588  }  }

Legend:
Removed from v.39  
changed lines
  Added in v.40

  ViewVC Help
Powered by ViewVC 1.1.26