home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / fweb153.zip / fweb-1.53 / web / strmac.h < prev    next >
C/C++ Source or Header  |  1995-09-23  |  2KB  |  49 lines

  1. #if(0)
  2.   FTANGLE v1.53, created with UNIX on "Thursday, September 21, 1995 at 15:06." 
  3.   COMMAND LINE: "web/ftangle web/strmac -A -# --F -= 1.53/web/strmac.h"
  4.   RUN TIME: "Saturday, September 23, 1995 at 16:17."
  5.   WEB FILE:    "web/strmac.web"
  6.   CHANGE FILE: (none)
  7. #endif
  8.  
  9. #ifndef _strmac_
  10.  
  11. #define _strmac_
  12.  
  13.  
  14. #define ATOF(s) atof((CONST char *)(s))
  15. #define ATOI(s) atoi((CONST char *)(s))
  16. #define ATOL(s) atol((CONST char *)(s))
  17. #define FGETS(s,n,stream) fgets((char *)(s),(int)(n),(FILE *)(stream))
  18. #define FOPEN(name,iomode) fopen((char *)(name),(char *)(iomode))
  19. #define GETENV(env) OC(getenv((char *)(env)))
  20. #define MEMCMP(s1,s2,n) memcmp((CONST void *)(s1),(CONST void *)(s2),\
  21.   (size_t)(n))
  22. #define MEMSET(buffer,c,n) memset((void *)(buffer),(int)(c),(size_t)(n))
  23. #define QSORT(array,number,size,comparison) qsort((void *)(array),\
  24.  (size_t)(number),(size_t)(size),\
  25.  (int (*)(CONST void *,CONST void *))(comparison))
  26. #define STRCAT(dest,src) strcat((char *)(dest),(CONST char *)(src))
  27. #define STRNCAT(dest,src,n) strncat((char *)(dest),(CONST char *)(src),\
  28.   (size_t)(n))
  29. #define STRPBRK(s1,s2) strpbrk((CONST char *)(s1),(CONST char *)(s2))
  30. #define STRCHR(s,c) strchr((CONST char *)(s),(int)(c))
  31. #define STRRCHR(s,c) strrchr((CONST char *)(s),(int)(c))
  32. #define STRCMP(s1,s2) strcmp((CONST char *)(s1),(CONST char *)(s2))
  33. #define STRNCMP(s1,s2,n) strncmp((CONST char *)(s1),(CONST char *)(s2),\
  34.   (size_t)(n))
  35. #define STRCPY(dest,src) strcpy((char *)(dest),(CONST char *)(src))
  36. #define STRNCPY(dest,src,n) strncpy((char *)(dest),(CONST char *)(src),\
  37.   (size_t)(n))
  38. #define STRSPN(s1,s2) strspn((CONST char *)(s1),(CONST char *)(s2))
  39. #define STRLEN(s) strlen((CONST char *)(s))
  40. #define STRTOD(s,endptr) strtod((CONST char *)(s),(char **)(endptr))
  41. #define STRTOL(s,endptr,radix) strtol((CONST char *)(s),\
  42.  (char **)(endptr),(int)(radix))
  43.  
  44.  
  45.  
  46. #endif /* |_strmac_| */
  47.  
  48.  
  49.