diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-21 22:56:37 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-22 11:47:18 +0200 |
commit | 66ce00153bd35bb83a296f7eb31efec6d6e6768b (patch) | |
tree | f3afa343afd79ef7a854b21e15289c43d4537281 /src/calcurse.h | |
parent | 21fc7a4b7422f8b441a6266a11cc8e337aae190d (diff) | |
download | calcurse-66ce00153bd35bb83a296f7eb31efec6d6e6768b.zip |
Refactor new_tempfile()
Avoid preallocating buffers on the stack, use dynamic memory allocation
instead. Also, change the semantics of new_tempfile() so that it returns
the full name of the temporary file and fix all call sites.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 887e224..0fc3f62 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -117,7 +117,6 @@ #define STATUSHEIGHT 2 #define MAX_NOTESIZ 40 -#define TMPEXTSIZ 6 /* Format for appointment hours is: HH:MM */ #define HRMIN_SIZE 6 @@ -1032,7 +1031,7 @@ long now(void); char *nowstr(void); void print_bool_option_incolor(WINDOW *, unsigned, int, int); const char *get_tempdir(void); -char *new_tempfile(const char *, int); +char *new_tempfile(const char *); int check_date(unsigned, unsigned, unsigned); int parse_date(const char *, enum datefmt, int *, int *, int *, struct date *); |