-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsys.h
35 lines (23 loc) · 915 Bytes
/
sys.h
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
30
31
32
33
34
35
/* LeeScheme/sys.h - Copyright (C) Lee Richard Boynton, 1993-2000. */
/* system-independent layer for memory, filesystem, etc. */
#ifndef _SYS_
#define _SYS_
#define MAX_FILENAME_LENGTH (1024)
extern void init_system(void);
extern int enable_interrupts(int flag); /* returns the previous flag */
extern void quit(long exit_code);
extern void *allocate_memory(long size);
extern void free_memory(void *ptr);
extern void get_home_directory(char *buffer);
extern void expand_path(char *buf, char *name);
extern void convert_path(char *buf);
extern int does_file_exist(char *name);
extern void remove_file(char *name);
object open_input_file(char *path);
object open_output_file(char *path);
char *newline_string(object port);
extern void msec_sleep(long msec);
extern long msec_since_launch(void);
extern int execute_system_command(char *the_command);
extern void check_interrupts(void);
#endif /* SYS */