diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c
index 443a1a5652a50c01a023a47c6fb51773241d364d..cfa524afb71f0fcc78c91930b355b194fe10aab1 100644 (file)
--- a/program/src/rrd_open.c
+++ b/program/src/rrd_open.c
/*****************************************************************************
- * RRDtool 1.1.x Copyright Tobias Oetiker, 1997 - 2002
+ * RRDtool 1.2.5 Copyright by Tobi Oetiker, 1997-2005
*****************************************************************************
* rrd_open.c Open an RRD File
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.10 2004/05/26 22:11:12 oetiker
+ * reduce compiler warnings. Many small fixes. -- Mike Slifcak <slif@bellsouth.net>
+ *
* Revision 1.9 2003/04/29 21:56:49 oetiker
* readline in rrd_open.c reads the file in 8 KB blocks, and calls realloc for
* each block. realloc is very slow in Mac OS X for huge blocks, e.g. when
/* positioned to the first cdp in the first rra */
int
-rrd_open(char *file_name, FILE **in_file, rrd_t *rrd, int rdwr)
+rrd_open(const char *file_name, FILE **in_file, rrd_t *rrd, int rdwr)
{
rrd_init(rrd);
if (rdwr == RRD_READONLY) {
-#ifndef WIN32
- mode = "r";
-#else
mode = "rb";
-#endif
} else {
-#ifndef WIN32
- mode = "r+";
-#else
mode = "rb+";
-#endif
}
if (((*in_file) = fopen(file_name,mode)) == NULL ){
if (mem) free(mem);
}
-int readfile(char *file_name, char **buffer, int skipfirst){
+int readfile(const char *file_name, char **buffer, int skipfirst){
long writecnt=0,totalcnt = MEMBLK;
long offset = 0;
FILE *input=NULL;