b5ee94956f
The callback takes a pointer to be able to pass arbitrary data, but instead of allocating an int and passing a pointer to it, the code jams the int directly into the pointer for an int -> pointer -> int roundtrip. Problem reported by and discussed with jca@. Fix implicit function declarations.
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
Index: note.c
|
|
--- note.c.orig
|
|
+++ note.c
|
|
@@ -97,6 +97,7 @@ static char *RCSid = "$Header: /home/harbor/davy/stuff
|
|
#include <X11/Intrinsic.h>
|
|
#include <X11/Xaw/AsciiText.h>
|
|
#include <X11/Xaw/Command.h>
|
|
+#include <X11/Xaw/Dialog.h>
|
|
#include <X11/Xaw/Form.h>
|
|
#include <X11/Shell.h>
|
|
#include <sys/param.h>
|
|
@@ -105,7 +106,10 @@ static char *RCSid = "$Header: /home/harbor/davy/stuff
|
|
#else
|
|
#include <sys/dir.h>
|
|
#endif
|
|
+#include <sys/stat.h>
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
|
|
#include "xpostit.h"
|
|
#include "vroot.h"
|
|
@@ -135,6 +139,7 @@ static void CancelDestroy();
|
|
static void ConfirmDestroy();
|
|
static void MakeNoteWidget();
|
|
static void NoteProtocolsHandler();
|
|
+static void GetNotePosition();
|
|
|
|
static XtEventHandler StructureNotifyHandler();
|
|
|
|
@@ -238,7 +243,6 @@ LoadSavedNotes()
|
|
{
|
|
DIR *dp;
|
|
FILE *fp;
|
|
- char *realloc();
|
|
register PostItNote *pn;
|
|
#if defined(USG) || defined(SYSV) || defined(SVR4)
|
|
register struct dirent *d;
|
|
@@ -1169,6 +1173,7 @@ NoteIndex()
|
|
*
|
|
* Thanks to Stewart Levin for the original code.
|
|
*/
|
|
+static void
|
|
GetNotePosition(w, x, y)
|
|
int *x, *y;
|
|
Widget w;
|