From b60f03f87b5604100bc427a6b67fd5346ba42ba7 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Tue, 19 Jan 1999 20:09:16 +0000 Subject: [PATCH] patches from rob browning git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1634 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/FileIO.c | 8 ++++---- src/engine/FileIOP.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/engine/FileIO.c b/src/engine/FileIO.c index 702931ea2d..61a66bd777 100644 --- a/src/engine/FileIO.c +++ b/src/engine/FileIO.c @@ -141,7 +141,7 @@ static char *readString( int fd, int token ); static time_t readDMYDate( int fd, int token ); static int readTSDate( int fd, Timespec *, int token ); -static int writeAccountGroupToFile( char *datafile, AccountGroup *grp ); +static int writeAccountGroupToFile( const char *datafile, AccountGroup *grp ); static int writeGroup( int fd, AccountGroup *grp ); static int writeAccount( int fd, Account *account ); static int writeAccInfo( int fd, AccInfo *accinfo ); @@ -268,7 +268,7 @@ long long xaccFlipLongLong (long long val) * Return: the struct with the program data in it * \********************************************************************/ AccountGroup * -xaccReadAccountGroupFile( char *datafile ) +xaccReadAccountGroupFile( const char *datafile ) { int fd; AccountGroup *grp = 0x0; @@ -1346,7 +1346,7 @@ xaccResetWriteFlags (AccountGroup *grp) * Return: -1 on failure * \********************************************************************/ int -xaccWriteAccountGroupFile( char *datafile, AccountGroup *grp ) +xaccWriteAccountGroupFile( const char *datafile, AccountGroup *grp ) { int err = 0; char * timestamp; @@ -1386,7 +1386,7 @@ xaccWriteAccountGroupFile( char *datafile, AccountGroup *grp ) \********************************************************************/ static int -writeAccountGroupToFile( char *datafile, AccountGroup *grp ) +writeAccountGroupToFile( const char *datafile, AccountGroup *grp ) { int err = 0; int fd; diff --git a/src/engine/FileIOP.h b/src/engine/FileIOP.h index 70e8eb7e8e..458fcc2ccd 100644 --- a/src/engine/FileIOP.h +++ b/src/engine/FileIOP.h @@ -50,7 +50,8 @@ * is replaced with the current year/month/day/hour/minute/second. * Returns a negative number if an error occured. */ -AccountGroup *xaccReadAccountGroupFile (char *datafile); -int xaccWriteAccountGroupFile (char *datafile, AccountGroup *grp); +AccountGroup *xaccReadAccountGroupFile (const char *datafile); +int xaccWriteAccountGroupFile (const char *datafile, + AccountGroup *grp); #endif /* __XACC_FILEIO_P_H__ */