home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tools / make / pdmake / tstring.h < prev   
C/C++ Source or Header  |  1990-07-06  |  1KB  |  41 lines

  1. /*
  2.  * tstring.h
  3.  *
  4.  * 88-10-01 v1.0    created by greg yachuk, placed in the public domain
  5.  * 88-10-06 v1.1    changed prerequisite list handling
  6.  * 88-11-11 v1.2    fixed some bugs and added environment variables
  7.  * 89-07-12 v1.3    stop appending shell commands, and flush output
  8.  * 89-08-01 v1.4 AB    lots of new options and code
  9.  * 89-10-30 v1.5    -f -S -q options, took some changes from v1.4
  10.  * 90-04-18 v1.6    -b -- -W options, emulate <<, non-BSD cleanup
  11.  */
  12. #define    tnew(t)        ((t *) talloc(sizeof(t)))
  13. #define    tfree(t)    (free((char *) t))
  14.  
  15. #define    tstrcat(s,p)    (strcat(strcpy(talloc(strlen(s)+strlen(p)+1),(s)),(p)))
  16. #define    tstrcpy(s)    (strcpy(talloc(strlen(s)+1), (s)))
  17.  
  18. #ifdef    __STDC__
  19. extern char *talloc(int n);
  20. extern char *trealloc(char *s, int n);
  21. extern char *tstrncpy(char *s, int n);
  22. extern int terror(int n, char *s);
  23. extern char *tstrspan(char *str);
  24. extern char *tunquote(char *str);
  25. extern char *tsplit(char *s, char *seps, char **dp);
  26. extern char *token(char *s, char *sep, char *schar);
  27. extern char **tokenize(char *input);
  28. extern char *tgets(FILE * fd);
  29. #else
  30. extern char *talloc();
  31. extern char *trealloc();
  32. extern char *tstrncpy();
  33. extern int terror();
  34. extern char *tstrspan();
  35. extern char *tunquote();
  36. extern char *tsplit();
  37. extern char *token();
  38. extern char **tokenize();
  39. extern char *tgets();
  40. #endif
  41.