AcePerl
view release on metacpan or search on metacpan
acelib/wh/regular.h view on Meta::CPAN
/* returns an absolute path string for dir in relation to user's CWD */
/* returns pointer to internal static */
UTIL_FUNC_DCL char *filGetFullPath (char *dir);
/* returns filename part of a pathname. */
/* returns pointer to internal static */
UTIL_FUNC_DCL char *filGetFilename(char *path);
/* returns the file-extension part of a path or file-name */
/* returns pointer to internal static */
UTIL_FUNC_DCL char *filGetExtension(char *path);
UTIL_FUNC_DCL char *filName (char *name, char *ending, char *spec) ;
UTIL_FUNC_DCL char *filStrictName (char *name, char *ending, char *spec) ;
/* determines time since last modification, FALSE if no file */
UTIL_FUNC_DCL BOOL filAge (char *name, char *ending,
int *diffYears, int *diffMonths, int *diffDays,
int *diffHours, int *diffMins, int *diffSecs);
UTIL_FUNC_DCL FILE *filopen (char *name, char *ending, char *spec) ;
UTIL_FUNC_DCL FILE *filmail (char *address) ;
UTIL_FUNC_DCL void filclose (FILE* fil) ;
UTIL_FUNC_DCL BOOL filremove (char *name, char *ending) ;
UTIL_FUNC_DCL FILE *filtmpopen (char **nameptr, char *spec) ;
UTIL_FUNC_DCL BOOL filtmpremove (char *name) ;
UTIL_FUNC_DCL void filtmpcleanup (void) ;
/* file chooser */
typedef FILE* (*QueryOpenRoutine)(char*, char*, char*, char*, char*) ;
UTIL_FUNC_DCL QueryOpenRoutine filQueryOpenRegister (QueryOpenRoutine new);
/* allow graphic file choosers to be registered */
UTIL_FUNC_DCL FILE *filqueryopen (char *dirname, char *filname,
char *ending, char *spec, char *title);
/* if dirname is given it should be DIR_BUFFER_SIZE long
and filname FILE_BUFFER_SIZE long
if not given, then default (static) buffers will be used */
/* directory access */
UTIL_FUNC_DCL Array filDirectoryCreate (char *dirName,
char *ending,
char *spec);
UTIL_FUNC_DCL void filDirectoryDestroy (Array filDirArray);
/*******************************************************************/
/************* randsubs.c random number generator ******************/
UTIL_FUNC_DCL double randfloat (void) ;
UTIL_FUNC_DCL double randgauss (void) ;
UTIL_FUNC_DCL int randint (void) ;
UTIL_FUNC_DCL void randsave (int *arr) ;
UTIL_FUNC_DCL void randrestore (int *arr) ;
/* Unix debugging. */
/* put "break invokeDebugger" in your favourite debugger init file */
/* this function is empty, it is defined in messubs.c used in
messerror, messcrash and when ever you need it.
*/
UTIL_FUNC_DCL void invokeDebugger(void) ;
/*******************************************************************/
/************* some WIN32 debugging utilities **********************/
#if defined (WIN32)
#if defined(_DEBUG)
/* See win32util.cpp for these functions */
UTIL_FUNC_DCL const char *dbgPos( const char *caller, int lineno, const char *called ) ;
UTIL_FUNC_DCL void WinTrace(char *prompt, unsigned long code) ;
UTIL_FUNC_DCL void AceASSERT(int condition) ;
UTIL_FUNC_DCL void NoMemoryTracking() ;
#else /* !defined(_DEBUG) */
#define dbgPos(c,l,fil) (const char *)(fil)
#endif /* !defined(_DEBUG) */
#endif /* defined(WIN32) */
#endif /* defined(DEF_REGULAR_H) */
/******************************* End of File **********************************/
( run in 1.443 second using v1.01-cache-2.11-cpan-df04353d9ac )