home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Homebrewer's Handbook / vr.iso / vr386 / wparse.h < prev    next >
C/C++ Source or Header  |  1996-03-19  |  2KB  |  64 lines

  1. // DAve Stampe, 9/1/94
  2. // These are usable functions from WPARSE.C for parsing
  3.  
  4.  
  5. /*
  6.  This code is part of the VR-386 project, created by Dave Stampe.
  7.  VR-386 is a desendent of REND386, created by Dave Stampe and
  8.  Bernie Roehl.  Almost all the code has been rewritten by Dave
  9.  Stampre for VR-386.
  10.  
  11.  Copyright (c) 1994 by Dave Stampe:
  12.  May be freely used to write software for release into the public domain
  13.  or for educational use; all commercial endeavours MUST contact Dave Stampe
  14.  (dstampe@psych.toronto.edu) for permission to incorporate any part of
  15.  this software or source code into their products!  Usually there is no
  16.  charge for under 50-100 items for low-cost or shareware products, and terms
  17.  are reasonable.  Any royalties are used for development, so equipment is
  18.  often acceptable payment.
  19.  
  20.  ATTRIBUTION:  If you use any part of this source code or the libraries
  21.  in your projects, you must give attribution to VR-386 and Dave Stampe,
  22.  and any other authors in your documentation, source code, and at startup
  23.  of your program.  Let's keep the freeware ball rolling!
  24.  
  25.  DEVELOPMENT: VR-386 is a effort to develop the process started by
  26.  REND386, improving programmer access by rewriting the code and supplying
  27.  a standard API.  If you write improvements, add new functions rather
  28.  than rewriting current functions.  This will make it possible to
  29.  include you improved code in the next API release.  YOU can help advance
  30.  VR-386.  Comments on the API are welcome.
  31.  
  32.  CONTACT: dstampe@psych.toronto.edu
  33. */
  34.  
  35.  
  36. void dump_lists(void);
  37.  
  38. extern char loadpath[];
  39.  
  40. void *find_seg(char *name);
  41.  
  42. // these scan a line for a token
  43. // but leave the dest unchanged if none found/error
  44.  
  45. void tokstr(char *c);        // return string from line
  46. void tokstrn(char *c);        // return string or null string
  47. void tokint(int *i);        // return integer
  48. void tokhex(unsigned *i);
  49. void toklong(long *i);
  50. void tokfloat(float *i);
  51. void tokangle(long *i);
  52. char *toks(void);
  53.  
  54.  
  55. void *add_name(void **list, char *name, void *value);
  56.  
  57. void del_namelist(void *list);
  58.  
  59. void *find_name(void *list, char *name);
  60.  
  61. char *find_value(void *list, void *value);
  62.  
  63. unsigned int find_color(void *list, char *name);
  64.