Slashdot Mirror


Using Enlightenment 17's Epeg API (Part Deux)

jjrff writes "The Enlightenment project has turned up some really cool bits lately. here is a nifty article about using their Epeg bits to easily deal with thumbnailing. Note that they also have a great deal of sample code for things like canvasing and even dealing with network delivery."

1 of 29 comments (clear)

  1. Hello, moron alert by Nevyn · · Score: 1, Insightful
    directory handling interfaces are all that need to be added, plus a few defines:
    [...]
    #define LEN 1024
    [...]
    the LEN value is the standard string length - this can also be grokked from the limits.h file.
    [...]
    static char path[LEN];

    strcpy(path, dir);
    strcat(path, /);
    strcat(path, file);

    return (path);

    Hmm. So there's this limit called PATH_MAX, and instead of using it we'll just type the number in? Not to mention that nothing stops something passing strings bigger than that to your application, PATH_MAX is just the max size you can pass to open() etc. Oh, but it gets better:

    % egrep PATH_MAX /usr/include/linux/limits.h
    /usr/include/linux/li mits.h:#define PATH_MAX 4096 /* # chars in a path name including nul */

    Muhahhahaha. It's an article written by someone with no clue, about an API that noone uses ... /. says: +8 insightful.

    --
    ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B