Mail Archives: djgpp/2008/03/13/08:01:39
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | ANNOUNCE: libsupp 1.0 for DJGPP 2.03 and 2.04 uploaded.
|
Date: | Thu, 13 Mar 2008 05:55:33 -0700 (PDT)
|
Organization: | http://groups.google.com
|
Lines: | 221
|
Message-ID: | <2e4bc7d8-1faa-4ea0-8607-a168f4989c98@k13g2000hse.googlegroups.com>
|
NNTP-Posting-Host: | 88.68.48.192
|
Mime-Version: | 1.0
|
X-Trace: | posting.google.com 1205412933 32260 127.0.0.1 (13 Mar 2008 12:55:33 GMT)
|
X-Complaints-To: | groups-abuse AT google DOT com
|
NNTP-Posting-Date: | Thu, 13 Mar 2008 12:55:33 +0000 (UTC)
|
Complaints-To: | groups-abuse AT google DOT com
|
Injection-Info: | k13g2000hse.googlegroups.com; posting-host=88.68.48.192;
|
| posting-account=OsAajgoAAADdKJnkJkmhzqP0jo6I_P_0
|
User-Agent: | G2/1.0
|
X-HTTP-UserAgent: | Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us)
|
| AppleWebKit/48 (like Gecko) Safari/48,gzip(gfe),gzip(gfe)
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
This is libsupp 1.0 for MSDOS/DJGPP.
1.: Introduction.
=============
This is a support library for DJGPP 2.04 and 2.03. It shall
provide
a small set of improved versions of functions from DJGPP's CVS
source
tree or new functions that still have not been implemented for
DJGPP
so that the original functions provided with DJGPP's libc.a
(2.04 and
2.03) can be replaced with these new ones.
The decision which function is part and which one is not part
of this
library is based on the usefullnes for porting current GNU
packages.
If the amount of provided functions increases in the future
will depend
on the requirements of the GNU packages to be ported.
The following functions are provided:
asprintf()
cprintf()
fprintf()
printf()
snprintf()
sprintf()
vasprintf()
vfprintf()
vprintf()
vsnprntf()
vsprintf()
_doprnt()
Apart from the features already provided by the familiy of
printf()
functions from djdev204, this version of the functions will
provide:
1: Flags.
': This flag allows to format the integer part with the
thousands'
character. Because DJGPP only offers C/POSIX locale
and this
do not define a thousands' character the flag is
ignored.
2: Length modifiers.
DJGPP provides all of them.
3: Conversion specifiers.
F: 'F' Has been added and works like 'f'.
aA: With this conversion specifier a floating point number
will be
converted in the style "[-]0xh.hhhhp[+|-]d", where h
are hexadecimal
digits, p stands for the power of 2 and d is exponent
expressed
in decimal digits. %a prints lower case characters and
%A
prints upper case characters.
This implementation of printf family of functions also supports
numbered
conversion specifiers (%n$ for defining the position of the
argument to
be printed in the argument list, and *n$ for defining the
position of
the field width and precision to be used in the argument list).
To be able to use the new functions you will have to include
the header
(libsupp.h) in your source code. This header will provide the
macros
to map the conventional function names to their real library
names.
All library names start with the prefix "libsupp_". E.g.:
printf --> libsupp_printf
If you still use djdev203 then the header will also provide the
data
types definitions for intmax_t and uintmax_t. The definitios
have been
taken from stdint.h and I have not been able to figure out a
way to
check if your code already provides a definition of these data
types,
so these are always defined and this may trigger warnings or
errors when
your code is compiled. If this happens it will be your job to
fix your
code.
Because the provided functions depend on other libc functions,
this
library must be linked before the standard C library, libc.a,
is linked
into your programs by gcc. E.g.:
gcc -Wall -O2 prog.c -lsupp
The /diffs directory contains two patches that documents the
changes I
have done. The diffs-cvs patch shows all changes I have done
against
the sources of the CVS tree as checked out on 2008-03-10. The
second
patch is diffs-lib and shows the changes against the *patched*
checked
out CVS sources that are required to create the sources of this
library.
It is your choice if you prefer to check out the CVS sources,
patch them
and build your own libc.a with the proposed new functionality
or if you
prefer to use this library.
2.: Installation.
=============
The binary package provides a header file, libsupp.h, the
library file,
libsupp.a, and the info docs. All this is installed in the
standard
places of your DJGPP installation tree. Copy the binary
distribution
into the top DJGPP installation directory, just unzip it
preserving
the directory structure running *one* of the following
commands:
unzip32 lsupp10a.zip or
djtarx lsupp10a.zip or
pkunzip -d lsupp10a.zip
You must add an entry in your /info/dir file to be able to read
the
docs. Do this with a command like this:
install-info --info-dir=/dev/env/DJDIR/info --section="From
lsuppNNa.zip" /dev/env/DJDIR/info/libsupp.info
3.: Building the binaries from sources.
===================================
The library can *only* be build with *djdev204*.
3.1.: Create a temporary directory and copy the source package into
the
directory. Just unzip it preserving the directory structure
running
*one* of the following commands:
unzip32 lsupp10s.zip or
djtarx lsupp10s.zip or
pkunzip -d lsupp10s.zip
3.2.: To build the library cd into the top srcdir and run the shell
script
like this:
sh mklib.sh
The script accepts only a single optional argument that
specifies the
installation directory. If it is omitted the products will be
stored
in the /_build_ directory created in the top srcdir.
The script will build the library and the info docs; if
everything is
successfully build then the test program in the /tests
directory is
build and started. The output of the test program ist stored
in
/tests/test.txt for inspection. During the building of the
test
program a lot of warnings will appear. This is intentional to
test
that the compiler recognizes the new functions as functions of
the type
of *printf family and produces the typical warnings if flag
combinations
are used that are not allowed or defined.
You *cannot* build the library with djdev203. If you want to
compile
and run the test program with djdev203 and the library, you
must
replace the line
# include "../include/libsupp.h"
with
# include <libsupp.h>
Compile it with a command like this:
gcc -Wall -O02 test.c -o test.exe -lsupp
start it and inspect the output stored in test.txt.
The description of printf() can be found at:
<http://www.opengroup.org/onlinepubs/000095399/functions/
printf.html>
4.: Downloading.
============
The library consists of two packages that have been compiled
using
djdev204 and that can be downloaded from ftp.delorie.com and
mirrors
as (timestamp 2008-03-11):
libsupp 1.0 header, lib and info docs:
ftp://ftp.delorie.com/pub/djgpp/beta/v2tk/lsupp10a.zip
libsupp 1.0 source:
ftp://ftp.delorie.com/pub/djgpp/beta/v2tk/lsupp10s.zip
Send suggestions and bug reports concerning the library to
comp.os.msdos.djgpp or <djgpp AT delorie DOT com>.
Enjoy.
Guerrero, Juan Manuel <juan DOT guerrero AT gmx DOT de>
- Raw text -