Description: Fix FTBFS caused by -Werror=implicit-function-declaration
 In dpkg 1.22.6, it enabled -Werror=implicit-function-declaration.
 Thus we need to make sure every function has its definition.
Bug-Debian: http://bugs.debian.org/1066674
Author: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Last-Update: 2024-04-01
Index: gramophone2-0.8.13a/midifile.h
===================================================================
--- gramophone2-0.8.13a.orig/midifile.h
+++ gramophone2-0.8.13a/midifile.h
@@ -32,6 +32,11 @@ extern int (*Mf_writetempotrack)();
 float mf_ticks2sec();
 unsigned long mf_sec2ticks();
 void mfwrite();
+int mf_write_midi_event(unsigned long, unsigned int, unsigned int, unsigned char *, unsigned long);
+int mf_write_meta_event(unsigned long, unsigned char, unsigned char *, unsigned long);
+void mf_write_tempo(unsigned long);
+int eputc(unsigned char);
+int biggermsg();
 
 /* MIDI status commands most significant bit is 1 */
 #define note_off         	0x80
Index: gramophone2-0.8.13a/global.h
===================================================================
--- gramophone2-0.8.13a.orig/global.h
+++ gramophone2-0.8.13a/global.h
@@ -181,3 +181,33 @@ typedef struct macro_data {
 } macro;
 
 macro macros[NUM_MACRO];
+
+void usageError(void);
+unsigned int hash(char *v, unsigned char sentinel);
+void initGRAMophone(void);
+void init_local_flag(void);
+void init_player(void);
+int grammyvm();
+void print_local_params(unsigned char i);
+void print_composition_info();
+void print_global_params();
+void sntx_err(unsigned int error, char *msg);
+void dhInsert(pnote_var noteVar, char *text, unsigned char sentinel, unsigned char created_by_body);
+pnote_var dhSearch(char *v, unsigned char sentinel);
+char *dhSearch2(char *v);
+void code_update(unsigned int cc, unsigned int _goto);
+void gen_code(unsigned int op, unsigned int op1);
+void gen_code2(unsigned int op);
+void gen_code3(unsigned int op, unsigned type, unsigned op1);
+void gen_code4(unsigned int op, unsigned op1, unsigned op2, unsigned type);
+void gen_note_code(unsigned int op, unsigned int note, unsigned int type1,
+		   unsigned int op1, unsigned int type2, unsigned int op2,
+		   unsigned int type3, unsigned int op3, unsigned int type4,
+		   unsigned int op4);
+void gen_exp1_code(unsigned int op, unsigned int type1, unsigned int op1,
+		   unsigned int type2, unsigned int op2);
+void gen_exp2_code(unsigned int op, unsigned int op1, unsigned int type,
+		   unsigned int op2);
+void gen_exp3_code(unsigned int op, unsigned int type, unsigned int op1);
+void gen_exp4_code(unsigned int op);
+
Index: gramophone2-0.8.13a/GRAMophone.c
===================================================================
--- gramophone2-0.8.13a.orig/GRAMophone.c
+++ gramophone2-0.8.13a/GRAMophone.c
@@ -23,6 +23,7 @@
  */
 
 #include "global.h"
+#include "GRAMophone.tab.h"
 
 void version() {
   printf("\n---------------------------------------------------------\n");	
Index: gramophone2-0.8.13a/GRAMophone.l
===================================================================
--- gramophone2-0.8.13a.orig/GRAMophone.l
+++ gramophone2-0.8.13a/GRAMophone.l
@@ -38,6 +38,7 @@ char *string_buf_ptr;
 unsigned int countStr;
 unsigned int row=1;
 void count();
+int check_id();
 %}
 
 %x comment comment2 string incl
@@ -318,7 +319,7 @@ void count();
 %%
 
 #ifndef yywrap
-yywrap() {
+int yywrap() {
   return(1);
 }
 #endif
