home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / Weather / Weather.app / util.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-09  |  877 b   |  23 lines

  1. #include <stdio.h>
  2. #include <sys/types.h>
  3.  
  4. #define Case break; case
  5. #define Default break; default
  6. static char *_arg, *_argp; /* use by 'for_each_argument */
  7. extern char *av0;       /* will hold name of the command */
  8. #define argument  (_arg=(*_argp? _argp : av[++i==ac? --i : i]),_argp+=strlen(_argp),_arg)
  9. #define for_each_argument av0 = av[0]; for (i=1;i<ac && *av[i]=='-';i++)\
  10.                         for (_argp = &av[i][1]; *_argp;)\
  11.                                 switch(*_argp++)
  12.  
  13. extern char *malloc(), *calloc(), *index(), *rindex();
  14. extern error(), debug(), System(), match();
  15. extern int Verbose;
  16. extern sub(), substr(), suffix(), squishblank(), stripnl(), blank(), stot();
  17. extern int atoi();
  18. extern double atof();
  19. char *save(), *skipsp(), *prefix(), *strindex();
  20. extern fMode(), fDirectory(), fLink(), fTime(), mkdirs();
  21.  
  22. #define Alloc(x) (x *)calloc(1,sizeof(x))
  23.