From c15c1e3dd83af5ea24cb2e01d2942bd221f86fc4 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 1 May 2005 18:30:53 +0000 Subject: [PATCH] renaming c_stream_error to io_error --- native/io.c | 8 ++++---- native/io.h | 2 +- native/unix/file.c | 2 +- native/unix/signal.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/native/io.c b/native/io.c index cbe19d0caa..642753ba4b 100644 --- a/native/io.c +++ b/native/io.c @@ -24,7 +24,7 @@ void init_c_io(void) userenv[OUT_ENV] = tag_object(alien(stdout)); } -void c_stream_error(void) +void io_error(void) { CELL error = tag_object(from_c_string(strerror(errno))); general_error(ERROR_IO,error); @@ -39,7 +39,7 @@ void primitive_fopen(void) path = unbox_c_string(); file = fopen(path,mode); if(file == NULL) - c_stream_error(); + io_error(); box_alien(file); } @@ -58,7 +58,7 @@ void primitive_fgets(void) if(feof(file)) dpush(F); else - c_stream_error(); + io_error(); } else dpush(tag_object(from_c_string(line))); @@ -74,7 +74,7 @@ void primitive_fwrite(void) if(fwrite(to_c_string_unchecked(text),1, untag_fixnum_fast(text->length), file) == 0) - c_stream_error(); + io_error(); } void primitive_fflush(void) diff --git a/native/io.h b/native/io.h index 8212532b1f..72ddd77912 100644 --- a/native/io.h +++ b/native/io.h @@ -1,6 +1,6 @@ int factor_errno(void); void init_c_io(void); -void c_stream_error(void); +void io_error(void); void primitive_fopen(void); void primitive_fwrite(void); void primitive_fflush(void); diff --git a/native/unix/file.c b/native/unix/file.c index b324d8043e..da343f4df3 100644 --- a/native/unix/file.c +++ b/native/unix/file.c @@ -59,7 +59,7 @@ void primitive_cwd(void) char wd[MAXPATHLEN]; maybe_garbage_collection(); if(getcwd(wd,MAXPATHLEN) < 0) - c_stream_error(); + io_error(); box_c_string(wd); } diff --git a/native/unix/signal.c b/native/unix/signal.c index 375ea11b30..f05aff7676 100644 --- a/native/unix/signal.c +++ b/native/unix/signal.c @@ -81,5 +81,5 @@ void primitive_call_profiling(F_WORD *word) } if(setitimer(ITIMER_PROF,&prof_timer,NULL) < 0) - c_stream_error(); + io_error(); }