sane-project-website/old-archive/2000-02/0248.html

107 wiersze
3.9 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:04 2000" -->
<!-- isoreceived="20000220192904" -->
<!-- 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.UAA04051@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=&lt;200002201929.UAA04051@mail1.mclink.it&gt;"><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="0249.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0247.html">Yuri Dario: "Epson backend patch"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0249.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#248">[ date ]</A>
<A HREF="index.html#248">[ thread ]</A>
<A HREF="subject.html#248">[ subject ]</A>
<A HREF="author.html#248">[ 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Yuri Dario
<BR>
<P>/*
<BR>
&nbsp;* member of TeamOS/2 - Italy
<BR>
&nbsp;* <A HREF="http://www.quasarbbs.com/yuri">http://www.quasarbbs.com/yuri</A>
<BR>
&nbsp;*/
<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=&lt;200002201929.UAA04051@mail1.mclink.it&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0249.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0247.html">Yuri Dario: "Epson backend patch"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0249.html">Yuri Dario: "New sanei_config_read() replaces fgets()"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#248">[ date ]</A>
<A HREF="index.html#248">[ thread ]</A>
<A HREF="subject.html#248">[ subject ]</A>
<A HREF="author.html#248">[ 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:30:33 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>