Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/cpans.c b/cpans.c
index e3998ca..ef1f2e5 100644
--- a/cpans.c
+++ b/cpans.c
@@ -30,8 +30,8 @@ void slist_transform( const char * url , const char * sourcefile )
char datafile[128];
cpansearch_datafile( datafile );
- FILE *in = fopen( sourcefile , "r" );
- FILE *out = fopen( datafile , "w+" );
+ FILE *in = fopen( sourcefile , "rb" );
+ FILE *out = fopen( datafile , "wb+" );
char buffer[300];
int i;
@@ -93,7 +93,7 @@ char * slist_url()
char url[300];
cpansearch_datafile( datafile );
- in = fopen (datafile, "r+");
+ in = fopen (datafile, "rb+");
assert( in != NULL );
fread( url , 1 , 300 , in );
@@ -180,7 +180,7 @@ int search(const char * pattern)
cpansearch_datafile( datafile );
- in = fopen (datafile, "r+");
+ in = fopen (datafile, "rb+");
assert( in != NULL );
char url[300];
diff --git a/membuf.c b/membuf.c
index dd13eb1..ab82735 100644
--- a/membuf.c
+++ b/membuf.c
@@ -72,7 +72,7 @@ void membuf_writefile( membuf * mbuf , const char * file )
FILE *fp;
int idx = 0;
- fp = fopen( file , "w" );
+ fp = fopen( file , "wb" );
assert( fp != NULL );
while( idx < mbuf->index ) {
diff --git a/membuf.o b/membuf.o
deleted file mode 100644
index c2f16d6..0000000
Binary files a/membuf.o and /dev/null differ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.