Subversion Repositories SvarDOS

Rev

Rev 1959 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
219 mateuszvis 1
/*
225 mateuszvis 2
 * This file is part of pkginst
1678 mateusz.vi 3
 * Copyright (C) 2012-2024 Mateusz Viste
219 mateuszvis 4
 *
5
 * It contains a few helper function...
6
 */
7
 
8
#ifndef helpers_sentinel
9
#define helpers_sentinel
1678 mateusz.vi 10
 
219 mateuszvis 11
#include "loadconf.h"   /* required for the customdirs struct */
1678 mateusz.vi 12
 
1964 mateusz.vi 13
/* converts an uint32 into a 8-chars hex string
14
 * returns the pointer to s */
15
char *crc32tostring(char *s, unsigned long val);
16
 
1893 mateusz.vi 17
/* outputs a NUL-terminated string to stdout */
18
void output(const char *s);
1959 mateusz.vi 19
void outputnl(const char *s);
1893 mateusz.vi 20
 
219 mateuszvis 21
void slash2backslash(char *str);
1678 mateusz.vi 22
 
23
/* trim CRC from a filename and returns a pointer to the CRC part.
24
 * this is used to parse filename lines from LSM files */
25
char *trimfnamecrc(char *fname);
26
 
219 mateuszvis 27
char *fdnpkg_strcasestr(const char *s, const char *find);
1678 mateusz.vi 28
 
29
/* recursively mkdir() directories of a path.
30
 * ignores the trailing filename if there is one */
219 mateuszvis 31
void mkpath(char *dirs);
1678 mateusz.vi 32
 
1892 mateusz.vi 33
char *computelocalpath(char *longfilename, char *respath, const char *dosdir, const struct customdirs *dirlist, char bootdrive);
219 mateuszvis 34
void removeDoubleBackslashes(char *str);
35
char *getfext(char *fname);
248 mateuszvis 36
int freadtokval(FILE *fd, char *line, size_t maxlen, char **val, char delim);
1678 mateusz.vi 37
 
219 mateuszvis 38
#endif