home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / abmake14.arc / tstring.h < prev   
Text File  |  1988-11-21  |  757b  |  31 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.  *
  7.  */
  8. #define    tnew(t)        ((t *) talloc(sizeof(t)))
  9.  
  10. #define    tstrcat(s,p)    (strcat(strcpy(talloc(strlen(s)+strlen(p)+1),(s)),(p)))
  11. #define    tstrcpy(s)        (strlen(s) ? strcpy(talloc(strlen(s)+1), (s)): NULL)
  12.  
  13. #ifdef    MSDOS
  14. void    tfree(void *s);
  15. void   *talloc(int n);
  16. void   *trealloc(void *s, int n);
  17. void   *tstrncpy(void *s, int n);
  18. int        terror(int n, char *s);
  19. char   *token(char *s, char *sep);
  20. char  **tokenize(char *input);
  21. char   *tgets(FILE *fd);
  22. #else
  23. char   *talloc();
  24. char   *trealloc();
  25. char   *tstrncpy();
  26. int        terror();
  27. char   *token();
  28. char  **tokenize();
  29. char   *tgets();
  30. #endif
  31.