linput: Rewrite input parsing completely
commitd92133c025a3caea41a53c5f1989ac7d8f29d2f6
authorToni Gundogdu <legatvs@gmail.com>
Thu, 17 Oct 2013 18:02:08 +0000 (17 21:02 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Sun, 20 Oct 2013 16:21:31 +0000 (20 19:21 +0300)
treebe032b5c2e108e0290d4b7c529ba7f8f544908ce
parentd796a73a73d62db48c1d8f9bb1691fa3f92d5aec
linput: Rewrite input parsing completely

* FIX (memory leak): Release the GIOChannel created for the stdin
  by decrementing the reference count of the <stdin> GIOChannel

* Do not unescape input URLs
  - This was previously done because quvi-dump shamelessly escaped the
    URLs completely (incl. the "reserved chars") and g_uri_parse_scheme,
    which linput calls (to determine the action it should take with the
    input URL), couldn't parse the escaped URI schemes otherwise

  - Any normal applications leave the "reserved chars" unescaped, e.g.
    the web browsers

* linput_new now returns an integer, indicating the success
  - Program now exits if input parsing failed (e.g. invalid URI)

* Follow file URIs
  - Making it possible to pass "file://" URIs to the program

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
src/input/linput.c
src/input/linput.h