Drop nonsensical inlines (also matches upstream) for clang.

Fix a glaring misunderstanding how array parameters work in C, while here.
This commit is contained in:
naddy 2017-05-07 01:05:10 +00:00
parent 4426be94c9
commit f9cb59aae5
4 changed files with 76 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.11 2017/04/10 11:45:27 sthen Exp $
# $OpenBSD: Makefile,v 1.12 2017/05/07 01:05:10 naddy Exp $
COMMENT = simple, fast GTK-based text editor
DISTNAME = tpad-5.7.1.3
CATEGORIES = editors x11
REVISION = 2
REVISION = 3
HOMEPAGE = https://launchpad.net/tpad-project/

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-src_tpad_open_guard_c,v 1.1 2017/05/07 01:05:10 naddy Exp $
Index: src/tpad_open_guard.c
--- src/tpad_open_guard.c.orig
+++ src/tpad_open_guard.c
@@ -49,14 +49,11 @@ void tpad_open_guard_cln () {
itempFilePathSize=0;
iswpFilePathSize=0;
ilockFilePathSize=0;
- tpad_clear_char_array(path_temp_file);
- tpad_clear_char_array(path_swp_file);
- tpad_clear_char_array(path_lock_file);
+ memset(path_temp_file, 0, sizeof(path_temp_file));
+ memset(path_swp_file, 0, sizeof(path_swp_file));
+ memset(path_lock_file, 0, sizeof(path_lock_file));
}
-void tpad_clear_char_array(char arr[]){
- memset(&arr[0], 0, sizeof(arr));
-}
gint tpad_open_guard_init(){
tpad_open_guard_cln ();
icurrentfile_size=strlen(currentfile);
@@ -139,4 +136,4 @@ if(ihaveTemp == 0 && currentfile && path_temp_file) {
fclose(origFile);
free (buffer);
}
-}
\ No newline at end of file
+}

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-src_tpad_print_c,v 1.1 2017/05/07 01:05:10 naddy Exp $
Index: src/tpad_print.c
--- src/tpad_print.c.orig
+++ src/tpad_print.c
@@ -21,13 +21,13 @@
********************************************************************************/
#include "tpad_headers.h"
-inline void print(gchar *s){
+void print(gchar *s){
#ifdef DEBUG_TOGGLE
g_print("tpad(v.%s): %s\n",VERSION,s);
#endif
}
-inline void print_title(gchar* str){
+void print_title(gchar* str){
#ifdef DEBUG_TOGGLE
gint ihHash=0, ihStr=0,ihTmp=0;
register gint i=0;
@@ -48,4 +48,4 @@ inline void print_title(gchar* str){
}
printf("\n");
#endif
-}
\ No newline at end of file
+}

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_tpad_print_h,v 1.1 2017/05/07 01:05:10 naddy Exp $
Index: src/tpad_print.h
--- src/tpad_print.h.orig
+++ src/tpad_print.h
@@ -34,6 +34,6 @@
#include <wchar.h>
#include <glib/gprintf.h>
#define HASH_PRINT_COUNT 52
-inline void print(gchar *s);
-inline void print_title(gchar* str);
-#endif
\ No newline at end of file
+void print(gchar *s);
+void print_title(gchar* str);
+#endif