New sanei_config_read() replaces fgets()

From: Yuri Dario (mc6530@mclink.it)
Date: Sun Feb 20 2000 - 11:30:56 PST

  • Next message: Yuri Dario: "New sanei_config_read() replaces fgets()"

    Hi,

    in the latest CVS a new function has been added to sanei_config.c.

    It is named sanei_config_read() and has the same prototype of fgets().
    The purpouse of this function is to remove all whitespaces from the
    current stream line. Actually when fgets() read a line, it is
    terminated with \n under unix and with \r\n under OS/2. So most
    backends (while reading configuration files) fails to identify tokens
    because of an unwanted \r at end of line.

    Currently sanei_config_read() does a fgets() and then removes all
    trailing/ending whitespaces. Parameters and return values are the same
    of fgets(), so you need only to change the function name.

    Maybe other functions can be added to sanei_config_read(), such as
    ignoring comments.

    Bye,

            Yuri Dario

    /*
     * member of TeamOS/2 - Italy
     * http://www.quasarbbs.com/yuri
     */

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Sun Feb 20 2000 - 11:30:33 PST