File: system.h

package info (click to toggle)
graywolf 0.1.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 6,424 kB
  • sloc: ansic: 84,358; sh: 216; awk: 36; makefile: 22
file content (57 lines) | stat: -rw-r--r-- 1,639 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* ----------------------------------------------------------------- 
FILE:	    system.h                                       
CONTENTS:   definitions for system functions.
DATE:	    Tue Oct 29 15:05:57 EST 1991
REVISIONS:  
----------------------------------------------------------------- */
#ifndef YSYSTEM_H
#define YSYSTEM_H


/*
Ysystem -
Function:
    An abstract interface to the system call.  The first argument is
    the name of the program to be executed.  It is used in the error
    message when the system call fails for some reason.  The second
    argument is whether to abort the program or not.  The third argument
    is the actual command that is to be processed.  The fourth argument
    is the function to call upon failure.  It has no arguments.
    Ysystem return the system error code if failure; 0 otherwise.
*/
extern INT Ysystem( P4(char *program,BOOL abortFlag,char *exec_statement,
    INT (*abort_func)() ) ) ;

/*
YcopyFile -
Function:
    Copy a file from the source to the destination name.
    Aborts pgm if a failure.
*/
extern VOID YcopyFile( P2(char *sourcefile, char *destfile) ) ;

/*
YmoveFile -
Function:
    Move a file from the source to the destination name.
    Aborts pgm if a failure.
*/
extern VOID YmoveFile( P2(char *sourcefile, char *destfile) ) ;

/*
Yrm_files -
Function:
    Remove files from system.  Wildcards are available.  May be system
    dependent however.
    Never aborts pgm if a failure.
*/
extern VOID Yrm_files( P1(char *files) ) ;

/*
Ygetenv -
Function:
    Interface to getenv system function.
*/
extern char *Ygetenv( P1(char *env_var) ) ;

#endif /* YSYSTEM_H */