version 1.24, 2002/02/22 00:18:37 |
version 1.25, 2002/03/11 13:02:56 |
|
|
* Open a file for reading. |
* Open a file for reading. |
*/ |
*/ |
int |
int |
ffropen(fn, bp) |
ffropen(const char *fn, BUFFER *bp) |
char *fn; |
|
BUFFER *bp; |
|
{ |
{ |
struct stat statbuf; |
struct stat statbuf; |
|
|
|
|
* FALSE on error (cannot create). |
* FALSE on error (cannot create). |
*/ |
*/ |
int |
int |
ffwopen(fn, bp) |
ffwopen(const char *fn, BUFFER *bp) |
char *fn; |
|
BUFFER *bp; |
|
{ |
{ |
int fd; |
int fd; |
mode_t mode = DEFFILEMODE; |
mode_t mode = DEFFILEMODE; |
|
|
*/ |
*/ |
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
ffclose(bp) |
ffclose(BUFFER *bp) |
BUFFER *bp; |
|
{ |
{ |
|
|
(void) fclose(ffp); |
(void) fclose(ffp); |
|
|
* end of buffer. |
* end of buffer. |
*/ |
*/ |
int |
int |
ffputbuf(bp) |
ffputbuf(BUFFER *bp) |
BUFFER *bp; |
|
{ |
{ |
char *cp; |
char *cp; |
char *cpend; |
char *cpend; |
|
|
* of data without the normally implied \n. |
* of data without the normally implied \n. |
*/ |
*/ |
int |
int |
ffgetline(buf, nbuf, nbytes) |
ffgetline(char *buf, int nbuf, int *nbytes) |
char *buf; |
|
int nbuf; |
|
int *nbytes; |
|
{ |
{ |
int c, i; |
int c, i; |
|
|
|
|
* a problem when using mg with things like crontab and vipw. |
* a problem when using mg with things like crontab and vipw. |
*/ |
*/ |
int |
int |
fbackupfile(fn) |
fbackupfile(const char *fn) |
char *fn; |
|
{ |
{ |
struct stat sb; |
struct stat sb; |
int from, to, serrno; |
int from, to, serrno; |
|
|
#endif |
#endif |
|
|
char * |
char * |
adjustname(fn) |
adjustname(const char *fn) |
char *fn; |
|
{ |
{ |
char *cp; |
char *cp; |
static char fnb[NFILEN]; |
static char fnb[NFILEN]; |
|
|
*/ |
*/ |
|
|
LIST * |
LIST * |
make_file_list(buf) |
make_file_list(char *buf) |
char *buf; |
|
{ |
{ |
char *dir, *file, *cp; |
char *dir, *file, *cp; |
int len, preflen; |
int len, preflen; |