Skip to content

Commit

Permalink
Merge pull request #10 from devinsmith/master
Browse files Browse the repository at this point in the history
Small improvements
  • Loading branch information
Cotix committed Jul 16, 2013
2 parents 3865ea9 + c7a8b18 commit 1e0fa96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sh
@@ -1 +1 @@
gcc -g -o cReddit main.c reddit.c jsmn.c -lncurses `curl-config --libs`
gcc -g -o cReddit `curl-config --cflags` main.c reddit.c jsmn.c -lncurses `curl-config --libs`
11 changes: 8 additions & 3 deletions reddit.h
Expand Up @@ -6,9 +6,14 @@
#include <string.h>
#include "jsmn.h"
#include <curl/curl.h>

#define REDDIT_URL_BASE_LENGTH 21


/* REDDIT_URL_BASE_LENGTH captures the base URL, the trailing '/' after a
* subreddit and the ".json" suffix. Excluding the subreddit and sorting,
* it looks like the following: http://reddit.com/.json
* This is currently defined to be 23 bytes, we add 1 more for '\0'
* termination. */
#define REDDIT_URL_BASE_LENGTH 24

struct MemoryStruct {
char *memory;
size_t size;
Expand Down

0 comments on commit 1e0fa96

Please sign in to comment.