aboutsummaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorzoulasc <zoulasc@users.noreply.github.com>2020-02-06 14:25:36 -0500
committerGitHub <noreply@github.com>2020-02-06 21:25:36 +0200
commit110bdc6b3e807bd672bf3b1113d01d71744a797a (patch)
tree4afaceaf0019e98f5dcf565b7525bd15420d404f /proto.h
parent768d6b58865eb9b0ff5ebd4ef430b767d2108224 (diff)
downloadone-true-awk-110bdc6b3e807bd672bf3b1113d01d71744a797a.tar.gz
misc fixes (#69)
* Add a test for german case folding. * Add a function to copy a string with a string with a larger allocation (to be used by the case folding routines) * Add printf attributes to the printf-like functions and fix one format warning * Cleanup the tempfree macro * make more functions static * rename fp to frp (FRame Pointer) to avoid shadowing with fp (File Pointer). * add more const * fix indent in UPLUS case * add locale-aware case folding * make nfiles size_t * fix bugs in file closing: - compare fclose to EOF and pclose to -1 - use nfiles instead of FOPEN_MAX in closeall - don't close files we did not open (0,1,2) fpurge/fflush instead * - use NUL instead of 0 for char comparisons - add ISWS() macro - use continue; instead of ; * Check for existance of the german locale before using it. * Add missing parentheses, thanks Arnold.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/proto.h b/proto.h
index 6918e1f..aac2547 100644
--- a/proto.h
+++ b/proto.h
@@ -111,6 +111,7 @@ extern double getfval(Cell *);
extern char *getsval(Cell *);
extern char *getpssval(Cell *); /* for print */
extern char *tostring(const char *);
+extern char *tostringN(const char *, size_t);
extern char *qstring(const char *, int);
extern Cell *catstr(Cell *, Cell *);
@@ -135,9 +136,12 @@ extern void yyerror(const char *);
extern void fpecatch(int);
extern void bracecheck(void);
extern void bcheck2(int, int, int);
-extern void SYNTAX(const char *, ...);
-extern void FATAL(const char *, ...) __attribute__((__noreturn__));
-extern void WARNING(const char *, ...);
+extern void SYNTAX(const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+extern void FATAL(const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2), __noreturn__));
+extern void WARNING(const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
extern void error(void);
extern void eprint(void);
extern void bclass(int);