Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions hhss/c/rtdbparse.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "rtdbparse.h"
#include "rtdbparse.internals.h"

#include <setjmp.h>

static jmp_buf env;

extern array_t *rtdbparse(array_t *linestr) {
array_t *table, *sectarr;
char *sectname;
Expand Down
3 changes: 3 additions & 0 deletions hhss/c/rtdbparse.internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* INCLUDES *
************/
#include <ctype.h>
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#
Expand Down Expand Up @@ -41,6 +42,8 @@ static void synerr(void);
********************/
static const char *whitespaces = " \a\b\t\n\v\f\r";
Comment thread
logic-finder marked this conversation as resolved.

static jmp_buf env;

static array_t *ls;
static line_t *l;
static size_t idx, len;
Expand Down
2 changes: 0 additions & 2 deletions lib/readline.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "readline.h"
#include "readline.internals.h"

static const char *errmsg = "unable to read";

extern int readln(FILE *fp, char **line, size_t *len) {
int ch;
size_t pos, bufsiz;
Expand Down
5 changes: 5 additions & 0 deletions lib/readline.internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@
**********/
#define READLINE_UNIT 64

/********************
* STATIC VARIABLES *
********************/
static const char *errmsg = "unable to read";

#endif
4 changes: 0 additions & 4 deletions lib/wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ extern void safe_fputs(FILE *stream, const char *line) {
/************
* stdlib.h *
************/
static const char *realloc_errmsg = "realloc error";

extern void *safe_malloc(size_t siz) {
void *ret = malloc(siz);
if (!ret) ERR("malloc error");
Expand Down Expand Up @@ -66,8 +64,6 @@ extern void *safe_realloc2x_arr(void *orig_arr, size_t *cnt, size_t esiz) {
/************
* stdarg.h *
************/
static const char *vfprintf_errmsg = "vfprintf error";

extern void safe_fprintf(FILE *stream, const char *format, ...) {
va_list ap;
int ret;
Expand Down
6 changes: 6 additions & 0 deletions lib/wrappers.internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
#
#include "fatal.h"

/********************
* STATIC VARIABLES *
********************/
static const char *realloc_errmsg = "realloc error";
static const char *vfprintf_errmsg = "vfprintf error";

#endif
Loading