mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Removed clashing of sopen in Windows.
This commit is contained in:
parent
b90e7fdacf
commit
4bf68b6204
4 changed files with 7 additions and 6 deletions
1
HISTORY
1
HISTORY
|
|
@ -10,6 +10,7 @@ SnapRAID HISTORY
|
|||
information for a potential GUI for SnapRAID.
|
||||
* Added a new "diff" command to print the list of changes detected
|
||||
at file level.
|
||||
* Faster loading of content file. Approx 3 times faster.
|
||||
|
||||
1.4 2011/6
|
||||
==========
|
||||
|
|
|
|||
4
state.c
4
state.c
|
|
@ -70,7 +70,7 @@ void state_config(struct snapraid_state* state, const char* path, int verbose, i
|
|||
fflush(stderr);
|
||||
}
|
||||
|
||||
f = sopen(path);
|
||||
f = sopen_read(path);
|
||||
if (!f) {
|
||||
if (errno == ENOENT) {
|
||||
fprintf(stderr, "No configuration file found at '%s'\n", path);
|
||||
|
|
@ -305,7 +305,7 @@ void state_read(struct snapraid_state* state)
|
|||
}
|
||||
printf("Loading state from %s...\n", path);
|
||||
|
||||
f = sopen(path);
|
||||
f = sopen_read(path);
|
||||
if (f != 0) {
|
||||
/* if openend stop the search */
|
||||
break;
|
||||
|
|
|
|||
2
util.c
2
util.c
|
|
@ -86,7 +86,7 @@ char* strdechex(void* void_data, unsigned data_len, char* str)
|
|||
/****************************************************************************/
|
||||
/* stream */
|
||||
|
||||
STREAM* sopen(const char* file)
|
||||
STREAM* sopen_read(const char* file)
|
||||
{
|
||||
STREAM* s = malloc_nofail(sizeof(STREAM));
|
||||
|
||||
|
|
|
|||
6
util.h
6
util.h
|
|
@ -56,7 +56,7 @@ typedef struct stream STREAM;
|
|||
/**
|
||||
* Open a stream for reading. Like fopen().
|
||||
*/
|
||||
STREAM* sopen(const char* file);
|
||||
STREAM* sopen_read(const char* file);
|
||||
|
||||
/**
|
||||
* Close a stream. Like fclose().
|
||||
|
|
@ -79,7 +79,7 @@ static inline int sptrlookup(STREAM* s, int size)
|
|||
/**
|
||||
* Gets the current stream ptr.
|
||||
*/
|
||||
unsigned char* sptrget(STREAM* s)
|
||||
static inline unsigned char* sptrget(STREAM* s)
|
||||
{
|
||||
return s->pos;
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ unsigned char* sptrget(STREAM* s)
|
|||
/**
|
||||
* Set the current stream ptr.
|
||||
*/
|
||||
void sptrset(STREAM* s, unsigned char* ptr)
|
||||
static inline void sptrset(STREAM* s, unsigned char* ptr)
|
||||
{
|
||||
s->pos = ptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue