File: support.h

package info (click to toggle)
bam 0.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,416 kB
  • ctags: 2,715
  • sloc: ansic: 18,755; python: 447; cpp: 30; makefile: 11; sh: 10
file content (29 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

void install_signals(void (*abortsignal)(int));
int run_command(const char *cmd, const char *filter);

void platform_init();
void platform_shutdown();

/* threading */
void *threads_create(void (*threadfunc)(void *), void *u);
void threads_join(void *thread);
void threads_yield();

void criticalsection_enter();
void criticalsection_leave();

/* filesystem and timestamps */
time_t timestamp();
time_t file_timestamp(const char *filename);
int file_exist(const char *filename);
int file_createdir(const char *path);
void file_touch(const char *filename);

/* plugin related */
typedef int (*PLUGINFUNC)(struct lua_State *);
PLUGINFUNC plugin_load(const char *filename);

/* string hashing function */
unsigned int string_hash(const char *str_in);
unsigned int string_hash_add(unsigned int base, const char *str_in);