Update for last 2 commits.
[geany-mirror.git] / tagmanager / main.h
bloba07f8822f187c3e2ecda85c8064a8093e4b1f8c6
1 /*
3 * Copyright (c) 1998-2001, Darren Hiebert
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License.
8 * External interface to main.c
9 */
10 #ifndef _MAIN_H
11 #define _MAIN_H
14 * INCLUDE FILES
16 #include "general.h" /* must always come first */
18 #include <stdio.h>
20 #include "vstring.h"
23 * MACROS
25 #define xMalloc(n,Type) (Type *)eMalloc((size_t)(n) * sizeof (Type))
26 #define xCalloc(n,Type) (Type *)eCalloc((size_t)(n), sizeof (Type))
27 #define xRealloc(p,n,Type) (Type *)eRealloc((p), (n) * sizeof (Type))
30 * DATA DECLARATIONS
32 typedef int errorSelection;
33 enum eErrorTypes { FATAL = 1, WARNING = 2, PERROR = 4 };
34 extern char *CurrentDirectory;
37 * FUNCTION PROTOTYPES
39 #ifdef NEED_PROTO_MALLOC
40 extern void *malloc (size_t);
41 extern void *realloc (void *ptr, size_t);
42 #endif
44 extern void error (const errorSelection selection, const char *const format, ...) __printf__ (2, 3);
45 extern FILE *tempFile (const char *const mode, char **const pName);
46 extern char* eStrdup (const char* str);
47 extern void *eMalloc (const size_t size);
48 extern void *eCalloc (const size_t count, const size_t size);
49 extern void *eRealloc (void *const ptr, const size_t size);
50 extern void eFree (void *const ptr);
51 extern void toLowerString (char* str);
52 extern void toUpperString (char* str);
53 extern char* newLowerString (const char* str);
54 extern char* newUpperString (const char* str);
55 extern long unsigned int getFileSize (const char *const name);
56 extern boolean isExecutable (const char *const name);
57 extern boolean isSameFile (const char *const name1, const char *const name2);
58 extern boolean doesFileExist (const char *const fileName);
59 extern char* absoluteDirname (char *file);
60 extern char* relativeFilename (const char *file, const char *dir);
61 extern void addTotals (const unsigned int files, const long unsigned int lines, const long unsigned int bytes);
62 extern const char *baseFilename (const char *const filePath);
63 extern boolean isAbsolutePath (const char *const path);
64 extern vString *combinePathAndFile (const char *const path, const char *const file);
65 extern boolean isDestinationStdout (void);
66 extern const char *getExecutableName (void);
67 extern void processExcludeOption (const char *const option, const char *const parameter);
68 extern int main (int argc, char **argv);
70 #ifndef HAVE_STRICMP
71 extern int stricmp (const char *s1, const char *s2);
72 #endif
73 #ifndef HAVE_STRNICMP
74 extern int strnicmp (const char *s1, const char *s2, size_t n);
75 #endif
76 #ifndef HAVE_STRSTR
77 extern char* strstr (const char *str, const char *substr);
78 #endif
80 #endif /* _MAIN_H */
82 /* vi:set tabstop=8 shiftwidth=4: */