openbsd-ports/editors/textedit/patches/patch-aa
2003-12-31 03:39:36 +00:00

62 lines
1.6 KiB
Plaintext

--- textedit.c.orig 1995-04-19 00:53:43.000000000 +0200
+++ textedit.c 2003-12-30 17:19:49.000000000 +0100
@@ -17,7 +17,7 @@ static char sccsid[] = "@(#)textedit.c 1
#include <fcntl.h>
#include <stdio.h>
-#include <strings.h>
+#include <string.h>
#include <X11/X.h>
#include <xview/defaults.h>
#include <xview/font.h>
@@ -31,19 +31,11 @@ static char sccsid[] = "@(#)textedit.c 1
#include <xview/sel_svc.h>
#include <xview/sel_attrs.h>
-#ifdef ecd.help
+#ifdef ecd_help
#include <suntool/help.h>
#endif
-/*
- * The presence of this line caused textedit not to be built
- * The function is already defined in the XView libraries
-long textsw_store_file();
-*/
-char *getwd();
-#ifndef __linux
-char *sprintf();
-#endif
+static void die(char *m1, char *m2, char *m3);
void frame_cmdline_help();
static int off();
static Notify_value mysigproc();
@@ -312,7 +304,8 @@ Update_icon_text:
if (pass_on)
(void)textsw_default_notify(textsw_local, attributes);
if (repaint) {
- (void)sprintf(frame_label, "%s Text Editor - %s%s, dir; %s",
+ (void)snprintf(frame_label, sizeof(frame_label),
+ "%s Text Editor - %s%s, dir; %s",
(caps_lock_on) ? "[CAPS] " : "",
current_filename,
(was_read_only) ? " (read only)"
@@ -521,7 +514,7 @@ textedit_main(argc, argv)
FRAME_LABEL, "Text Editor",
FRAME_SHOW_LABEL, TRUE,
FRAME_CMDLINE_HELP_PROC, my_frame_help,
-#ifdef ecd.help
+#ifdef ecd_help
HELP_DATA, "sunview:textedit",
#endif
0);
@@ -998,7 +991,7 @@ Die:
/*
* Misc. utilities
*/
-static
+static void
die(msg1, msg2, msg3)
char *msg1, *msg2, *msg3;
{