diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6a7d0bc390..6e35539492 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,16 @@ +19990619-14:00 Ryszard Glab + +* tests/working/testcgi.prg +* tests/working/testinc.prg + * changed the names of included files into lowercase + +* include/extend.h + + added include + +* source/rtl/set.c + + files created by SET PRINTER TO or SET ALTERNATE TO have now + changed permissions to write/read by user on UNIX like OS + 19990619-12:22 Ryszard Glab * include/hbsetup.h diff --git a/harbour/include/extend.h b/harbour/include/extend.h index ef068c1dbb..0bc7ba0b1c 100644 --- a/harbour/include/extend.h +++ b/harbour/include/extend.h @@ -10,6 +10,7 @@ #include #include #include +#include typedef struct /* symbol support structure */ { diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 806fed40f3..5bd86092ed 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -91,10 +91,22 @@ static char * set_string (PHB_ITEM pItem, char * old_str) return (string); } +static void close_binary( int handle ) +{ +#if defined(OS_UNIX_COMPATIBLE) + fchmod( handle, S_IRUSR|S_IWUSR ); +#endif + close( handle ); +} + static void close_text (int handle) { +#if defined(OS_UNIX_COMPATIBLE) + fchmod( handle, S_IRUSR|S_IWUSR ); +#else write (handle, "\x1A", 1); - close (handle); +#endif + close( handle ); } static int open_handle (char * file_name, BOOL bMode, char * def_ext) @@ -641,7 +653,7 @@ HARBOUR HB_SET (void) else bFlag = FALSE; if (args > 1) { - if (hb_set_printhan >= 0) close (hb_set_printhan); + if (hb_set_printhan >= 0) close_binary (hb_set_printhan); if (hb_set.HB_SET_PRINTFILE && strlen (hb_set.HB_SET_PRINTFILE) > 0) hb_set_printhan = open_handle (hb_set.HB_SET_PRINTFILE, bFlag, ".prn"); } @@ -736,7 +748,7 @@ void InitializeSets (void) void ReleaseSets (void) { if (hb_set_althan != -1) close_text (hb_set_althan); - if (hb_set_printhan != -1) close (hb_set_printhan); + if (hb_set_printhan != -1) close_binary (hb_set_printhan); if (hb_set.HB_SET_ALTFILE) hb_xfree (hb_set.HB_SET_ALTFILE); diff --git a/harbour/tests/working/testcgi.prg b/harbour/tests/working/testcgi.prg index f1a1953b5c..e9ce37c5c7 100644 --- a/harbour/tests/working/testcgi.prg +++ b/harbour/tests/working/testcgi.prg @@ -20,7 +20,7 @@ * **/ -#include "CGI.ch" +#include "cgi.ch" #define IF_BUFFER 65535 #define NewLine chr(10)+chr(13) diff --git a/harbour/tests/working/testinc.prg b/harbour/tests/working/testinc.prg index d7ce1f7a3b..dbf323a825 100644 --- a/harbour/tests/working/testinc.prg +++ b/harbour/tests/working/testinc.prg @@ -1,6 +1,6 @@ // Testing #includes -#include "Test.ch" +#include "test.ch" function Main()