home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NETKIT-A.06 / NETKIT-A / NetKit-A-0.06 / pidentd-2.2 / src / config.c next >
Encoding:
C/C++ Source or Header  |  1992-12-06  |  769 b   |  47 lines

  1. /*
  2. ** config.c                         This file handles the config file
  3. **
  4. ** This program is in the public domain and may be used freely by anyone
  5. ** who wants to. 
  6. **
  7. ** Last update: 6 Dec 1992
  8. **
  9. ** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
  10. */
  11.  
  12. #include <stdio.h>
  13. #include <errno.h>
  14.  
  15. #include "error.h"
  16. #include "identd.h"
  17. #include "paths.h"
  18.  
  19.  
  20. int parse_config(path, silent_flag)
  21.   char *path;
  22.   int silent_flag;
  23. {
  24.   FILE *fp;
  25.  
  26.   if (!path)
  27.     path = PATH_CONFIG;
  28.   
  29.   fp = fopen(path, "r");
  30.   if (!fp)
  31.   {
  32.     if (silent_flag)
  33.       return 0;
  34.  
  35.     ERROR1("error opening %s", path);
  36.   }
  37.  
  38.   /*
  39.   ** Code should go here to parse the config file data.
  40.   ** For now we just ignore the contents...
  41.   */
  42.   
  43.   
  44.   fclose(fp);
  45.   return 0;
  46. }
  47.