diff options
author | kaa <kaa@disroot.org> | 2023-07-05 12:01:30 -0700 |
---|---|---|
committer | kaa <kaa@disroot.org> | 2023-07-05 12:01:30 -0700 |
commit | d72126cc5efc1cc5cca2de8960b13a24fee1c7e2 (patch) | |
tree | 5f7e4784110683e9160b827dd426f2e3802d51f7 /shared.h | |
parent | 94e0fbe794455d3e61ffcb5b2a34918ddd12949b (diff) | |
download | neocities-d72126cc5efc1cc5cca2de8960b13a24fee1c7e2.tar.gz |
storeline was really a worse and non-standard getline, so getline has replaced it.
Diffstat (limited to 'shared.h')
-rw-r--r-- | shared.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/shared.h b/shared.h index b4232ae..740984d 100644 --- a/shared.h +++ b/shared.h @@ -1,22 +1 @@ -static char * -storeline(FILE *in, int *end, int *len, int guess) -{ - static char *line; - line = calloc(guess, sizeof(char)); - int i = 0, buflen = guess; - char ch; - while ((ch = fgetc(in)) != EOF && ch != '\n') { - if (i == buflen - 1) { - buflen += guess; - line = realloc(line, buflen * sizeof(char)); - } - line[i] = ch; - ++i; - } - line[i] = '\0'; - *len = i; - if (ch == EOF) - *end = 1; - - return line; -} +char *site = "https://kaa.neocities.org/"; |