home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / gopher1.12 / gopherd / ext.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-21  |  1.5 KB  |  56 lines

  1. /********************************************************************
  2.  * $Author: lindner $
  3.  * $Revision: 1.1 $
  4.  * $Date: 1992/12/10 23:13:27 $
  5.  * $Source: /home/mudhoney/GopherSrc/release1.11/gopherd/RCS/ext.h,v $
  6.  * $Status: $
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: ext.h
  14.  * Header file and access methods for filename extension routines
  15.  *********************************************************************
  16.  * Revision History:
  17.  * $Log: ext.h,v $
  18.  * Revision 1.1  1992/12/10  23:13:27  lindner
  19.  * gopher 1.1 release
  20.  *
  21.  *
  22.  *********************************************************************/
  23.  
  24.  
  25. #ifndef EXT_H
  26. #define EXT_H
  27.  
  28. #include "DAarray.h"
  29. #include "STRstring.h"
  30. #include "boolean.h"
  31.  
  32. /****************************************************
  33.  * A structure for mapping filenames to gopher types, and G+types
  34.  */
  35.  
  36. struct Ext_struct {
  37.      char   Objtype;
  38.      String *GplusType;
  39.      String *Prefix;
  40.      String *ext;
  41. };
  42.  
  43. typedef struct Ext_struct Ext;
  44. typedef DynArray ExtArray;
  45.  
  46. #define ExtgetEntry(a,b) (Ext *)(DAgetEntry((DynArray*)a,b))
  47. #define ExtArrDestroy(a) (DAdestroy(a))
  48.  
  49. ExtArray *ExtArrayNew();
  50. void      ExtAdd(/*extarr, objtype, gplustype, prefix, fileext */);
  51. void      ExtGet(/*extarr, fileext, objtype, gplustype, prefix */);
  52. boolean   ExtProcessLine(/*extarr, inputline*/);
  53.  
  54. #endif /** EXT_H **/
  55.  
  56.