~ubuntu-branches/ubuntu/karmic/fweb/karmic

« back to all changes in this revision

Viewing changes to Web/strmac.h

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-01-04 23:20:22 UTC
  • Revision ID: james.westby@ubuntu.com-20020104232022-330ad4iyzpvb5bm4
Tags: upstream-1.62
ImportĀ upstreamĀ versionĀ 1.62

Show diffs side-by-side

added added

removed removed

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