kopia lustrzana https://gitlab.com/sane-project/website
105 wiersze
3.7 KiB
HTML
105 wiersze
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: New sanei_config_read() replaces fgets()</TITLE>
|
|
<META NAME="Author" CONTENT="Yuri Dario (mc6530@mclink.it)">
|
|
<META NAME="Subject" CONTENT="New sanei_config_read() replaces fgets()">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>New sanei_config_read() replaces fgets()</H1>
|
|
<!-- received="Sun Feb 20 11:29:33 2000" -->
|
|
<!-- isoreceived="20000220192933" -->
|
|
<!-- sent="Sun, 20 Feb 2000 20:30:56 +0100 (CET)" -->
|
|
<!-- isosent="20000220193056" -->
|
|
<!-- name="Yuri Dario" -->
|
|
<!-- email="mc6530@mclink.it" -->
|
|
<!-- subject="New sanei_config_read() replaces fgets()" -->
|
|
<!-- id="200002201929.UAA04062@mail1.mclink.it" -->
|
|
<STRONG>From:</STRONG> Yuri Dario (<A HREF="mailto:mc6530@mclink.it?Subject=Re:%20New%20sanei_config_read()%20replaces%20fgets()&In-Reply-To=<200002201929.UAA04062@mail1.mclink.it>"><EM>mc6530@mclink.it</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Sun Feb 20 2000 - 11:30:56 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0250.html">Chris Pinkham: "Re: some backends return invalid pointers"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0248.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#249">[ date ]</A>
|
|
<A HREF="index.html#249">[ thread ]</A>
|
|
<A HREF="subject.html#249">[ subject ]</A>
|
|
<A HREF="author.html#249">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Hi,
|
|
<BR>
|
|
<P>in the latest CVS a new function has been added to sanei_config.c.
|
|
<BR>
|
|
<P>It is named sanei_config_read() and has the same prototype of fgets().
|
|
<BR>
|
|
The purpouse of this function is to remove all whitespaces from the
|
|
<BR>
|
|
current stream line. Actually when fgets() read a line, it is
|
|
<BR>
|
|
terminated with \n under unix and with \r\n under OS/2. So most
|
|
<BR>
|
|
backends (while reading configuration files) fails to identify tokens
|
|
<BR>
|
|
because of an unwanted \r at end of line.
|
|
<BR>
|
|
<P>Currently sanei_config_read() does a fgets() and then removes all
|
|
<BR>
|
|
trailing/ending whitespaces. Parameters and return values are the same
|
|
<BR>
|
|
of fgets(), so you need only to change the function name.
|
|
<BR>
|
|
<P>Maybe other functions can be added to sanei_config_read(), such as
|
|
<BR>
|
|
ignoring comments.
|
|
<BR>
|
|
<P>Bye,
|
|
<BR>
|
|
<P> Yuri Dario
|
|
<BR>
|
|
<P>/*
|
|
<BR>
|
|
* member of TeamOS/2 - Italy
|
|
<BR>
|
|
* <A HREF="http://www.quasarbbs.com/yuri">http://www.quasarbbs.com/yuri</A>
|
|
<BR>
|
|
*/
|
|
<BR>
|
|
<P><P><P><P><P><PRE>
|
|
--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20New%20sanei_config_read()%20replaces%20fgets()&In-Reply-To=<200002201929.UAA04062@mail1.mclink.it>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0250.html">Chris Pinkham: "Re: some backends return invalid pointers"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0248.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#249">[ date ]</A>
|
|
<A HREF="index.html#249">[ thread ]</A>
|
|
<A HREF="subject.html#249">[ subject ]</A>
|
|
<A HREF="author.html#249">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Sun Feb 20 2000 - 11:31:09 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|