Merge pull request #25 from Rubear/master

Breaking out of comments now breaks out of all comments
Merge pull request #26 from Rubear/master

Selected comment stays selected after getting more posts and self posts ...
Initial commit of completely redone reddit API

It's still way to buggy and incomplete for full use, but the basics for
logging into reddit, getting a list of links either from front or from a
subreddit, and getting comments is done for the most part.

Things to be completed:
  Fix the 'morechildren' API call for comments
  Implement the full reddit API
  Implement getting subreddit info
  Change syntax into Camel-Case to match coding style of cReddit
Small fixes as well as simplifying Cookie list structure

Global_State uses a linked-list of cookies. This patch makes the
linked-list add new cookies to the beginning instead of the end (Getting
rid of the need to have a pointer to the end of the cookie list, and
simplifying some code.)

This patch also has some minor syntax fixes.
Changing structure's to use camel-case
Change functions and variables into camel-case
Give API wide-character support, and implement it in cReddit

While normal ASCII/UTF-8 works well for the majority of the text
gathered from Reddit, Reddit does use Unicode via \u escape sequences.
This patch implements a parser for Reddit's escape sequences, and
provides wchar_t versions of body text and title text with proper
unicode characters (The normal char* still work fine, they simply now
lack the Unicode characters completely).

To implement this into cReddit, Ncurses was switched over to use
wide-character support, along with most of the cReddit internals.
locale.h and setlocale() are used to make sure the correct text encoding
setting is setup on program start.
Basic UI updates and Reddit API improvements

The UI now detects the terminal size and adjusts output acordingly.
Each link is now limited to one line of text on the screen and
scrolling through the links works correctly.

The Reddit API now implements all the links inside of a RedditLinkList
structure as a simple array of pointers instead of a linked-list
structure (Since random-access to individual links is usually needed, a
linked-list is not very efficent and shouldn't have been used to begin
with).
Changing line rendering so they are rendered into a persistant buffer

Before lines were rendered directly to a temporary buffer and then
printed on the screen. This changes it so instead a persistant buffer of
lines is kept and displayed/updated when nessisary.
Updating documentation

Updated the documentation in ./include/reddit.h as well as added a
README.md file to the ./libreddit folder.
Updating libreddit in-code documentation

This commit cleans up the comments in libreddit, to reflect all the
changes that it has gone through and make sure no comments were stale.
Implemented viewable comments in main.c

Displaying comments was disabled in main.c while libreddit was being
worked on. This commit fixes this by implementing a new screen for
comments to be displayed with. By default, comments are viewed like the
links screen, with the difference being that if you press enter the
screen will split with the comments full text on the bottom of the
screen.
Adding new options to Link screen and cleaning up project

While on the Link screen you can new update the list with 'u' and get
more Links for the list with 'L'.

'Free' functions in libreddit now simply return if you send them a NULL
pointer.

The 'erase()' call in the drawing functions was removed, and instead
blank lines are printed in the areas that need to be cleared. The
advantage here is that ncurses will optomise which parts of the screen
to redraw if you don't call erase() (Which forces it to redraw
everything). The result is much lower CPU usage and a faster program.
Update README.md and add TODO.md

This simply updates README.md to reflect the current state of the
project, and adds TODO.md to list things that could be worked on in the
project.
Reddit-api merge