home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / audio / SoundTime.lzh / SoundTime / src / utils.h < prev   
Encoding:
C/C++ Source or Header  |  1991-11-30  |  649 b   |  18 lines

  1. #define STRIP(x)    (x[strlen(x)-1] = '\0')
  2. #ifndef NULL
  3. #define NULL 0L
  4. #endif
  5. #define TIMESTAMP    time(NULL)
  6. #define FREE_ARR(x)    { int flo; for (flo=0;flo<5000;++flo) { \
  7.             if (x[flo] != NULL) free(x[flo]); else break; } \
  8.             free(x); }
  9. #define MATCH(d, p, r)    ((smatch(d, p, r) || !stricmp(d, p)))
  10. #define TRIM_SPACES(x)    (stpls(x), stpts(x))
  11. #define WASH(x)        /* uhh.. this washes the variable */
  12. #define LOWERCASE(s)    strlwr(strdup(s))
  13. #define STORE(a, b, c)    { (a)->(b) = (c); WASH((a)); }
  14. #define OPT(v, i)    v[i][0]
  15. #define OPTDATA(v, i)    &v[i][1]
  16. #define INQUIRY        (!strcmp(av[1], "?") || !strcmp(av[1], "-?"))
  17. #define FSIZE(fp)    lseek(fp->_file, 0L, 2)
  18.