24 int isDIR(
char *dpath);
25 int isEMPTYDIR(
char *dpath);
31 int isINODE(
char *ipath,
int typ);
33 char *pluralName(
char *
s,
int count);
36 char *memAllocTagged(
int size,
char *name);
37 void memFreeTagged(
void *ptr,
char *note);
38 void memCacheDump(
char *
s);
41 char *
findBol(
char *
s,
char *upperLimit);
43 void changeDir(
char *pathname);
45 void unlinkFile(
char *pathname);
47 FILE *
fopenFile(
char *pathname,
char *mode);
48 FILE *
popenProc(
char *command,
char *mode);
52 char *
getInstances(
char *textp,
int size,
int nBefore,
int nAfter,
char *regex,
int recordOffsets);
56 void memStats(
char *
s);
64 void mmapOpenListing();
68 int nftwFileFilter(
char *pathname,
struct stat *st,
int onlySingleLink);
69 void makePath(
char *dirpath);
70 void makeDir(
char *dirpath);
71 void removeDir(
char *dir);
73 int iMadeThis(
char *textp);
74 int isFILE(
char *pathname);
75 int addEntry(
char *pathname,
int forceFlag,
const char *fmt, ...);
76 void Msg(
const char *fmt, ...);
77 void Log(
const char *fmt, ...);
78 void MsgLog(
const char *fmt, ...);
79 void Note(
const char *fmt, ...);
80 void Warn(
const char *fmt, ...);
81 void Assert(
int fatalFlag,
const char *fmt, ...);
82 void Error(
const char *fmt, ...);
83 void Fatal(
const char *fmt, ...);
84 void traceFunc(
char *fmtStr, ...);
int isFILE(char *pathname)
Check if an inode is a file.
int isEMPTYFILE(char *fpath)
Check if given file is empty.
char * curDate()
Get the current date.
void chmodInode(char *pathname, int mode)
Change inode mode bits.
int s
The socket that the CLI will use to communicate.
char * wordCount(char *textp)
VERY simple line count, does NOT have to be perfect!
int bufferLineCount(char *p, int len)
Finds the length of first line in a buffer.
char * getInstances(char *textp, int size, int nBefore, int nAfter, char *regex, int recordOffsets)
Get occurrence of a regex in a given string pointer.
int isCHAR(char *cpath)
Check if given path is a character device.
void Msg(const char *fmt,...)
DO NOT automatically add to a string passed to Msg(); in parseDistro, we sometimes want to dump a p...
int addEntry(char *pathname, int forceFlag, const char *fmt,...)
adds a line to the specified pathname
void Assert(int fatalFlag, const char *fmt,...)
Raise an assert.
void printRegexMatch(int n, int cached)
CDB – Need to review this code, particularly for the use of an external file (Nomos.strings.txt). Despite the fact that variable is named debugStr, the file appears to be used for more than just debugging.
char * mmapFile(char *pathname)
Blarg. Files that are EXACTLY a multiple of the system pagesize do not get a NULL on the end of the b...
char * copyString(char *s, char *label)
Create a copy of a string.
char * pathBasename(char *path)
Get the basename from a file path.
int isSYMLINK(char *spath)
Check if given path is a symbolic link.
int isDIR(char *dpath)
Check if given path is a directory.
int mySystem(const char *fmt,...)
Run a system command.
void renameInode(char *oldpath, char *newpath)
Rename an inode at oldpath to newpath.
int isBLOCK(char *bpath)
Check if given path is a Block device.
char * findEol(char *s)
Find first ROL in a string.
int isPIPE(char *ppath)
Check if given path is a pipe.
int isINODE(char *ipath, int typ)
Check for a inode against a flag.
void munmapFile(void *ptr)
void appendFile(char *pathname, char *str)
Append a string at the end of the file.
char * findBol(char *s, char *upperLimit)
Find Begin of Line in a string.
void makeSymlink(char *path)
Create symbolic links for a given path in current directory.
FILE * fopenFile(char *pathname, char *mode)
Open a file and return the file pointer.
FILE * popenProc(char *command, char *mode)
Open a process pipe using popen()
Fatal($msg, $filenm, $lineno)
Write message to stdout and die.
char * newReloTarget(char *basename)
Check if a relocation target is accessible.