Hello,
Here's a patch that adds the missing includes, function declarations,
and the return value for main().
Best Regards,
Marek
Description: Fix build on GCC-14
Fix several warnings that were turned into errors in GCC-14:
* Implicit declaration of functions
* Implicit return type for main function
Author: Marek Benc <benc.marek.elektr...@proton.me>
Bug-Debian: https://bugs.debian.org/1075535
Last-Update: 2025-04-11
--- src2tex-2.12h.orig/fileio.c
+++ src2tex-2.12h/fileio.c
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
int Page_Len_Max = -1;
--- src2tex-2.12h.orig/getdata.c
+++ src2tex-2.12h/getdata.c
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
--- src2tex-2.12h.orig/modflag.c
+++ src2tex-2.12h/modflag.c
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
extern int BAS_flag;
--- src2tex-2.12h.orig/options.c
+++ src2tex-2.12h/options.c
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
extern int *inc_buf_ptr();
--- src2tex-2.12h.orig/src2tex.c
+++ src2tex-2.12h/src2tex.c
@@ -604,6 +604,7 @@ gives the {\sl sqrt\_mat.red.ps} file.
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
extern void get_fnames();
@@ -611,12 +612,13 @@ extern void init_lang_flag();
extern void open_files();
extern void close_files();
extern void text2tex();
+extern int get_bf_flag();
/* {\hrulefill\ main function of src2tex\ \hrulefill} */
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{
--- src2tex-2.12h.orig/text2tex.c
+++ src2tex-2.12h/text2tex.c
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include "src2tex.h"
extern int TXT_flag;
@@ -49,6 +50,7 @@ extern int *get_phrase();
extern int search_line();
extern int get_comment_flag();
extern int get_tex_flag();
+extern int get_bf_flag();
extern int str_cmp();
extern int parse_options();