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;
@@ -650,7 +654,7 @@ PostItNote *pn;
 	 * Add an event handler to keep track of the iconification state.
 	 */
 	XtAddEventHandler(pn->pn_shellwidget, StructureNotifyMask, False,
-		(XtEventHandler *) StructureNotifyHandler, (XtPointer) pn);
+		(XtEventHandler) StructureNotifyHandler, (XtPointer) pn);
 
 	/*
 	 * Realize the note.
@@ -1169,6 +1173,7 @@ NoteIndex()
  *
  *		     Thanks to Stewart Levin for the original code.
  */
+static void
 GetNotePosition(w, x, y)
 int *x, *y;
 Widget w;
