Better patches. fix the prototypes instead of casting.

This commit is contained in:
rohee 2000-07-26 20:57:20 +00:00
parent 607d30999a
commit c59df500e5
5 changed files with 60 additions and 23 deletions

View File

@ -1,23 +0,0 @@
"foo" is now a 'const char *' in C++ and thus can't be passed to a method
requiring a 'char *'.
--- abuse/src/dev.c.orig Wed Oct 20 23:18:11 1999
+++ abuse/src/dev.c Wed Oct 20 23:22:47 1999
@@ -2057,7 +2057,7 @@
{
if (!mess_win)
{
- mess_win=file_dialog(eh,symbol_str("level_name"),current_level ? current_level->name() : "",
+ mess_win=file_dialog(eh,symbol_str("level_name"),current_level ? current_level->name() : (char *) "",
ID_LEVEL_LOAD_OK,symbol_str("ok_button"),ID_CANCEL,symbol_str("cancel_button"),
symbol_str("FILENAME"),ID_MESS_STR1);
eh->grab_focus(mess_win);
@@ -2093,7 +2093,7 @@
{
if (!mess_win)
{
- mess_win=file_dialog(eh,symbol_str("saveas_name"),current_level ? current_level->name() : "untitled.spe",
+ mess_win=file_dialog(eh,symbol_str("saveas_name"),current_level ? current_level->name() : (char *) "untitled.spe",
ID_LEVEL_SAVEAS_OK,symbol_str("ok_button"),
ID_CANCEL,symbol_str("cancel_button"),
symbol_str("FILENAME"),ID_MESS_STR1);

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-filesel_c,v 1.1 2000/07/26 20:57:20 rohee Exp $
Match patch-filesel_hpp
--- imlib/filesel.c.orig Wed Jul 26 22:04:25 2000
+++ imlib/filesel.c Wed Jul 26 22:04:55 2000
@@ -108,7 +108,7 @@
reconfigure();
}
-jwindow *file_dialog(window_manager *wm, char *prompt, char *def,
+jwindow *file_dialog(window_manager *wm, char *prompt, const char *def,
int ok_id, char *ok_name, int cancel_id, char *cancel_name, char *FILENAME_str, int filename_id)
{
int wl=WINDOW_FRAME_LEFT,wh=WINDOW_FRAME_TOP;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-filesel_hpp,v 1.1 2000/07/26 20:57:20 rohee Exp $
"foobar" is now a const char *, so adjust the proto.
--- imlib/include/filesel.hpp.orig Wed Jul 26 21:44:47 2000
+++ imlib/include/filesel.hpp Wed Jul 26 21:45:52 2000
@@ -5,7 +5,7 @@
-jwindow *file_dialog(window_manager *wm, char *prompt, char *def,
+jwindow *file_dialog(window_manager *wm, char *prompt, const char *def,
int ok_id, char *ok_name, int cancel_id, char *cancel_name,
char *FILENAME_str,
int filename_id);

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-input_c,v 1.1 2000/07/26 20:57:20 rohee Exp $
Match patch-input_hpp
--- imlib/input.c.orig Wed Jul 26 22:10:46 2000
+++ imlib/input.c Wed Jul 26 22:11:41 2000
@@ -318,7 +318,7 @@
}
text_field::text_field(int X, int Y, int ID, char *Prompt, char *Format,
- char *Data, ifield *Next)
+ const char *Data, ifield *Next)
{
int slen=(strlen(Format)>strlen(Data) ? strlen(Format) : strlen(Data));

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-input_hpp,v 1.1 2000/07/26 20:57:21 rohee Exp $
"foobar" is now a const char *, so adjust the proto.
--- imlib/include/input.hpp.orig Wed Jul 26 22:08:49 2000
+++ imlib/include/input.hpp Wed Jul 26 22:09:31 2000
@@ -64,7 +64,7 @@
}
public :
text_field(int X, int Y, int ID, char *Prompt, char *Format,
- char *Data, ifield *Next);
+ const char *Data, ifield *Next);
text_field(int X, int Y, int ID, char *Prompt, char *Format,
double Data, ifield *Next);