5 $Id: gjutil.h,v 1.1.1.1 1997/06/27 07:17:32 geoff Exp $
11 typedef int GJ_LIM; /* type for limits - e.g. max buffer length */
12 typedef int GJ_PEN; /* type for gap penalties */
13 typedef int GJ_FLG; /* Flag type - usually just 1 or 0 */
14 typedef float GJ_FLOAT; /* Single precision floating point type */
15 typedef double GJ_DBL; /* a double precision floating point type */
16 typedef int GJ_S_COUNT; /* small counter */
17 typedef long GJ_L_COUNT; /* long counter */
19 typedef struct { /* structure to hold a filename and */
20 char *name; /* associated handle */
24 struct tokens { /* structure to hold tokens parsed from */
25 int ntok; /* string with strtok */
34 #define STD_FILES extern FILE *std_in,*std_out,*std_err
36 /* utility.h function definitions */
38 void *GJmalloc(size_t);
39 void *GJrealloc(void *,size_t);
40 void *GJmallocNQ(size_t);
41 void *GJreallocNQ(void *,size_t);
43 void GJerror(const char *);
44 char *GJstrdup(const char *);
45 char *GJstoupper(const char *);
46 char *GJstolower(const char *);
47 char *GJstoup(char *);
48 char *GJstolo(char *);
50 FILE *GJfopen(const char *, const char *,int);
51 int GJfclose(FILE *,int);
52 GJFILE *GJfilemake(const char *name,const char *type,int action);
53 GJFILE *GJfilerename(GJFILE *ret_val, const char *name);
54 GJFILE *GJfileclose(GJFILE *ret_val,int action);
55 GJFILE *GJfileopen(GJFILE *ret_val,const char *type,int action);
56 GJFILE *GJfileclean(GJFILE *fval,int action);
57 void GJinitfile(void);
59 char *GJfnonnull(char *);
60 char *GJstrappend(char *,char *);
61 char *GJremovechar(char *,char);
62 char *GJremovechar2(char *string,char c);
63 char *GJstrcreate(size_t, char *);
64 char *GJstrlocate(char *,char *);
65 char *GJsubchar(char *,char,char);
66 char *GJstrtok(char *,const char *);
67 void error(const char *, int);
68 unsigned char **uchararr(int,int);
69 void ucharfree(unsigned char **array,int i);
70 signed char **chararr(int,int);
71 void GJCinit(signed char **,int ,int ,char );
72 void mcheck(void *, char *);
73 char *GJstrblank(char *, int);
74 void GJUCinit(unsigned char **,int ,int ,unsigned char );
75 char *GJcat(int N,...);
76 struct tokens *GJgettokens(const char *delims, char *buff);
77 void GJfreetokens(struct tokens *tok);
78 char * GJtoktostr(struct tokens *tok, char delim, int s, int e);
79 void GJ_start_clock(void);
80 void GJ_stop_clock(FILE *fp);
81 char *GJstrrename(char *old,const char *new);
82 void GJindexx(int *arrin,int n,int *indx);
84 void GJpline(FILE *fp,char c,int n);
85 char *GJlocaltime(void);
86 void GJpstring(FILE *fp,char *s,int n);
88 IRANGE *irange(int *ivec, int n);
92 Revision 1.1.1.1 1997/06/27 07:17:32 geoff
93 Import alscript 2_07 with the cygwin executables.
95 Revision 1.5 1997/06/27 07:17:32 gjb
96 Added rlic.c linfo.h and
97 changes to gjutil.c to give better support for
100 Revision 1.4 1997/05/12 11:10:54 gjb
101 Re-added gjutil.c and gjutil.h to repository
104 Revision 1.2 1997/05/12 10:47:52 gjb
105 Modified CVS header and log position
108 #endif /* GJ_UTIL_H */