mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 07:46:24 -05:00
read files in text mode.
review fileio prototypes.
This commit is contained in:
parent
d9bb0ea262
commit
a65f7ca38c
4
Makefile
4
Makefile
@ -28,7 +28,7 @@ OBJ=basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \
|
|||||||
termio.o window.o word.o names.o globals.o \
|
termio.o window.o word.o names.o globals.o \
|
||||||
wrapper.o utf8.o
|
wrapper.o utf8.o
|
||||||
|
|
||||||
HDR=ebind.h edef.h efunc.h estruct.h version.h
|
HDR=ebind.h edef.h efunc.h estruct.h fileio.h version.h
|
||||||
|
|
||||||
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
|
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ display.o: display.c estruct.h edef.h utf8.h version.h
|
|||||||
eval.o: eval.c estruct.h edef.h version.h
|
eval.o: eval.c estruct.h edef.h version.h
|
||||||
exec.o: exec.c estruct.h edef.h
|
exec.o: exec.c estruct.h edef.h
|
||||||
file.o: file.c estruct.h edef.h
|
file.o: file.c estruct.h edef.h
|
||||||
fileio.o: fileio.c estruct.h edef.h
|
fileio.o: fileio.c fileio.h estruct.h edef.h
|
||||||
ibmpc.o: ibmpc.c estruct.h edef.h
|
ibmpc.o: ibmpc.c estruct.h edef.h
|
||||||
input.o: input.c estruct.h edef.h
|
input.o: input.c estruct.h edef.h
|
||||||
isearch.o: isearch.c estruct.h edef.h
|
isearch.o: isearch.c estruct.h edef.h
|
||||||
|
7
efunc.h
7
efunc.h
@ -221,12 +221,7 @@ extern int filename(int f, int n);
|
|||||||
extern int ifile(char *fname);
|
extern int ifile(char *fname);
|
||||||
|
|
||||||
/* fileio.c */
|
/* fileio.c */
|
||||||
int ffropen( const char *fn) ;
|
#include "fileio.h"
|
||||||
extern int ffwopen(char *fn);
|
|
||||||
extern int ffclose(void);
|
|
||||||
extern int ffputline(char *buf, int nbuf);
|
|
||||||
extern int ffgetline(void);
|
|
||||||
extern int fexist(char *fname);
|
|
||||||
|
|
||||||
/* exec.c */
|
/* exec.c */
|
||||||
extern int namedcmd(int f, int n);
|
extern int namedcmd(int f, int n);
|
||||||
|
10
fileio.c
10
fileio.c
@ -1,3 +1,7 @@
|
|||||||
|
/* fileio.c -- implements fileio.h */
|
||||||
|
|
||||||
|
#include "fileio.h"
|
||||||
|
|
||||||
/* FILEIO.C
|
/* FILEIO.C
|
||||||
*
|
*
|
||||||
* The routines in this file read and write ASCII files from the disk. All of
|
* The routines in this file read and write ASCII files from the disk. All of
|
||||||
@ -19,7 +23,7 @@ static int eofflag; /* end-of-file flag */
|
|||||||
*/
|
*/
|
||||||
int ffropen( const char *fn)
|
int ffropen( const char *fn)
|
||||||
{
|
{
|
||||||
if ((ffp = fopen(fn, "r")) == NULL)
|
if ((ffp = fopen(fn, "rt")) == NULL)
|
||||||
return FIOFNF;
|
return FIOFNF;
|
||||||
eofflag = FALSE;
|
eofflag = FALSE;
|
||||||
return FIOSUC;
|
return FIOSUC;
|
||||||
@ -29,7 +33,7 @@ int ffropen( const char *fn)
|
|||||||
* Open a file for writing. Return TRUE if all is well, and FALSE on error
|
* Open a file for writing. Return TRUE if all is well, and FALSE on error
|
||||||
* (cannot create).
|
* (cannot create).
|
||||||
*/
|
*/
|
||||||
int ffwopen(char *fn)
|
int ffwopen( const char *fn)
|
||||||
{
|
{
|
||||||
#if VMS
|
#if VMS
|
||||||
int fd;
|
int fd;
|
||||||
@ -205,7 +209,7 @@ int ffgetline(void)
|
|||||||
*
|
*
|
||||||
* char *fname; file to check for existance
|
* char *fname; file to check for existance
|
||||||
*/
|
*/
|
||||||
int fexist(char *fname)
|
int fexist( const char *fname)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user