File gramofile-codecleanup.dif of Package gramofile

--- gramofile-1.6/bplaysrc/bplay.c
+++ gramofile-1.6/bplaysrc/bplay.c
@@ -30,7 +30,7 @@
 
 #include "../yesnowindow.h"
 void init_curses(void);
-void finish_curses(int sig);
+void finish_curses(int sig) __attribute__((noreturn));
 #include "../errorwindow.h"
 #include "../clrscr.h"
 #include "../reclp_main.h"
@@ -91,7 +91,7 @@
 extern void cleanupsems(void);
 
 
-void main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	
 	int recorder = 0;		/* 1 if recording, 0 else */
@@ -110,7 +110,7 @@
 
 	init_curses();
 
-#ifdef linux
+#ifdef __GLIBC__
 	progname = basename(argv[0]);	/* For errors */
 #else
 	progname = strrchr(argv[0], '/');  /* Replacement for e.g. FreeBSD */
--- gramofile-1.6/clrscr.c
+++ gramofile-1.6/clrscr.c
@@ -8,6 +8,7 @@
  */
 
 #include "clrscr.h"
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/errorwindow.c
+++ gramofile-1.6/errorwindow.c
@@ -11,6 +11,7 @@
 #include "buttons.h"
 #include "boxes.h"
 #include "textwindow.h"
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/gramofile.c
+++ gramofile-1.6/gramofile.c
@@ -12,6 +12,7 @@
 #include <signal.h>
 #include <unistd.h>
 #include <string.h>
+#include <stdlib.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
@@ -36,14 +37,14 @@
 }
 
 static void
-finishmenu (int sig)
+__attribute__((noreturn)) finishmenu (int sig)
 {
   endwin ();
   exit (0);
 }
 
-void
-main (void)
+int
+main (int argc, char *argv[])
 {
   char startdir[250];
   char *helpcharptr;
--- gramofile-1.6/mainmenu.c
+++ gramofile-1.6/mainmenu.c
@@ -21,6 +21,7 @@
 #include "tracksplit.h"
 #include <stdlib.h>
 #include <unistd.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_cmf.c
+++ gramofile-1.6/signpr_cmf.c
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_cmf2.c
+++ gramofile-1.6/signpr_cmf2.c
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_doubmed.c
+++ gramofile-1.6/signpr_doubmed.c
@@ -17,6 +17,7 @@
 #include "helpline.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_mean.c
+++ gramofile-1.6/signpr_mean.c
@@ -17,6 +17,7 @@
 #include "helpline.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_median.c
+++ gramofile-1.6/signpr_median.c
@@ -17,6 +17,7 @@
 #include "helpline.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/signpr_rms.c
+++ gramofile-1.6/signpr_rms.c
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/stringinput.c
+++ gramofile-1.6/stringinput.c
@@ -8,6 +8,7 @@
  */
 
 #include "stringinput.h"
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/tracksplit_parammenu.c
+++ gramofile-1.6/tracksplit_parammenu.c
@@ -16,6 +16,7 @@
 #include "helpline.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else
--- gramofile-1.6/yesnowindow.c
+++ gramofile-1.6/yesnowindow.c
@@ -11,6 +11,7 @@
 #include "buttons.h"
 #include "boxes.h"
 #include "textwindow.h"
+#include <string.h>
 #ifndef OLD_CURSES
 #include <ncurses.h>
 #else