/[MITgcm]/mitgcm.org/devel/buildweb/pkg/swish-e/src/string.h
ViewVC logotype

Annotation of /mitgcm.org/devel/buildweb/pkg/swish-e/src/string.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Sep 20 19:47:29 2002 UTC (22 years, 10 months ago) by adcroft
Branch point for: Import, MAIN
File MIME type: text/plain
Initial revision

1 adcroft 1.1 /*
2     ** Copyright (C) 1995, 1996, 1997, 1998 Hewlett-Packard Company
3     ** Originally by Kevin Hughes, kev@kevcom.com, 3/11/94
4     **
5     ** This program and library is free software; you can redistribute it and/or
6     ** modify it under the terms of the GNU (Library) General Public License
7     ** as published by the Free Software Foundation; either version 2
8     ** of the License, or any later version.
9     **
10     ** This program is distributed in the hope that it will be useful,
11     ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12     ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     ** GNU (Library) General Public License for more details.
14     **
15     ** You should have received a copy of the GNU (Library) General Public License
16     ** along with this program; if not, write to the Free Software
17     ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18     **
19     **
20     ** 2001-02-22 rasc fixed macros (unsigned char)
21     */
22    
23    
24     #define CASE_SENSITIVE_ON 1
25     #define CASE_SENSITIVE_OFF 0
26    
27     char *lstrstr (char *, char *);
28     char *getconfvalue (char *, char *);
29     int isoksuffix (char *filename, struct swline *rulelist);
30     char *replace (char *, char *, char *);
31    
32     char *SafeStrCopy (char *,char *, int *);
33     void sortstring (char *);
34     char *mergestrings (char *,char *);
35    
36    
37     void makelookuptable (char * ,int *);
38     void makeallstringlookuptables (SWISH *);
39     /* 06/00 Jose Ruiz
40     ** Macros iswordchar, isvowel
41     */
42     #define iswordchar(header,c) header.wordcharslookuptable[tolower((unsigned char)(c))]
43     #define isvowel(sw,c) sw->isvowellookuptable[tolower((unsigned char)(c))]
44     /* #define isindexchar(header,c) header.indexcharslookuptable[c] indexchars stuff removed */
45    
46     /* Functions for comparing integers for qsort */
47     int icomp2 (const void *,const void *);
48    
49     /* 06/00 Jose Ruiz
50     ** Function to parse a line into a StringList
51     */
52     StringList *parse_line (char *);
53    
54     /* 06/00
55     ** Function to free memory used by a StringList
56     */
57     void freeStringList (StringList *);
58    
59    
60     int isnumstring (unsigned char*);
61     void remove_newlines (char*);
62     void remove_tags (char*);
63    
64     unsigned char *bin2string(unsigned char *,int);
65    
66     #ifdef _WIN32
67     #define strncasecmp strnicmp
68     #endif
69    
70    
71    
72    
73     char *strtolower (char *str);
74     #define makeItLow(a) strtolower ((a)) /* map old name to new $$$ */
75    
76     char *str_skip_ws (char *s);
77     void str_trim_ws(char *string);
78     char charDecode_C_Escape (char *s, char **se);
79    
80     /* ISO-Routines */
81    
82     unsigned char char_ISO_normalize (unsigned char c);
83     char *str_ISO_normalize (char *s);
84    
85     unsigned char *StringListToString(StringList *sl,int n);
86    
87     int BuildTranslateChars (int trlookup[], unsigned char *from, unsigned char *to);
88     unsigned char *TranslateChars (int trlookup[], unsigned char *s);
89    
90     char *str_basename (char *path);
91     char *cstr_basename (char *path);
92     char *cstr_dirname (char *path);
93    
94    
95     char *estrdup (char *str);
96     char *estrndup (char *str, size_t n);
97     char *estrredup (char *s1, char *s2);
98    
99    
100     /* Make life easy for now */
101     #include "swregex.h"
102    
103    
104    

  ViewVC Help
Powered by ViewVC 1.1.22