[kernel] r8038 - in dists/trunk/modules/unicorn/unicorn: . Documentation RFCs adsl_status adsl_status/intl adsl_status/m4 adsl_status/pixmaps adsl_status/po adsl_status/src adsl_status/src/.deps amu arch arch/i386 include libm msw patches patches/2.4.21-xxx patches/Mdk9.1 scripts tools unicorn_atm unicorn_eth unicorn_pci unicorn_usb unicorntest
Philippe COVAL
rzr-guest at alioth.debian.org
Tue Dec 26 23:16:11 UTC 2006
Author: rzr-guest
Date: Wed Dec 27 00:14:01 2006
New Revision: 8038
Added:
dists/trunk/modules/unicorn/unicorn/COPYING
dists/trunk/modules/unicorn/unicorn/COPYING.GPL
dists/trunk/modules/unicorn/unicorn/Documentation/
dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.8
dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.sgml
dists/trunk/modules/unicorn/unicorn/Makefile
dists/trunk/modules/unicorn/unicorn/README
dists/trunk/modules/unicorn/unicorn/RFCs/
dists/trunk/modules/unicorn/unicorn/RFCs/rfc2364.txt
dists/trunk/modules/unicorn/unicorn/RFCs/rfc2684.txt
dists/trunk/modules/unicorn/unicorn/adsl_status/
dists/trunk/modules/unicorn/unicorn/adsl_status/ABOUT-NLS
dists/trunk/modules/unicorn/unicorn/adsl_status/AUTHORS
dists/trunk/modules/unicorn/unicorn/adsl_status/COPYING (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/ChangeLog
dists/trunk/modules/unicorn/unicorn/adsl_status/INSTALL (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile
dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.am
dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.in
dists/trunk/modules/unicorn/unicorn/adsl_status/NEWS
dists/trunk/modules/unicorn/unicorn/adsl_status/README
dists/trunk/modules/unicorn/unicorn/adsl_status/acconfig.h
dists/trunk/modules/unicorn/unicorn/adsl_status/aclocal.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/autogen.sh (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/bewan.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/bewan_adsl_status.glade
dists/trunk/modules/unicorn/unicorn/adsl_status/config.cache
dists/trunk/modules/unicorn/unicorn/adsl_status/config.guess (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/config.h
dists/trunk/modules/unicorn/unicorn/adsl_status/config.h.in
dists/trunk/modules/unicorn/unicorn/adsl_status/config.log
dists/trunk/modules/unicorn/unicorn/adsl_status/config.rpath (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/config.status (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/config.sub (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/configure (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/configure.in
dists/trunk/modules/unicorn/unicorn/adsl_status/green_led.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/install-sh (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ChangeLog
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile.in
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/VERSION
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/bindtextdom.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/config.charset (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcgettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcigettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcngettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dgettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dngettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/eval-plural.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/explodename.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/finddomain.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettextP.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gmo.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/hash-string.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/intl-compat.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/l10nflist.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/libgnuintl.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadinfo.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadmsgcat.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localcharset.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/locale.alias
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localealias.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localename.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ngettext.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/osdep.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.h
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.c
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.y
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-add.sin
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-del.sin
dists/trunk/modules/unicorn/unicorn/adsl_status/intl/textdomain.c
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ChangeLog
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.am
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.in
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/codeset.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/gettext.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/glibc21.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/iconv.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/intdiv0.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes-pri.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes_h.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/isc-posix.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lcmessage.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-ld.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-link.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-prefix.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/progtest.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/stdint_h.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/uintmax_t.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ulonglong.m4
dists/trunk/modules/unicorn/unicorn/adsl_status/missing (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/mkinstalldirs (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/
dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/bewan.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/green_led.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/red_led.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/po/
dists/trunk/modules/unicorn/unicorn/adsl_status/po/ChangeLog
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in.in
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars.template
dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES
dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES.in
dists/trunk/modules/unicorn/unicorn/adsl_status/po/Rules-quot
dists/trunk/modules/unicorn/unicorn/adsl_status/po/bewan_adsl_status.pot
dists/trunk/modules/unicorn/unicorn/adsl_status/po/boldquot.sed
dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at boldquot.header
dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at quot.header
dists/trunk/modules/unicorn/unicorn/adsl_status/po/fr.gmo (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/po/fr.po
dists/trunk/modules/unicorn/unicorn/adsl_status/po/insert-header.sin
dists/trunk/modules/unicorn/unicorn/adsl_status/po/it.gmo (contents, props changed)
dists/trunk/modules/unicorn/unicorn/adsl_status/po/it.po
dists/trunk/modules/unicorn/unicorn/adsl_status/po/quot.sed
dists/trunk/modules/unicorn/unicorn/adsl_status/po/remove-potcdate.sin
dists/trunk/modules/unicorn/unicorn/adsl_status/red_led.xpm
dists/trunk/modules/unicorn/unicorn/adsl_status/src/
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/callbacks.P
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/interface.P
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/main.P
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/status.P
dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/support.P
dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile
dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.am
dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.in
dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.c
dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.h
dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.c
dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.h
dists/trunk/modules/unicorn/unicorn/adsl_status/src/main.c
dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.c
dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.h
dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.c
dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.h
dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h
dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h.in
dists/trunk/modules/unicorn/unicorn/adsl_status/strings.c
dists/trunk/modules/unicorn/unicorn/amu/
dists/trunk/modules/unicorn/unicorn/amu/amas.cpp
dists/trunk/modules/unicorn/unicorn/amu/amas.h
dists/trunk/modules/unicorn/unicorn/amu/amu.cpp
dists/trunk/modules/unicorn/unicorn/amu/amu.h
dists/trunk/modules/unicorn/unicorn/amu/bsp.h
dists/trunk/modules/unicorn/unicorn/amu/bsp_pci.cpp
dists/trunk/modules/unicorn/unicorn/amu/bsp_usb.cpp
dists/trunk/modules/unicorn/unicorn/arch/
dists/trunk/modules/unicorn/unicorn/arch/i386/
dists/trunk/modules/unicorn/unicorn/arch/i386/modem_ant_PCI_LINUX.o.regparm3 (contents, props changed)
dists/trunk/modules/unicorn/unicorn/include/
dists/trunk/modules/unicorn/unicorn/include/crc.h
dists/trunk/modules/unicorn/unicorn/include/debug.h
dists/trunk/modules/unicorn/unicorn/include/hal.h
dists/trunk/modules/unicorn/unicorn/include/hard.h
dists/trunk/modules/unicorn/unicorn/include/rapi.h
dists/trunk/modules/unicorn/unicorn/include/tracetool.h
dists/trunk/modules/unicorn/unicorn/include/types.h
dists/trunk/modules/unicorn/unicorn/include/unicorn.h
dists/trunk/modules/unicorn/unicorn/include/verstr.h
dists/trunk/modules/unicorn/unicorn/libm/
dists/trunk/modules/unicorn/unicorn/libm/Makefile
dists/trunk/modules/unicorn/unicorn/libm/e_log.c
dists/trunk/modules/unicorn/unicorn/libm/e_log10.c
dists/trunk/modules/unicorn/unicorn/libm/e_log10f.c
dists/trunk/modules/unicorn/unicorn/libm/e_logf.c
dists/trunk/modules/unicorn/unicorn/libm/e_pow.c
dists/trunk/modules/unicorn/unicorn/libm/e_powf.c
dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2.c
dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2f.c
dists/trunk/modules/unicorn/unicorn/libm/e_sqrt.c
dists/trunk/modules/unicorn/unicorn/libm/e_sqrtf.c
dists/trunk/modules/unicorn/unicorn/libm/k_cos.c
dists/trunk/modules/unicorn/unicorn/libm/k_cosf.c
dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2.c
dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2f.c
dists/trunk/modules/unicorn/unicorn/libm/k_sin.c
dists/trunk/modules/unicorn/unicorn/libm/k_sinf.c
dists/trunk/modules/unicorn/unicorn/libm/math.h
dists/trunk/modules/unicorn/unicorn/libm/math_private.h
dists/trunk/modules/unicorn/unicorn/libm/s_ceil.c
dists/trunk/modules/unicorn/unicorn/libm/s_ceilf.c
dists/trunk/modules/unicorn/unicorn/libm/s_copysign.c
dists/trunk/modules/unicorn/unicorn/libm/s_copysignf.c
dists/trunk/modules/unicorn/unicorn/libm/s_fabs.c
dists/trunk/modules/unicorn/unicorn/libm/s_fabsf.c
dists/trunk/modules/unicorn/unicorn/libm/s_floor.c
dists/trunk/modules/unicorn/unicorn/libm/s_floorf.c
dists/trunk/modules/unicorn/unicorn/libm/s_isinf.c
dists/trunk/modules/unicorn/unicorn/libm/s_scalbn.c
dists/trunk/modules/unicorn/unicorn/libm/s_scalbnf.c
dists/trunk/modules/unicorn/unicorn/libm/s_sin.c
dists/trunk/modules/unicorn/unicorn/libm/s_sinf.c
dists/trunk/modules/unicorn/unicorn/libm/s_trunc.c
dists/trunk/modules/unicorn/unicorn/libm/s_truncf.c
dists/trunk/modules/unicorn/unicorn/msw/
dists/trunk/modules/unicorn/unicorn/msw/.crc.o.cmd
dists/trunk/modules/unicorn/unicorn/msw/.linrapi.o.cmd
dists/trunk/modules/unicorn/unicorn/msw/crc.c
dists/trunk/modules/unicorn/unicorn/msw/fp_stubs.c
dists/trunk/modules/unicorn/unicorn/msw/linrapi.c
dists/trunk/modules/unicorn/unicorn/msw/msw.cpp
dists/trunk/modules/unicorn/unicorn/patches/
dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/
dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-ohci.patch
dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-uhci.patch
dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/
dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-ohci.patch
dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-uhci.patch
dists/trunk/modules/unicorn/unicorn/patches/README
dists/trunk/modules/unicorn/unicorn/scripts/
dists/trunk/modules/unicorn/unicorn/scripts/unicorn-ipoatm (contents, props changed)
dists/trunk/modules/unicorn/unicorn/scripts/unicorn-pppoatm (contents, props changed)
dists/trunk/modules/unicorn/unicorn/scripts/unicorn-rp-pppoe (contents, props changed)
dists/trunk/modules/unicorn/unicorn/tools/
dists/trunk/modules/unicorn/unicorn/tools/Makefile
dists/trunk/modules/unicorn/unicorn/tools/cgi.c
dists/trunk/modules/unicorn/unicorn/tools/main.c
dists/trunk/modules/unicorn/unicorn/tools/oam_ping.c
dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.c
dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.h
dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.c
dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.h
dists/trunk/modules/unicorn/unicorn/tools/unicorntest (contents, props changed)
dists/trunk/modules/unicorn/unicorn/unicorn.spec
dists/trunk/modules/unicorn/unicorn/unicorn_atm/
dists/trunk/modules/unicorn/unicorn/unicorn_atm/.unicorn_atmdrv.o.cmd
dists/trunk/modules/unicorn/unicorn/unicorn_atm/unicorn_atmdrv.c
dists/trunk/modules/unicorn/unicorn/unicorn_eth/
dists/trunk/modules/unicorn/unicorn/unicorn_eth/.unicorn_ethdrv.o.cmd
dists/trunk/modules/unicorn/unicorn/unicorn_eth/unicorn_ethdrv.c
dists/trunk/modules/unicorn/unicorn/unicorn_pci/
dists/trunk/modules/unicorn/unicorn/unicorn_pci/Makefile
dists/trunk/modules/unicorn/unicorn/unicorn_pci/unicorn_pcidrv.c
dists/trunk/modules/unicorn/unicorn/unicorn_usb/
dists/trunk/modules/unicorn/unicorn/unicorn_usb/Makefile
dists/trunk/modules/unicorn/unicorn/unicorn_usb/unicorn_usbdrv.c
dists/trunk/modules/unicorn/unicorn/unicorntest/
dists/trunk/modules/unicorn/unicorn/unicorntest/Makefile
dists/trunk/modules/unicorn/unicorn/unicorntest/unicorntest.c
Log:
about to patch for gentoo
Added: dists/trunk/modules/unicorn/unicorn/COPYING
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/COPYING Wed Dec 27 00:14:01 2006
@@ -0,0 +1,20 @@
+Program code and documentation are
+(C) Copyright 2002 BeWAN systems
+All rights reserved.
+
+This package is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+In addition, as a special exception, BeWAN systems gives permission
+to link the code of this program with the modem SW library
+(modem_ant_PCI.o, modem_ant_USB.o), and distribute linked combinations
+including the two. You are also given permission to redistribute the
+modem SW library (modem_ant_PCI.o, modem_ant_USB.o) with the rest of the
+code.
+You must obey the GNU General Public License in all respects for all of
+the code used other than the modem SW library.
+
+See the file COPYING.GPL for details.
+
Added: dists/trunk/modules/unicorn/unicorn/COPYING.GPL
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/COPYING.GPL Wed Dec 27 00:14:01 2006
@@ -0,0 +1,340 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Added: dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.8
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.8 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,128 @@
+.\" This -*- nroff -*- file has been generated from
+.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
+...\"
+...\" transcript compatibility for postscript use.
+...\"
+...\" synopsis: .P! <file.ps>
+...\"
+.de P!
+\\&.
+.fl \" force out current output buffer
+\\!%PB
+\\!/showpage{}def
+...\" the following is from Ken Flowers -- it prevents dictionary overflows
+\\!/tempdict 200 dict def tempdict begin
+.fl \" prolog
+.sy cat \\$1\" bring in postscript file
+...\" the following line matches the tempdict above
+\\!end % tempdict %
+\\!PE
+\\!.
+.sp \\$2u \" move below the image
+..
+.de pF
+.ie \\*(f1 .ds f1 \\n(.f
+.el .ie \\*(f2 .ds f2 \\n(.f
+.el .ie \\*(f3 .ds f3 \\n(.f
+.el .ie \\*(f4 .ds f4 \\n(.f
+.el .tm ? font overflow
+.ft \\$1
+..
+.de fP
+.ie !\\*(f4 \{\
+. ft \\*(f4
+. ds f4\"
+' br \}
+.el .ie !\\*(f3 \{\
+. ft \\*(f3
+. ds f3\"
+' br \}
+.el .ie !\\*(f2 \{\
+. ft \\*(f2
+. ds f2\"
+' br \}
+.el .ie !\\*(f1 \{\
+. ft \\*(f1
+. ds f1\"
+' br \}
+.el .tm ? font underflow
+..
+.ds f1\"
+.ds f2\"
+.ds f3\"
+.ds f4\"
+'\" t
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+.TH "UNICORNTEST" "8"
+.SH "NAME"
+unicorntest \(em program to test the unicorn ADSL modem driver
+.SH "SYNOPSIS"
+.PP
+\fBunicorntest\fP
+.SH "DESCRIPTION"
+.PP
+This manual page documents briefly the
+\fBunicorntest\fP command.
+.PP
+This manual page was written for the \fBDebian\fP distribution
+because the original program does not have a manual page.
+.PP
+\fBunicorntest\fP is a program that enables you
+to test the correct working of the unicorn ADSL driver.
+.SH "OPTIONS"
+.PP
+This has no option to speak of, a list of commands will be
+displayed after program startup, and may also be passed directly
+on the command line. A summary of options is included below. Commands
+are not case sensitive.
+.IP "\fBX\fP " 10
+Exit Console Application
+.IP "\fBANSI\fP " 10
+Initialize and Start in Operation Mode: ANSI
+.IP "\fBMULTI\fP " 10
+Initialize and Start in Operation Mode: MULTI
+.IP "\fBGLITE\fP " 10
+Initialize and Start in Operation Mode: GLITE
+.IP "\fBGDMT\fP " 10
+Initialize and Start in Operation Mode: GDMT
+.IP "\fBUP\fP " 10
+Activate the Line
+.IP "\fBDOWN\fP " 10
+Deactivate the Line
+.IP "\fBCONFIG\fP " 10
+Get Near End Modem Configuration
+.IP "\fBVENDOR\fP " 10
+Get Vendor and Version Info
+.IP "\fBOPER\fP " 10
+Get Line Operational Data
+.IP "\fBFAULT\fP " 10
+Get Fault Counters
+.IP "\fBPERF\fP " 10
+Get Performance Counters
+.IP "\fBRATE\fP " 10
+Get Actual Bitrate
+.IP "\fBMODE\fP " 10
+Get Modem State
+.IP "\fBTEQ\fP " 10
+Get TEQ values
+.IP "\fBVER\fP " 10
+Get Software Version
+.IP "\fBGASP\fP " 10
+Send DyingGasp Command
+.IP "\fBUNLOAD\fP " 10
+Unload Operation Mode
+.IP "\fBCONSTELLATION #\fP " 10
+Show Constellation Data for # carrier
+.SH "SEE ALSO"
+.PP
+pppoe (8).
+.SH "AUTHOR"
+.PP
+This manual page was written by Sven Luther luther at debian.org for
+the \fBDebian\fP system (but may be used by others). Permission is
+granted to copy, distribute and/or modify this document under
+the terms of the GNU Free Documentation
+License, Version 1.1 or any later version published by the Free
+Software Foundation; with no Invariant Sections, no Front-Cover
+Texts and no Back-Cover Texts.
+...\" created by instant / docbook-to-man, Fri 13 Sep 2002, 18:22
Added: dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.sgml
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/Documentation/unicorntest.sgml Wed Dec 27 00:14:01 2006
@@ -0,0 +1,261 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+ page: `docbook-to-man manpage.sgml > manpage.1'. You may view
+ the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+ less'. A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+ docbook-to-man $< > $@
+
+
+ The docbook-to-man binary is found in the docbook-to-man package.
+ Please remember that if you create the nroff version in one of the
+ debian/rules file targets (such as build), you will need to include
+ docbook-to-man in your Build-Depends control field.
+
+ -->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "<firstname>Sven</firstname>">
+ <!ENTITY dhsurname "<surname>Luther</surname>">
+ <!-- Please adjust the date whenever revising the manpage. -->
+ <!ENTITY dhdate "<date>septembre 13, 2002</date>">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1). -->
+ <!ENTITY dhsection "<manvolnum>8</manvolnum>">
+ <!ENTITY dhemail "<email>luther at debian.org</email>">
+ <!ENTITY dhusername "Sven Luther">
+ <!ENTITY dhucpackage "<refentrytitle>UNICORNTEST</refentrytitle>">
+ <!ENTITY dhpackage "unicorntest">
+
+ <!ENTITY debian "<productname>Debian</productname>">
+ <!ENTITY gnu "<acronym>GNU</acronym>">
+]>
+
+<refentry>
+ <refentryinfo>
+ <address>
+ &dhemail;
+ </address>
+ <author>
+ &dhfirstname;
+ &dhsurname;
+ </author>
+ <copyright>
+ <year>2002</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ &dhdate;
+ </refentryinfo>
+ <refmeta>
+ &dhucpackage;
+
+ &dhsection;
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+
+ <refpurpose>program to test the unicorn ADSL modem driver</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+
+ <para>This manual page documents briefly the
+ <command>unicorntest</command> command.</para>
+
+ <para>This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.</para>
+
+ <para><command>&dhpackage;</command> is a program that enables you
+ to test the correct working of the unicorn ADSL driver.</para>
+
+ </refsect1>
+ <refsect1>
+ <title>OPTIONS</title>
+
+ <para>This has no option to speak of, a list of commands will be
+ displayed after program startup, and may also be passed directly
+ on the command line. A summary of options is included below. Commands
+ are not case sensitive.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>X</option>
+ </term>
+ <listitem>
+ <para>Exit Console Application</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>ANSI</option>
+ </term>
+ <listitem>
+ <para>Initialize and Start in Operation Mode: ANSI</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>MULTI</option>
+ </term>
+ <listitem>
+ <para>Initialize and Start in Operation Mode: MULTI</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>GLITE</option>
+ </term>
+ <listitem>
+ <para>Initialize and Start in Operation Mode: GLITE</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>GDMT</option>
+ </term>
+ <listitem>
+ <para>Initialize and Start in Operation Mode: GDMT</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>UP</option>
+ </term>
+ <listitem>
+ <para>Activate the Line</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>DOWN</option>
+ </term>
+ <listitem>
+ <para>Deactivate the Line</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>CONFIG</option>
+ </term>
+ <listitem>
+ <para>Get Near End Modem Configuration</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>VENDOR</option>
+ </term>
+ <listitem>
+ <para>Get Vendor and Version Info</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>OPER</option>
+ </term>
+ <listitem>
+ <para>Get Line Operational Data</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>FAULT</option>
+ </term>
+ <listitem>
+ <para>Get Fault Counters</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>PERF</option>
+ </term>
+ <listitem>
+ <para>Get Performance Counters</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>RATE</option>
+ </term>
+ <listitem>
+ <para>Get Actual Bitrate</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>MODE</option>
+ </term>
+ <listitem>
+ <para>Get Modem State</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>TEQ</option>
+ </term>
+ <listitem>
+ <para>Get TEQ values</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>VER</option>
+ </term>
+ <listitem>
+ <para>Get Software Version</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>GASP</option>
+ </term>
+ <listitem>
+ <para>Send DyingGasp Command</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>UNLOAD</option>
+ </term>
+ <listitem>
+ <para>Unload Operation Mode</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>CONSTELLATION #</option>
+ </term>
+ <listitem>
+ <para>Show Constellation Data for # carrier</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+
+ <para>pppoe (8).</para>
+
+ </refsect1>
+ <refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was written by &dhusername; &dhemail; for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the <acronym>GNU</acronym> Free Documentation
+ License, Version 1.1 or any later version published by the Free
+ Software Foundation; with no Invariant Sections, no Front-Cover
+ Texts and no Back-Cover Texts.</para>
+
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
Added: dists/trunk/modules/unicorn/unicorn/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,39 @@
+#
+## Makefile for UNICORN ADSL Modem
+#
+
+# Version
+VERS=0x093
+
+# path to kernel sources and headers (must correspond to running kernel)
+KERNEL_SOURCES=/usr/src/linux
+HPATH=$(KERNEL_SOURCES)/include
+MAKE=make
+
+.EXPORT_ALL_VARIABLES:
+
+DIRS = adsl_status unicorntest tools
+DRVDIRS = libm unicorn_pci unicorn_usb
+
+all: applis modules
+
+applis:
+ for i in $(DIRS) ; do make -C $$i all ; done
+
+modules:
+ for i in $(DRVDIRS) ; do make -C $$i modules MODDIR=$(PWD)/$$i ; done
+
+clean:
+ for i in $(DIRS) $(DRVDIRS); do (if [ -d $$i ]; then make -C $$i clean; fi); done
+
+install: applis_install modules_install
+
+applis_install:
+ for i in $(DIRS) ; do make -C $$i install prefix=$(prefix); done
+
+modules_install:
+ for i in $(DRVDIRS) ; do make -C $$i modules_install MODDIR=$(PWD)/$$i ; done
+ /sbin/depmod -ae
+
+only_modules_install:
+ for i in $(DRVDIRS) ; do make -C $$i modules_install ; done
Added: dists/trunk/modules/unicorn/unicorn/README
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/README Wed Dec 27 00:14:01 2006
@@ -0,0 +1,441 @@
+INTRODUCTION:
+
+The software for the UNICORN ADSL PCI card consists of two loadable drivers,
+the unicorn_atm.o and unicorn_pci.o. The unicorn driver is a standard Linux
+ATM driver, that performs segmentation and reassembly (SAR) and flow control.
+The unicorn_pci driver contains the ADSL modem software and hardware related
+functions. It has been tested with the Linux 2.4.x kernels. Note that to use
+PPPoE, PPPoA or RFC2684 protocols, the kernel may need to be patched.
+
+COMPILATION:
+
+To compile the drivers, unzip and untar the file. In the unicorn directory you
+will find the two subdirectories unicorn_atm and unicorn_bus.
+You may compile the drivers based on the include files in the kernel source
+or standard kernel include files. Set the variable KERNELDIR in the Makefile's
+to point to your kernel sources if the first option in chosen.
+If you choose the latter, you may need to copy the contents of the kernel
+source "include/net" directory into "/usr/include/net/".
+Go into these subdirectories and do a "make" and a "make install".
+If the compile option "USE_HW_TIMER" is set, the performance is increased,
+but the CPU load increased.
+Use the same compiler as you use when compiling the linux kernel. The driver has
+been tested using gcc-2.96, gcc-2.95.2, gcc-2.91.66, gcc 3.0.3 gcc 3.4, gcc 4.
+
+
+INSTALLATION:
+
+To start the ADSL software, do a "modprobe unicorn_pci". Check in the syslog that
+the drivers are started OK. The ADSL line should come up automatically. The status
+can also be checked using the "proc" interface (/proc/net/atm/UNICORN\:0".
+SHOWTIME in the log or in the status means that ADSL connction is up and ATM cells
+may be transmitted and received.
+Depending on your network setup, you will need additional software as with any other
+ADSL ATM card. For bridged ethernet (RFC2684), the br2684.o module and brctl is needed.
+For PPPoE, any pppoe client over the bridged interface (nas0) should work
+(Roaring Penguin pppoe client has been tested).
+The scripts directory contains some example startup scripts.
+
+Bridged (RFC2684) and PPP over Ethernet:
+Depending on your kernel, you may need to patch the kernel and enable the option
+"RFC1483/2684 Bridged protcols" under "Networking options". Also ATM support needs
+to be enabled.
+Also the user space daemon "brctl" is needed. Instructions on how to apply the
+patch and the brctl and patch sources can be found at http://www.zoftware.org/adsl-pppoe.
+
+PPP over ATM:
+For PPP over ATM, the module pppoatm.o is needed, together with the pppd plugin
+pppoatm.so and a version of pppd that supports plugins.
+Currently version ppp-2.4.0b2 supports PPPoATM plugins. A patched version ready for
+PPPoATM can be found at http://www.sourceforge.net/.
+
+PPPoATM specific pppd options:
+llc-encaps: use LLC encapsulation for PPPoATM
+vc-encaps: use VC multiplexing for PPPoATM (default)
+
+
+MODULE PARAMETERS:
+
+Some ADSL paramters can be controlled by setting the moule paramters.
+
+unicorn_pci.o:
+--------------
+
+ActTimeout: Timeout in ms on the duration of the activation state.
+
+ActivationMode: This parameter sets in what mode the ADSL modem should be activated.
+ANSI mode is 1, G.lite is 2, G.dmt is 4 and MULTI mode is 3.
+If you know what mode your DSLAM operates in, use this mode. If not select either
+ANSI or MULTI mode.
+
+DownstreamRate: The maximum downstream rate in Kbit/sec.
+
+AutoActivation: Set this to 1 if you your ADSL modem to start auotmatically (default 1).
+
+DebugLevel: To debug the driver, set this to a value different from 0 and enable DEBUG
+when compiling.
+
+MswDebugLevel: 0 - High level, all traces enabled, 1 - Medium level, info and warnings
+enabled, 2 - Low level, only warnings and errors are traced.
+
+LCD_Trig: Persistency time (in msec) of Loss of Cell Deliniation defects before
+disorderly shutdown (15000 default).
+
+LCD_LOF_Trig: Persistency time (in msec) of Loss of Signal and Loss of Frame defects before
+disorderly shutdown (5000 default).
+
+TrainingDelay: Delay in msec used in training sequence. Default 80.
+
+useRFCFixedRate: If 1, rate adaptive disabled. To use with ECI DSLAM in ITU mode.
+
+_no_TS652: If set to 1, enable gain table for use without TS652.
+
+unicorn_atm.o:
+--------------
+
+mac_address: If this is specified, the bridged ethernet (RFC2684) will use this
+mac (ethernet) address instead of a randomly generated address. Specified as a
+12 character ASCII string of hexadecimal numbers.
+
+atmready_timeout: The time in seconds to wait for ADSL link up when opening the ATM
+socket (default 20 seconds).
+
+DebugLevel: Set this if you need to debug the driver.
+
+DIV:
+
+mswtest contains a simple program to start/stop and get statistics from the ADSL card.
+Depending on your distribution, you may need to install atm support (atm-2.4.0) to
+compile this program.
+
+RELEASE NOTES:
+
+Version 0.0.5:
+- first working version.
+
+Version 0.0.6:
+- Corrected an error when performing shutdown of the machine.
+- The modem sw compiled with CPU option 386.
+- Cleanups in the Makefile's.
+- Removed un-compiled code in the ATM driver.
+
+Version 0.0.7:
+- Internal version.
+
+Version 0.0.8:
+- Simplified the Makefile's.
+
+Version 0.0.9:
+- Locking the module (MOD_INC_USE_COUNT) in unicorn_atm_open to be sure that module is
+not removed while in use.
+- New version of modem software.
+
+Version 0.1.0:
+- New modem software (1.0.7D) with fixes for ECI DSLAMs.
+- The ActivationMode parameter values has changed. Please update your scripts !
+
+Version 0.1.1:
+- Added the _assert_fail function in linrapi.c to support certain versions of
+libm.a.
+- Fixed a bug where timer structures were allocated but never released that may
+cause failures after several hours of operation.
+- Cleaned up and added debug code to memory allocation functions is linrapi.c.
+
+Version 0.1.2:
+- Initialize timer structure in xsm_create to avoid error when unloading driver.
+- Conditionally call complete_and_exit depending on kernel version.
+
+Version 0.1.3:
+- New modem software (1.0.7E) with fixes for ECI DSLAMs.
+- Test program (cmdtest) added.
+
+Version 0.2.0:
+- New modem software (1.0.7e-B-LINUX) that fixes the interoperability problems with ECI DSLAMs
+and works in G.dmt mode.
+- A kernel panic when halting the machine has been fixed.
+- The OBC semaphore in the PCI_xxx functions is only released after PCI bus read.
+- Added C++ support for gcc 3.0.
+
+Version 0.2.1:
+- Using xtime instead of get_fast_time(), since this function is not longer
+exported in kernel 2.4.18.
+
+Version 0.2.2:
+- Using del_timer instead of del_timer_sync. This version works with SMP enabled.
+- More tracing of MSW parameters.
+- Removed some compiler warnings in unicorn_atm.
+- New modem software (PCI_1.0.7f).
+
+Version 0.2.3:
+- Return an error in unicorn_atm_send if ADSL link is down. This avoids a kernel freeze with pppd.
+- Add a prefix to KERN_INFO log messages.
+- The "pilot tracking error" is a PRINT_WARNING instead of PRINT_ERROR.
+
+Version 0.2.4:
+- Set the PCI DMA access grant timeout to maximum to avoid a problem on ASUS motherboards.
+- Use the writel/readl macros to access PCI registers.
+- Modem software with UseVCXO to 0 as default in order to connect in ANSI mode.
+- Fix a problem detecting linux version.
+- Renamed the "cmdtest" folder to "unicorntest".
+
+Version 0.2.6:
+- The upstream cell rate calculation has been fixed. The actual link rate should now be quite close
+to the theoretical max. This is very important for low speed links.
+- New modem software (1.0.7i2).
+
+Version 0.2.7:
+- Ooops, forgot some debug code in unicorn_atmdrv.c.
+
+Version 0.2.8:
+- Undefined symbol fwrite when using a certain version of libm.a.
+
+Version 0.2.9:
+- Cleanups due to porting to PowerPC.
+- In timer_callback, restart timer before put_msg to avoid race condition (and kernel panic).
+- Make the driver ready for ST70136 AFE.
+- OBC timer increased to 250ms.
+
+Version 0.3.0:
+- Removed a syslog when calling xtm_stopmsgtimer with invalid timer.
+- Do not modify nice value, since the task_struct is dependent on the kernel version.
+
+Version 0.3.1:
+- Changed the values of the DMA max burst size.
+- Modifications to Makefile.
+
+
+Version 0.3.2:
+- The modem software used by default is the 1.07f version, since this has proved to
+be the most stable. This can be changed in the Makefile if needed.
+- There was a divide by zero panic if the HZ was greater than 1000.
+- Modifications to Makefile.
+
+Version 0.3.3:
+- Setting the PCI latency timer to 255 (correctly this time..).
+
+Version 0.3.4:
+- Remove #include <libiberty.h> from collect_tors.c
+- DBG macro changed to KERN_DEBUG log level.
+
+Version 0.3.5:
+- New modem software (1.0.8) that works with Alcatel DSLAM v 4.2.13.
+- Using mutex'es to protect access to OBC.
+- Compile options moved to Makefile's.
+
+Version 0.3.6:
+- Implemented retry in the OBC access functions.
+- Do not return error if not SHOWTIME in unicorn_atm_open (compile option).
+- The compile option USE_HW_TIMER not defined by default.
+
+Version 0.3.8:
+- First working version of USB driver. It only works with the "uhci" host controller driver.
+- Some small fixes in unicorn_atmdrv.c to correctly display the link speed.
+- Included the libm.a with the modem SW library, since this library is not installed on some recent Linux distributions.
+- Simplified the Makefile's and moved the binaries into the arc/i386 subfolder.
+
+Version 0.3.9:
+- First version that works with usb-uhci driver. In this case FrameNumber=12 must be passed as module parameter.
+- Added a script to establish Routed IP over ATM connections. Note that this script has not been tested.
+
+Version 0.4.0:
+- Automatically detect the type of USB Host Controller driver and set FrameNumber accordingly.
+- New version (1.0.9) of modem software with new pilot tone detection algorithm.
+- Use INT instead of OBC ISOC usb pipes in SHOWTIME.
+
+Version 0.4.1:
+- The USB bandwidth needed reduced from 90% to about 30% (512Kbits downstream).
+- The driver is now ready for cards and adapters with new Analog Front Ends (20174).
+
+Version 0.4.2:
+- Licence added.
+
+Version 0.4.3:
+- The unicorn_usbdrv.c now compiles with kernel 2.4.20.
+
+Version 0.4.4:
+- Wrong fix in unicorn_usbdrv.c with kernel 2.4.20.
+- Removed a few warning printks that are not really errors.
+
+Version 0.4.5:
+- Another wrong fix in unicorn_usbdrv.c with kernel 2.4.20.
+- Ignoring errors in USB Interrupt Read if length is OK.
+
+Version 0.4.7:
+- Added support for AAL0 (raw) cells.
+- Added a few ioctl's for the status application (coming later).
+- The modem software library has been patched to remove strings containing "gcc2_copmpiled".
+The driver now loads correctly on RedHat 8.0.
+- The floating point library libm.a is no longer in the package. Please install it if with
+your distribution (Mandrake 9.0) it is not installed. It is normally in /usr/lib/.
+- There are two transmit queues with different priorities. This is in order to add support
+for CBR,VBR streams. This is very preliminary and if you have any comment, please contact me.
+
+Version 0.4.8:
+- New graphical application "bewan_adsl_status" that shows the adsl state.
+- Automatic detection of of adsl parameters using TR-037 or trial and error ("adsl-autoconfig").
+- New start/stop script ("unicorn-adsl") that is using adsl-autoconfig.
+
+Version 0.5.0:
+- The source for the graphical application "bewan_adsl_status" included.
+- New top-level Makefiles. To build the complete package, go to unicorn and type:
+make,make install, make -f Makefile.modules, make -f Makefile.modules install.
+- New modem software library compiled with GCC3.
+- Correctly handing module versioning.
+
+Version 0.5.1:
+- C++ stubs added that was needed if the modules are compiled with GCC 2.
+- Changes in the Makefile's, it now checks the PCI register and if there is a unicorn PCI card,
+it builds the PCI module else the USB module is built.
+
+Version 0.5.2:
+- French localization of bewan_adsl_status finished.
+- The unlock_kernel is now called before running the kernel thread.
+- Some changes in the Makefile's. If you have both PCI and USB adapters, you can force building
+the USB adapter by: make -f Makefile.modules pci install_pci
+
+Version 0.5.3:
+- Patches against the latest kernels in "patches" directory.
+- Small fix in adsl-autoconfig to not write the config file if VPI,VCI not found.
+- README for adsl-autoconfig added.
+
+Version 0.5.4:
+- Small modification in unicorntest.
+- Small modification in unicorn_atmdrv.c to make it compile on new kernels.
+
+Version 0.5.5:
+- Script unicorn-ipoatm, unciorn-adsl and adsl autoconfig modified to work with provider free.
+
+Version 0.6.0:
+- New driver with Ethernet (instead of ATM) interface added to project. This driver supports
+RFC2684 routed (ipoatm), RFC2684 bridged (br2684,pppoe), and PPP over ATM with standard pppoe
+dialers. Note that this driver is in developement and the bewan_adsl_status application
+and unicorntest does not work with this driver yet.
+
+Version 0.6.1:
+- Small modification in linrapi.c to make it compile with gcc 3.3.
+- Added /proc entry for the unicorn_eth driver.
+
+Version 0.6.2:
+- Do not wake up tosca thread when disabling tosca soft interrupts.
+
+Version 0.6.3:
+- Added lock in CopySoftIntrTable since there are problems on SMP machines.
+- The status application is now redimensioanable.
+
+Version 0.6.4:
+- Status and unicorntest application works with unicorn_eth drivers.
+- Verify encapsulation in unicorn_eth driver.
+
+Version 0.7.0:
+- The bus drivers are now statically linked with the net drivers to simplify things.
+For example, the PCI ATM driver is now called "unicorn_pci_atm.o",and can be loaded by doing
+ "insmod unicorn_pci_atm.o".
+- Reorganized the files so that source files are not shared between PCI and USB drivers, except
+when identical
+- The Makefile's has been simplified. To compile and install all drivers and applications,
+it is enough to do "make install" as root.
+- The scripts has been simplified and will use the ethernet driver for PPPoE, Bridged and
+IP over ATM.
+
+Version 0.7.1:
+- Implemented OAM loopback in the drivers. This is necessary in order to work with Telecom Italia lines.
+
+Version 0.7.2:
+- Removed the 'autoconfig', since I don't think it is used and did not work with the
+new OAM loopback in the drivers.
+- Added a new 'tools' directory. This contains simple tools to get the status, get the status as a
+cgi application and send OAM pings.
+- Force the threads to run on CPU #0 only. Hopefully this hack will make it work on SMP.
+- Some changes to the Makefile's.
+
+Version 0.7.3:
+- unicorntest compiled with DEBUG.
+- Remove old versions of the files unicorn_atm.o,unicorn_pci.o and unicorn_usb.o in lib/modules/.
+
+Version 0.7.4:
+- Fixes in the Makefiles.
+- Workaround for SMP disconnection.
+- Lock around TOSCA interrupts (for SMP).
+- Setting useAFE based on board id.
+- Minor changes in adsl parameters.
+
+Version 0.7.5:
+- Fixes for compile problems on newer kernels (versions 2.4.23, 2.6.0).
+
+Version 0.7.6:
+- Minor fixes for compile problem with gcc 2.95.
+
+Version 0.7.7:
+- Include the sources for libm.a, since this library is not installed
+with all distributions.
+- Use a mutex to serialize all the rAPI threads. This may fix a
+problem on SMP machines.
+
+Version 0.7.8:
+- New modem software with support for AFE 20174.
+
+Version 0.8.0:
+- New modem software for USB with support for AFE 20174 (fixed).
+
+Version 0.8.1:
+- Missing symbol unicorntest.c fixed.
+- Fixing compile problem on RH9, SUSE9 kernels.
+- highCarrierOff set to 230 instead of 240 (interopearbility).
+- Fixed an OOPS in oam_ping when pinging and not in SHOWTIME.
+
+Version 0.8.6:
+- The driver should build and work for kernel 2.6.
+- Retry isoc atm reads in case of error.
+
+Version 0.8.7:
+- Fixed a crash on low-bandwidth lines (< 320Kbits) by increasing the
+number of ISO packets in the urb's from 20 to 40.
+- Italian localization thanks to Stefano Palmeri.
+
+Version 0.8.8:
+- New modem software (0.1.0.8) for PCI with bug fix for Globespan
+DSLAM.
+- Added cell counters in T_StateInfo record (for cgi for example).
+
+Version 0.8.9:
+- New modem software (0.1.0.10) for PCI with bug fix for Globespan
+DSLAM and other interoperability fixes.
+- Fixed a bug where changing USB bandwidth dynamically prevented the
+adapters with AFE 20174 to work on kernel 2.6.
+- Compile problem on kernel 2.6.9 fixed.
+
+Version 0.9.0:
+- Now compiles with gcc-3.4.
+- Compiles with SMP on 2.6.
+
+Version 0.9.1:
+- Fix compile problem for kernel 2.6.11.
+
+Version 0.9.2:
+- Include an option to change the modem SW library for PCI in case of
+interoperability problems. To change the modem SW library to the old
+1.9.6.1 version, comment out the line NEW_MSW=1 in the PCI Makefile
+(in the unicorn_pci directory).
+
+Version 0.9.3:
+- Added support for PCI cards with the 20174 AFE.
+- Added PCI modem SW library compiled with -mregparm=3 (modem_ant_PCI_LINUX.o.regparm3).
+This library should be used with kernels compiled with -mregparm=3 (Ex: Fedora Core 2).
+- Now works for kernel 2.6.14 and newer (skb_unlink parameter change)
+- Eliminated a few compiler warnings with gcc 4.
+- Modem SW library version 1.9.6.1 not longer included.
+- Replace call to "shutdown_atm_dev" with "atm_dev_deregister" (kernel 2.6.15).
+
+KERNEL 2.6 NOTES:
+To build the modules you may need to build them in the module
+directory (unicorn_usb/unicorn_pci) instead of using the top-level
+Makefile. The error appears when doing MODPOST.
+
+IMPORTANT USB NOTES:
+For USB to work correctly, I recommend using kernel 2.4.22 or later, since a lot of bugs has
+been fixed in the UHCI and OHCI drivers since early 2.4 kernel releases.
+If you have a 2.4.21 kernel (Mandrake 9.1 or 2.4.21-xx) you need to patch the
+usb-uhci and usb-ohci drivers to avoid a freeze when starting the unicorn_usb_xxx module.
+Copy the patches to the linux source directory and do:
+patch -p0 < usb-uhci.patch
+patch -p0 < usb-ohci.patch
Added: dists/trunk/modules/unicorn/unicorn/RFCs/rfc2364.txt
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/RFCs/rfc2364.txt Wed Dec 27 00:14:01 2006
@@ -0,0 +1,546 @@
+Network Working Group G. Gross
+Request for Comments: 2364 Lucent Technologies
+Category: Standards Track M. Kaycee
+ Paradyne
+ A. Lin
+ Shasta Networks
+ A. Malis
+ Ascend Communications
+ J. Stephens
+ Cayman Systems
+ July 1998
+
+ PPP Over AAL5
+
+Status of this Memo
+
+ This document specifies an Internet standards track protocol for the
+ Internet community, and requests discussion and suggestions for
+ improvements. Please refer to the current edition of the "Internet
+ Official Protocol Standards" (STD 1) for the standardization state
+ and status of this protocol. Distribution of this memo is unlimited.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (1998). All Rights Reserved.
+
+Abstract
+
+ The Point-to-Point Protocol (PPP) [1] provides a standard method for
+ transporting multi-protocol datagrams over point-to-point links.
+
+ This document describes the use of ATM Adaptation Layer 5 (AAL5) for
+ framing PPP encapsulated packets.
+
+Applicability
+
+ This specification is intended for those implementations which desire
+ to use the facilities which are defined for PPP, such as the Link
+ Control Protocol, Network-layer Control Protocols, authentication,
+ and compression. These capabilities require a point-to-point
+ relationship between the peers, and are not designed for the multi-
+ point relationships which are available in ATM and other multi-access
+ environments.
+
+Gross, et. al. Standards Track [Page 1]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+1. Introduction
+
+ ATM AAL5 protocol is designed to provide virtual connections between
+ end stations attached to the same network. These connections offer a
+ packet delivery service that includes error detection, but does not
+ do error correction.
+
+ Most existing implementations of PPP use ISO 3309 HDLC as a basis for
+ their framing [3].
+
+ When an ATM network is configured with point-to-point connections,
+ PPP can use AAL5 as a framing mechanism.
+
+2. Conventions
+
+ The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
+ SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
+ document, are to be interpreted as described in [10].
+
+3. AAL5 Layer Service Interface
+
+ The PPP layer treats the underlying ATM AAL5 layer service as a bit-
+ synchronous point-to-point link. In this context, the PPP link
+ corresponds to an ATM AAL5 virtual connection. The virtual
+ connection MUST be full-duplex, point to point, and it MAY be either
+ dedicated (i.e. permanent, set up by provisioning) or switched (set
+ up on demand). In addition, the PPP/AAL5 service interface boundary
+ MUST meet the following requirements:
+
+ Interface Format - The PPP/AAL5 layer boundary presents an octet
+ service interface to the AAL5 layer. There is no provision for
+ sub-octets to be supplied or accepted.
+
+ Transmission Rate - The PPP layer does not impose any
+ restrictions regarding transmission rate or the underlying ATM
+ layer traffic descriptor parameters.
+
+ Control Signals - The AAL5 layer MUST provide control signals to
+ the PPP layer which indicate when the virtual connection link
+ has become connected or disconnected. These provide the "Up"
+ and
+
+ "Down" events to the LCP state machine [1] within the PPP layer.
+
+Gross, et. al. Standards Track [Page 2]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+4. Multi-Protocol Encapsulation
+
+ This specification uses the principles, terminology, and frame
+ structure described in "Multiprotocol Encapsulation over ATM
+ Adaptation Layer 5" [4].
+
+ The purpose of this specification is not to document what is already
+ standardized in [4], but to specify how the mechanisms described in
+ [4] are to be used to map PPP onto an AAL5-based ATM network.
+ Section 1 within [4] defines the two mechanisms for identifying the
+ Protocol Data Unit (PDU) payload field's protocol type: virtual
+ circuit based multiplexing, and Logical Link Control (LLC)
+ encapsulation. In the former technique, the payload's protocol type
+ is implicitly agreed to by the end points for each virtual circuit
+ using provisioning or control plane procedures. When using the LLC
+ encapsulation technique, the payload's protocol type is explicitly
+ identified on a per PDU basis by an in-band LLC header, followed by
+ the payload data.
+
+ When transporting a PPP payload over AAL5, an implementation:
+
+ 1. MUST support virtual circuit multiplexed PPP payloads as
+ described in section 5 below by mutual configuration or
+ negotiation of both end points. This technique is referred to
+ as "VC-multiplexed PPP".
+
+ 2. MUST support LLC encapsulated PPP payloads on PVCs as
+ described in section 6 below by mutual configuration or
+ negotiation of both end points. This technique is referred to
+ as "LLC encapsulated PPP".
+
+ 3. For SVC set up, an implementation MUST negotiate using the
+ Q.2931 [9] Annex C procedure, encoding the Broadband Lower Layer
+ Interface (B-LLI) information element to signal either VC-
+ multiplexed PPP or LLC encapsulated PPP. The details of this
+ control plane procedure are described in section 7.
+
+ If an implementation is connecting through a Frame Relay/ATM FRF.8
+ [7] service inter-working unit to an RFC 1973 [6] end point, then it
+ MUST use LLC encapsulated PPP payloads. Frame Relay/ATM FRF.8
+ inter-working units are exempted from the requirement to support VC-
+ multiplexed PPP. This exemption allows the FR/ATM IWU to remain
+ compliant with FRF.8 when the PPP over AAL5 end point is inter-
+ operating with an RFC 1973 end point.
+
+Gross, et. al. Standards Track [Page 3]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+5. Virtual Circuit Multiplexed PPP Over AAL5
+
+ The AAL5 PDU format is shown in figure 1:
+
+ AAL5 CPCS-PDU Format
+ +-------------------------------+
+ | . |
+ | . |
+ | CPCS-PDU Payload |
+ | up to 2^16 - 1 octets) |
+ | . |
+ +-------------------------------+
+ | PAD ( 0 - 47 octets) |
+ +-------------------------------+ -------
+ | CPCS-UU (1 octet ) | ^
+ +-------------------------------+ |
+ | CPI (1 octet ) | |
+ +-------------------------------+CPCS-PDU Trailer
+ | Length (2 octets) | |
+ +-------------------------------| |
+ | CRC (4 octets) | V
+ +-------------------------------+ -------
+ Figure 1
+
+ The Common Part Convergence Sub-layer (CPCS)-PDU Payload field
+ contains user information up to 2^16 - 1 octets.
+
+ The PAD field pads the CPCS-PDU to fit exactly into the ATM cells
+ such that the last 48 octet cell payload created by the SAR sublayer
+ will have the CPCS-PDU Trailer right justified in the cell.
+
+ The CPCS-UU (User-to-User indication) field is used to transparently
+ transfer CPCS user to user information. The field has no function
+ under the multi-protocol ATM encapsulation described in this memo and
+ can be set to any value.
+
+ The CPI (Common Part Indicator) field aligns the CPCS-PDU trailer to
+ 64 bits. Possible additional functions are for further study in
+ ITU-T. When only the 64 bit alignment function is used, this field
+ shall be coded as 0x00.
+
+ The Length field indicates the length, in octets, of the Payload
+ field. The maximum value for the Length field is 65535 octets. A
+ Length field coded as 0x00 is used for the abort function.
+
+ The CRC field protects the entire CPCS-PDU except the CRC field
+ itself.
+
+Gross, et. al. Standards Track [Page 4]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ A VC-multiplexed PPP frame SHALL constitute the CPCS-PDU payload and
+ is defined as:
+
+ +-------------+-------------+---------+
+ | Protocol ID | Information | Padding |
+ | 8/16 bits | | |
+ +-------------+-------------+---------+
+ Figure 2
+
+ Each of these fields are specifically defined in [1].
+
+6. LLC Encapsulated PPP Over AAL5
+
+ LLC encapsulated PPP over AAL5 is the alternative technique to VC-
+ multiplexed PPP over AAL5.
+
+ The AAL5 CPCS-PDU payload field is encoded as shown in figure 3.
+ The pertinent fields in that diagram are:
+
+ 1. LLC header: 2 bytes encoded to specify a source SAP and
+ destination SAP of routed OSI PDU (values 0xFE 0xFE), followed
+ by an Un-numbered Information (UI) frame type (value 0x03).
+
+ 2. Network Layer Protocol IDentifier (NLPID) representing PPP,
+ (value 0xCF).
+
+ 3. the PPP protocol identifier field, which can be either 1 or 2
+ octets long. See reference [1].
+
+ 4. followed by the PPP information field as per Figure 2.
+
+Gross, et. al. Standards Track [Page 5]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ +-------------------------+ --------
+ | Destination SAP (0xFE) | ^
+ +-------------------------+ |
+ | Source SAP (0xFE) | LLC header
+ +-------------------------+ |
+ | Frame Type = UI (0x03) | V
+ +-------------------------+ --------
+ | NLPID = PPP (0xCF) |
+ +-------------------------+ --------
+ | Protocol Identifier | ^
+ | (8 or 16 bits) | |
+ +-------------------------+ PPP payload
+ | . | |
+ | . | |
+ | PPP information field | |
+ | . | |
+ | . | |
+ +-------------------------+ |
+ | padding | V
+ +-------------------------+ --------
+ | PAD ( 0 - 47 octets) |
+ +-------------------------+ --------
+ | CPCS-UU (1 octet ) | ^
+ +-------------------------+ |
+ | CPI (1 octet ) | |
+ +-------------------------+CPCS-PDU Trailer
+ | Length (2 octets) | |
+ +-------------------------| |
+ | CRC (4 octets) | V
+ +-------------------------+ --------
+
+ Figure 3
+
+ The end points MAY be bi-laterally provisioned to send other LLC-
+ encapsulated protocols besides PPP across the same virtual
+ connection. However, they MUST NOT send packets belonging to any
+ protocol that has an active NCP within the PPP session.
+ Implementations SHOULD do packet scheduling that minimizes the
+ performance impact on the quality of service commitments associated
+ with both the LLC-encapsulated PPP and non-PPP protocol flows.
+
+7. Out-Of-Band Control Plane Signaling
+
+ When originating a switched virtual circuit AAL5 connection, the
+ caller MUST request in the SETUP message either VC-multiplexed PPP,
+ LLC-encapsulated PPP, or else both VC-multiplexed and LLC-
+ encapsulated PPP. When a caller is offering both techniques, the two
+
+Gross, et. al. Standards Track [Page 6]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ B-LLI IEs are encoded within a Broadband Repeat Indicator IE in the
+ order of their preference. The called implementation MUST be able to
+ accept an incoming call that offers LLC-encapsulated PPP in the
+ caller's request. The called implementation MUST reject a call set
+ up request that only offers an encapsulation that it does not
+ support. Implementations originating a call offering both protocol
+ encapsulation techniques MUST be able to negotiate the use of LLC-
+ encapsulated PPP.
+
+ When originating a virtual circuit multiplexed call that is to carry
+ a PPP payload, the ITU Q.2931 [9] B-LLI element user information
+ layer 3 protocol field is encoded to select ISO/IEC TR 9577 [5] in
+ octet 7. The extension octets specify an IPI value of PPP (0xCF).
+ By definition, the first bytes of the AAL5 frame's payload field will
+ always contain a PPP header followed by a packet.
+
+ When originating an LLC encapsulated call that is to carry a PPP
+ payload, the ITU Q.2931 B-LLI element user information layer 2
+ protocol field is encoded to select LAN Logical Link Control
+ (ISO/IEC8802-2) in octet 6. See RFC 1755 [8] appendix A for an
+ example. By definition, the first bytes of the AAL5 frame's payload
+ field will contain an LLC header, followed by a NLPID and the PPP
+ payload.
+
+8. Detection And Recovery From Unsolicited PPP Encapsulation Transitions
+
+ When the virtual connection loses state, the PPP encapsulation
+ technique may uni-laterally and unexpectedly change across such
+ transitions. Detection and recovery procedures are defined for the
+ following state transitions:
+
+ VC-multiplexed PPP changing to LLC encapsulated PPP
+
+ LLC encapsulated PPP changing to VC-multiplexed PPP
+
+ When LLC-encapsulated PPP is being used, the inital 6 octets of the
+ LCP packets contain the sequence: fe-fe-03-cf-c0-21. This sequence
+ constitutes the first 6 octets of the AAL5 frame. In the case of
+ VC-multiplexed PPP, initial LCP packets contain the sequence c0-21.
+ This sequence constitutes the first 2 octets of an AAL5 frame. When
+ a LCP Configure-Request packet is received and recognized, the PPP
+ link enters Link Establishment phase.
+
+ Once PPP has entered the Network-layer Protocol phase, and
+ successfully negotiated a particular NCP for a PPP Protocol, if a
+ frame arrives using an alternate but equivalent data encapsulation as
+ defined in [4], then the PPP Link MUST:
+
+Gross, et. al. Standards Track [Page 7]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ For a SVC, immediately clear the call with the cause value 111,
+ "protocol error, unspecified".
+
+ For a PVC: tear down the active NCPs, SHOULD generate an error
+ message, enter the Termination state, and silently drop all
+ received packets.
+
+ These policies prevent "black-holes" that occur when the peer loses
+ state. An implementation which requires PPP link configuration, and
+ other PPP negotiated features (such as authentication), MAY enter
+ Termination state when configuration fails.
+
+9. LCP Configuration Options
+
+ The Magic Number LCP configuration option is RECOMMENDED, and the
+ Protocol Field Compression (PFC) option is NOT RECOMMENDED. An
+ implementation MUST NOT request any of the following options, and
+ MUST reject a request for such an option:
+
+ Field Check Sequence (FCS) Alternatives,
+
+ Address-and-Control-Field-Compression (ACFC),
+
+ Asynchronous-Control-Character-Map (ACCM)
+
+ The Maximum-Receive-Unit (MRU) option MUST NOT be negotiated to a
+ larger size than the maximum CPCS-SDU size specified in the
+ associated direction for the virtual connection's traffic contract.
+
+ When viewed peer to peer, a PPP link may be bridged over multiple
+ physical layer sections. For each such AAL5 section, the LCP framing
+ options MUST be actively negotiated by the bridging convertors
+ independently of the LCP framing options in use by other physical
+ layer sections.
+
+ Implementation Note:
+ When an ATM AAL5 PVC is in the "Stopped" state, it is
+ RECOMMENDED that the implementation wait for Configure-Requests.
+ See the implementation option in reference [1] section 4.2, the
+ "Stopped State" sub-section.
+
+10. Security Considerations
+
+ Generally, ATM networks are virtual circuit based, and security is
+ implicit in the public data networking service provider's
+ administration of Permanent Virtual Circuits (PVCs) between the
+ network boundaries. The probability of a security breach caused by
+ mis-routed ATM cells is considered to be negligible.
+
+Gross, et. al. Standards Track [Page 8]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ When a public ATM network supports Switched Virtual Circuits, the
+ protocol model becomes analogous to traditional voice band modem dial
+ up over the Public Telephone Switched Network (PTSN). The same
+ PAP/CHAP authentication protocols that are already widely in use for
+ Internet dial up access are leveraged. As a consequence, PPP over
+ AAL5 security is at parity with those practices already established
+ by the existing Internet infrastructure.
+
+ Those applications that require stronger security are encouraged to
+ use authentication headers, or encrypted payloads, and/or ATM-layer
+ security services.
+
+ When using LLC-encapsulated PPP over a virtual connection, an end
+ point can not assume that the PPP session authentication and related
+ security mechanisms also secure the other LLC encapsulated flows on
+ that same virtual connection.
+
+11. Acknowledgments
+
+ This design is based on work performed in ADSL Forum's Packet Mode
+ Working Group. It is inspired by "PPP in Frame Relay", RFC 1973, by
+ William Simpson. Special thanks to Phil Rakity of Flowpoint, Tim
+ Kwok of Microsoft, and David Allan of Nortel for their constructive
+ review and commentary.
+
+12. References
+
+ [1] Simpson, W., Editor, "The Point-to-Point Protocol (PPP)", STD
+ 51, RFC 1661, July 1994.
+
+ [2] The ATM Forum, "Frame based User-to-Network Interface (FUNI)
+ Specification v2", af-saa-0088.000, May 1997.
+
+ [3] Simpson, W., Editor, "PPP in HDLC-like Framing", STD 51, RFC
+ 1662, July 1994.
+
+ [4] Heinanen, J., "Multiprotocol Interconnect over AAL5", RFC 1483,
+ July 1993.
+
+ [5] ISO/IEC DTR 9577.2, "Information technology -
+ Telecommunications and Information exchange between systems -
+ Protocol Identification in the network layer", 1995-08-16.
+
+ [6] Simpson, W., "PPP in Frame Relay", RFC 1973, June 1996.
+
+ [7] The Frame Relay Forum, "Frame Relay/ATM PVC Service Inter-
+ working Implementation Agreement", FRF.8, April 1995.
+
+Gross, et. al. Standards Track [Page 9]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ [8] Perez, M., Liaw, F., Mankin, A., Hoffman, E., Grossman, D., and
+ A. Malis, "ATM Signaling Support for IP over ATM", RFC 1755,
+ February 1995.
+
+ [9] International Telecommunication Union, "Broadband Integrated
+ Service Digital Network (B-ISDN) Digital Subscriber Signaling
+ System No.2 (DSS2) User Network Interface Layer 3 Specification
+ for Basic Call/Connection Control", ITU-T Recommendation
+ Q.2931, (International Telecommunication Union: Geneva, 2/95)
+
+ [10] Bradner, S., "Key words for use in RFCs to Indicate Requirement
+ Levels", BCP 14, RFC 2119, March 1997.
+
+Chair's Address
+
+ The working group can be contacted via the current chair:
+
+ Karl Fox
+ Ascend Communications
+ 3518 Riverside Drive, Suite 101
+ Columbus, Ohio 43221
+
+ EMail: karl at ascend.com
+
+Authors' Addresses
+
+ Questions about this memo can also be directed to:
+
+ George Gross
+ Lucent Technologies, Inc
+ 184 Liberty Corner Road
+ Warren, NJ 07059
+
+ Phone: +1.908.580.4589
+ EMail: gmgross at lucent.com
+
+ Manu Kaycee
+ Paradyne Corporation
+ 21 Bear Meadow Road
+ Londonderry, NH 03053-2168
+
+ Phone: +1.603.434.6088
+ EMail: mjk at nj.paradyne.com
+
+Gross, et. al. Standards Track [Page 10]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+ Arthur Lin
+ Shasta Networks Inc.
+ 249 Humboldt Court
+ Sunnyvale, CA 94089-1300
+
+ Phone: +1.408.747.5051
+ EMail: alin at shastanets.com
+
+ Andrew Malis
+ Ascend Communications, Inc.
+ 1 Robbins Road
+ Westford, MA 01886
+
+ Phone: +1.978.952.7414
+ EMail: malis at ascend.com
+
+ John Stephens
+ Cayman Systems, Inc.
+ 100 Maple Street
+ Stoneham, MA 02180
+
+ Phone: +1.617.279.1101
+ EMail: john at cayman.com
+
+Gross, et. al. Standards Track [Page 11]
+
+RFC 2364 PPP Over AAL5 July 1998
+
+Full Copyright Statement
+
+ Copyright (C) The Internet Society (1998). All Rights Reserved.
+
+ This document and translations of it may be copied and furnished to
+ others, and derivative works that comment on or otherwise explain it
+ or assist in its implementation may be prepared, copied, published
+ and distributed, in whole or in part, without restriction of any
+ kind, provided that the above copyright notice and this paragraph are
+ included on all such copies and derivative works. However, this
+ document itself may not be modified in any way, such as by removing
+ the copyright notice or references to the Internet Society or other
+ Internet organizations, except as needed for the purpose of
+ developing Internet standards in which case the procedures for
+ copyrights defined in the Internet Standards process must be
+ followed, or as required to translate it into languages other than
+ English.
+
+ The limited permissions granted above are perpetual and will not be
+ revoked by the Internet Society or its successors or assigns.
+
+ This document and the information contained herein is provided on an
+ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Gross, et. al. Standards Track [Page 12]
Added: dists/trunk/modules/unicorn/unicorn/RFCs/rfc2684.txt
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/RFCs/rfc2684.txt Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1094 @@
+Network Working Group D. Grossman
+Request for Comments: 2684 Motorola, Inc.
+Obsoletes: 1483 J. Heinanen
+Category: Standards Track Telia
+ September 1999
+
+ Multiprotocol Encapsulation over ATM Adaptation Layer 5
+
+Status of this Memo
+
+ This document specifies an Internet standards track protocol for the
+ Internet community, and requests discussion and suggestions for
+ improvements. Please refer to the current edition of the "Internet
+ Official Protocol Standards" (STD 1) for the standardization state
+ and status of this protocol. Distribution of this memo is unlimited.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (1999). All Rights Reserved.
+
+Abstract
+
+ This memo replaces RFC 1483. It describes two encapsulations methods
+ for carrying network interconnect traffic over AAL type 5 over ATM.
+ The first method allows multiplexing of multiple protocols over a
+ single ATM virtual connection whereas the second method assumes that
+ each protocol is carried over a separate ATM virtual connection.
+
+Applicability
+
+ This specification is intended to be used in implementations which
+ use ATM networks to carry multiprotocol traffic among hosts, routers
+ and bridges which are ATM end systems.
+
+1. Introduction
+
+ Asynchronous Transfer Mode (ATM) wide area, campus and local area
+ networks are used to transport IP datagrams and other connectionless
+ traffic between hosts, routers, bridges and other networking devices.
+ This memo describes two methods for carrying connectionless routed
+ and bridged Protocol Data Units (PDUs) over an ATM network. The "LLC
+ Encapsulation" method allows multiplexing of multiple protocols over
+ a single ATM virtual connection (VC). The protocol type of each PDU
+ is identified by a prefixed IEEE 802.2 Logical Link Control (LLC)
+ header. In the "VC Multiplexing" method, each ATM VC carries PDUs of
+ exactly one protocol type. When multiple protocols need to be
+ transported, there is a separate VC for each.
+
+Grossman & Heinanen Standards Track [Page 1]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The unit of transport in ATM is a 53 octet fixed length PDU called a
+ cell. A cell consists of a 5 octet header and a 48 byte payload.
+ Variable length PDUs, including those addressed in this memo, must be
+ segmented by the transmitter to fit into the 48 octet ATM cell
+ payload, and reassembled by the receiver. This memo specifies the
+ use of the ATM Adaptation Layer type 5 (AAL5), as defined in ITU-T
+ Recommendation I.363.5 [2] for this purpose. Variable length PDUs are
+ carried in the Payload field of the AAL5 Common Part Convergence
+ Sublayer (CPCS) PDU.
+
+ This memo only describes how routed and bridged PDUs are carried
+ directly over the AAL5 CPCS, i.e., when the Service Specific
+ Convergence Sublayer (SSCS) of AAL5 is absent. If Frame Relay
+ Service Specific Convergence Sublayer (FR-SSCS), as defined in ITU-T
+ Recommendation I.365.1 [3], is used over the CPCS, then routed and
+ bridged PDUs are carried using the NLPID multiplexing method
+ described in RFC 2427 [4]. The RFC 2427 encapsulation MUST be used in
+ the special case that Frame Relay Network Interworking or transparent
+ mode Service Interworking [9] are used, but is NOT RECOMMENDED for
+ other applications. Appendix A (which is for information only) shows
+ the format of the FR-SSCS-PDU as well as how IP and CLNP PDUs are
+ encapsulated over FR-SSCS according to RFC 2427.
+
+ This memo also includes an optional encapsulation for use with
+ Virtual Private Networks that operate over an ATM subnet.
+
+ If it is desired to use the facilities which are designed for the
+ Point-to-Point Protocol (PPP), and there exists a point-to-point
+ relationship between peer systems, then RFC 2364, rather than this
+ memo, applies.
+
+2. Conventions
+
+ The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
+ SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL, when
+ they appear in this document, are to be interpreted as described in
+ RFC 2119 [10].
+
+3. Selection of the Multiplexing Method
+
+ The decision as to whether to use LLC encapsulation or VC-
+ multiplexing depends on implementation and system requirements. In
+ general, LLC encapsulation tends to require fewer VCs in a
+ multiprotocol environment. VC multiplexing tends to reduce
+ fragmentation overhead (e.g., an IPV4 datagram containing a TCP
+ control packet with neither IP nor TCP options exactly fits into a
+ single cell).
+
+Grossman & Heinanen Standards Track [Page 2]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ When two ATM end systems wish to exchange connectionless PDUs across
+ an ATM Permanent Virtual Connection (PVC), selection of the
+ multiplexing method is done by configuration. ATM connection control
+ signalling procedures are used to negotiate the encapsulation method
+ when ATM Switched Virtual Connections (SVCs) are to be used. [5] and
+ [8] specify how this negotiation is done.
+
+4. AAL5 PDU Format
+
+ For both multiplexing methods, routed and bridged PDUs MUST be
+ encapsulated within the Payload field of an AAL5 CPCS-PDU.
+
+ ITU-T Recomendation I.363.5 [2] provides the complete definition of
+ the AAL5 PDU format and procedures at the sender and receiver. The
+ AAL5 message mode service, in the non-assured mode of operation MUST
+ be used. The corrupted delivery option MUST NOT be used. A
+ reassembly timer MAY be used. The following description is provided
+ for information.
+
+ The format of the AAL5 CPCS-PDU is shown below:
+
+ AAL5 CPCS-PDU Format
+ +-------------------------------+
+ | . |
+ | . |
+ | CPCS-PDU Payload |
+ | up to 2^16 - 1 octets) |
+ | . |
+ | . |
+ +-------------------------------+
+ | PAD ( 0 - 47 octets) |
+ +-------------------------------+ -------
+ | CPCS-UU (1 octet ) |
+ +-------------------------------+
+ | CPI (1 octet ) |
+ +-------------------------------+CPCS-PDU Trailer
+ | Length (2 octets) |
+ +-------------------------------|
+ | CRC (4 octets) |
+ +-------------------------------+ -------
+
+ The Payload field contains user information up to 2^16 - 1 octets.
+
+ The PAD field pads the CPCS-PDU to fit exactly into the ATM cells
+ such that the last 48 octet cell payload created by the SAR sublayer
+ will have the CPCS-PDU Trailer right justified in the cell.
+
+Grossman & Heinanen Standards Track [Page 3]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The CPCS-UU (User-to-User indication) field is used to transparently
+ transfer CPCS user to user information. The field is not used by the
+ multiprotocol ATM encapsulation described in this memo and MAY be set
+ to any value.
+
+ The CPI (Common Part Indicator) field aligns the CPCS-PDU trailer to
+ 64 bits. This field MUST be coded as 0x00.
+
+ The Length field indicates the length, in octets, of the Payload
+ field. The maximum value for the Length field is 65535 octets. A
+ Length field coded as 0x00 is used for the abort function.
+
+ The CRC field is used to detect bit errors in the CPCS-PDU. A CRC-32
+ is used.
+
+5. LLC Encapsulation
+
+ LLC Encapsulation is needed when more than one protocol might be
+ carried over the same VC. In order to allow the receiver to properly
+ process the incoming AAL5 CPCS-PDU, the Payload Field contains
+ information necessary to identify the protocol of the routed or
+ bridged PDU. In LLC Encapsulation, this information MUST be encoded
+ in an LLC header placed in front of the carried PDU.
+
+ Although this memo only deals with protocols that operate over LLC
+ Type 1 (unacknowledged connectionless mode) service, the same
+ encapsulation principle also applies to protocols operating over LLC
+ Type 2 (connection-mode) service. In the latter case the format and
+ contents of the LLC header would be as described in IEEE 802.1 and
+ IEEE 802.2.
+
+5.1. LLC Encapsulation for Routed Protocols
+
+ In LLC Encapsulation, the protocol type of routed PDUs MUST be
+ identified by prefixing an IEEE 802.2 LLC header to each PDU. In
+ some cases, the LLC header MUST be followed by an IEEE 802.1a
+ SubNetwork Attachment Point (SNAP) header. In LLC Type 1 operation,
+ the LLC header MUST consist of three one octet fields:
+
+ +------+------+------+
+ | DSAP | SSAP | Ctrl |
+ +------+------+------+
+
+ In LLC Encapsulation for routed protocols, the Control field MUST be
+ set to 0x03, specifying a Unnumbered Information (UI) Command PDU.
+
+Grossman & Heinanen Standards Track [Page 4]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The LLC header value 0xFE-FE-03 MUST be used to identify a routed PDU
+ in the ISO NLPID format (see [6] and Appendix B). For NLPID-formatted
+ routed PDUs, the content of the AAL5 CPCS-PDU Payload field MUST be
+ as follows:
+
+ Payload Format for Routed NLPID-formatted PDUs
+ +-------------------------------+
+ | LLC 0xFE-FE-03 |
+ +-------------------------------+
+ | NLPID (1 octet) |
+ +-------------------------------+
+ | . |
+ | PDU |
+ | (up to 2^16 - 4 octets) |
+ | . |
+ +-------------------------------+
+
+ The routed protocol MUST be identified by a one octet NLPID field
+ that is part of Protocol Data. NLPID values are administered by ISO
+ and ITU-T. They are defined in ISO/IEC TR 9577 [6] and some of the
+ currently defined ones are listed in Appendix C.
+
+ An NLPID value of 0x00 is defined in ISO/IEC TR 9577 as the Null
+ Network Layer or Inactive Set. Since it has no significance within
+ the context of this encapsulation scheme, a NLPID value of 0x00 MUST
+ NOT be used.
+
+ Although there is a NLPID value (0xCC) that indicates IP, the NLPID
+ format MUST NOT be used for IP. Instead, IP datagrams MUST be
+ identified by a SNAP header, as defined below.
+
+ The presence of am IEEE 802.1a SNAP header is indicated by the LLC
+ header value 0xAA-AA-03. A SNAP header is of the form
+
+ +------+------+------+------+------+
+ | OUI | PID |
+ +------+------+------+------+------+
+
+ The SNAP header consists of a three octet Organizationally Unique
+ Identifier (OUI) and a two octet Protocol Identifier (PID). The OUI
+ is administered by IEEE and identifies an organization which
+ administers the values which might be assigned to the PID. The SNAP
+ header thus uniquely identifies a routed or bridged protocol. The
+ OUI value 0x00-00-00 indicates that the PID is an EtherType.
+
+Grossman & Heinanen Standards Track [Page 5]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The format of the AAL5 CPCS-PDU Payload field for routed non-NLPID
+ Formatted PDUs MUST be as follows:
+
+ Payload Format for Routed non-NLPID formatted PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-00-00 |
+ +-------------------------------+
+ | EtherType (2 octets) |
+ +-------------------------------+
+ | . |
+ | Non-NLPID formatted PDU |
+ | (up to 2^16 - 9 octets) |
+ | . |
+ +-------------------------------+
+
+ In the particular case of an IPv4 PDU, the Ethertype value is 0x08-
+ 00, and the payload format MUST be:
+
+ Payload Format for Routed IPv4 PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-00-00 |
+ +-------------------------------+
+ | EtherType 0x08-00 |
+ +-------------------------------+
+ | . |
+ | IPv4 PDU |
+ | (up to 2^16 - 9 octets) |
+ | . |
+ +-------------------------------+
+
+ This format is consistent with that defined in RFC 1042 [7].
+
+5.2. LLC Encapsulation for Bridged Protocols
+
+ In LLC Encapsulation, bridged PDUs are encapsulated by identifying
+ the type of the bridged media in the SNAP header. The presence of
+ the SNAP header MUST be indicated by the LLC header value 0xAA-AA-03.
+ The OUI value in the SNAP header MUST be the 802.1 organization code
+ 0x00-80-C2. The type of the bridged media MUST be specified by the
+ two octet PID. The PID MUST also indicate whether the original Frame
+ Check Sequence (FCS) is preserved within the bridged PDU. Appendix B
+ provides a list of media type (PID) values that can be used in ATM
+ encapsulation.
+
+Grossman & Heinanen Standards Track [Page 6]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The AAL5 CPCS-PDU Payload field carrying a bridged PDU MUST have one
+ of the following formats. The necessary number of padding octets
+ MUST be added after the PID field in order to align the
+ Ethernet/802.3 LLC Data field, 802.4 Data Unit field, 802.5 Info
+ field, FDDI Info field or 802.6 Info field (respectively) of the
+ bridged PDU to begin at a four octet boundary. The bit ordering of
+ the MAC address MUST be the same as it would be on the LAN or MAN
+ (e.g., in canoncial form for bridged Ethernet/IEEE 802.3 PDUs, but in
+ 802.5/FDDI format for bridged 802.5 PDUs).
+
+ Payload Format for Bridged Ethernet/802.3 PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-01 or 0x00-07 |
+ +-------------------------------+
+ | PAD 0x00-00 |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (if PID is 0x00-01) |
+ +-------------------------------+
+
+ The Ethernet/802.3 physical layer requires padding of frames to a
+ minimum size. A bridge that uses uses the Bridged Ethernet/802.3
+ encapsulation format with the preserved LAN FCS MUST include padding.
+ A bridge that uses the Bridged Ethernet/802.3 encapsulation format
+ without the preserved LAN FCS MAY either include padding, or omit it.
+ When a bridge receives a frame in this format without the LAN FCS, it
+ MUST be able to insert the necessary padding (if none is already
+ present) before forwarding to an Ethernet/802.3 subnetwork.
+
+Grossman & Heinanen Standards Track [Page 7]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ Payload Format for Bridged 802.4 PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-02 or 0x00-08 |
+ +-------------------------------+
+ | PAD 0x00-00-00 |
+ +-------------------------------+
+ | Frame Control (1 octet) |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (if PID is 0x00-02) |
+ +-------------------------------+
+
+ Payload Format for Bridged 802.5 PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-03 or 0x00-09 |
+ +-------------------------------+
+ | PAD 0x00-00-XX |
+ +-------------------------------+
+ | Frame Control (1 octet) |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (if PID is 0x00-03) |
+ +-------------------------------+
+
+ Since the 802.5 Access Control (AC) field has no significance outside
+ the local 802.5 subnetwork, it is treated by this encapsulation as
+ the last octet of the three octet PAD field. It MAY be set to any
+ value by the sending bridge and MUST be ignored by the receiving
+ bridge.
+
+Grossman & Heinanen Standards Track [Page 8]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ Payload Format for Bridged FDDI PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-04 or 0x00-0A |
+ +-------------------------------+
+ | PAD 0x00-00-00 |
+ +-------------------------------+
+ | Frame Control (1 octet) |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (if PID is 0x00-04) |
+ +-------------------------------+
+
+ Payload Format for Bridged 802.6 PDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-0B |
+ +---------------+---------------+ ------
+ | Reserved | BEtag | Common
+ +---------------+---------------+ PDU
+ | BAsize | Header
+ +-------------------------------+ -------
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | |
+ | Common PDU Trailer |
+ | |
+ +-------------------------------+
+
+ In bridged 802.6 PDUs, the presence of a CRC-32 is indicated by the
+ CIB bit in the header of the MAC frame. Therefore, the same PID
+ value is used regardless of the presence or absence of the CRC-32 in
+ the PDU.
+
+Grossman & Heinanen Standards Track [Page 9]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ The Common Protocol Data Unit (PDU) Header and Trailer are conveyed
+ to allow pipelining at the egress bridge to an 802.6 subnetwork.
+ Specifically, the Common PDU Header contains the BAsize field, which
+ contains the length of the PDU. If this field is not available to
+ the egress 802.6 bridge, then that bridge cannot begin to transmit
+ the segmented PDU until it has received the entire PDU, calculated
+ the length, and inserted the length into the BAsize field. If the
+ field is available, the egress 802.6 bridge can extract the length
+ from the BAsize field of the Common PDU Header, insert it into the
+ corresponding field of the first segment, and immediately transmit
+ the segment onto the 802.6 subnetwork. Thus, the bridge can begin
+ transmitting the 802.6 PDU before it has received the complete PDU.
+
+ Note that the Common PDU Header and Trailer of the encapsulated frame
+ should not be simply copied to the outgoing 802.6 subnetwork because
+ the encapsulated BEtag value may conflict with the previous BEtag
+ value transmitted by that bridge.
+
+ An ingress 802.6 bridge can abort an AAL5 CPCS-PDU by setting its
+ Length field to zero. If the egress bridge has already begun
+ transmitting segments of the PDU to an 802.6 subnetwork and then
+ notices that the AAL5 CPCS-PDU has been aborted, it may immediately
+ generate an EOM cell that causes the 802.6 PDU to be rejected at the
+ receiving bridge. Such an EOM cell could, for example, contain an
+ invalid value in the Length field of the Common PDU Trailer.
+
+ Payload Format for BPDUs
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-80-C2 |
+ +-------------------------------+
+ | PID 0x00-0E |
+ +-------------------------------+
+ | |
+ | BPDU as defined by |
+ | 802.1(d) or 802.1(g) |
+ | |
+ +-------------------------------+
+
+6. VC Multiplexing
+
+ VC Multiplexing creates a binding between an ATM VC and the type of
+ the network protocol carried on that VC. Thus, there is no need for
+ protocol identification information to be carried in the payload of
+ each AAL5 CPCS-PDU. This reduces payload overhead and can reduce
+ per-packet processing. VC multiplexing can improve efficiency by
+ reducing the number of cells needed to carry PDUs of certain lengths.
+
+Grossman & Heinanen Standards Track [Page 10]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ For ATM PVCs, the type of the protocol to be carried over each PVC
+ MUST be determined by configuration. For ATM SVCs, the negotiations
+ specified in RFC 1755 [5] MUST be used.
+
+6.1. VC Multiplexing of Routed Protocols
+
+ PDUs of routed protocols MUST be carried as the only content of the
+ Payload of the AAL5 CPCS-PDU. The format of the AAL5 CPCS-PDU
+ Payload field thus becomes:
+
+ Payload Format for Routed PDUs
+ +-------------------------------+
+ | . |
+ | Carried PDU |
+ | (up to 2^16 - 1 octets) |
+ | . |
+ | . |
+ +-------------------------------+
+
+6.2. VC Multiplexing of Bridged Protocols
+
+ PDUs of bridged protocols MUST be carried in the Payload of the AAL5
+ CPCS-PDU exactly as described in section 5.2, except that only the
+ fields after the PID field MUST be included. The AAL5 CPCS-PDU
+ Payload field carrying a bridged PDU MUST, therefore, have one of the
+ following formats.
+
+ Payload Format for Bridged Ethernet/802.3 PDUs
+ +-------------------------------+
+ | PAD 0x00-00 |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (VC dependent option) |
+ +-------------------------------+
+
+Grossman & Heinanen Standards Track [Page 11]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ Payload Format for Bridged 802.4/802.5/FDDI PDUs
+ +-------------------------------+
+ | PAD 0x00-00-00 or 0x00-00-XX |
+ +-------------------------------+
+ | Frame Control (1 octet) |
+ +-------------------------------+
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | LAN FCS (VC dependent option) |
+ +-------------------------------+
+
+ Note that the 802.5 Access Control (AC) field has no significance
+ outside the local 802.5 subnetwork. It can thus be regarded as the
+ last octet of the three octet PAD field, which in case of 802.5 can
+ be set to any value (XX).
+
+ Payload Format for Bridged 802.6 PDUs
+ +---------------+---------------+ -------
+ | Reserved | BEtag | Common
+ +---------------+---------------+ PDU
+ | BAsize | Header
+ +-------------------------------+ -------
+ | MAC destination address |
+ +-------------------------------+
+ | |
+ | (remainder of MAC frame) |
+ | |
+ +-------------------------------+
+ | |
+ | Common PDU Trailer |
+ | |
+ +-------------------------------+
+
+ Payload Format for BPDUs
+ +-------------------------------+
+ | |
+ | BPDU as defined by |
+ | 802.1(d) or 802.1(g) |
+ | |
+ +-------------------------------+
+
+Grossman & Heinanen Standards Track [Page 12]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ In case of Ethernet, 802.3, 802.4, 802.5, and FDDI PDUs the presense
+ or absence of the trailing LAN FCS shall be identified implicitly by
+ the VC, since the PID field is not included. PDUs with the LAN FCS
+ and PDUs without the LAN FCS are thus considered to belong to
+ different protocols even if the bridged media type would be the same.
+
+7. Bridging in an ATM Network
+
+ A bridge with an ATM interface that serves as a link to one or more
+ other bridge MUST be able to flood, forward, and filter bridged PDUs.
+
+ Flooding is performed by sending the PDU to all possible appropriate
+ destinations. In the ATM environment this means sending the PDU
+ through each relevant VC. This may be accomplished by explicitly
+ copying it to each VC or by using a point-to-multipoint VC.
+
+ To forward a PDU, a bridge MUST be able to associate a destination
+ MAC address with a VC. It is unreasonable and perhaps impossible to
+ require bridges to statically configure an association of every
+ possible destination MAC address with a VC. Therefore, ATM bridges
+ must provide enough information to allow an ATM interface to
+ dynamically learn about foreign destinations beyond the set of ATM
+ stations.
+
+ To accomplish dynamic learning, a bridged PDU MUST conform to the
+ encapsulation described in section 5. In this way, the receiving ATM
+ interface will know to look into the bridged PDU and learn the
+ association between foreign destination and an ATM station.
+
+8. Virtual Private Network (VPN) identification
+
+ The encapsulation defined in this section applies only to Virtual
+ Private Networks (VPNs) that operate over an ATM subnet.
+
+ A mechanism for globally unique identification of Virtual Private
+ multiprotocol networks is defined in [11]. The 7-octet VPN-Id
+ consists of a 3-octet VPN-related OUI (IEEE 802-1990 Organizationally
+ Unique Identifier), followed by a 4-octet VPN index which is
+ allocated by the owner of the VPN-related OUI. Typically, the VPN-
+ related OUI value is assigned to a VPN service provider, which then
+ allocates VPN index values for its customers.
+
+Grossman & Heinanen Standards Track [Page 13]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+8.1 VPN Encapsulation Header
+
+ The format of the VPN encapsulation header is as follows:
+
+ VPN Encapsulation Header
+ +-------------------------------+
+ | LLC 0xAA-AA-03 |
+ +-------------------------------+
+ | OUI 0x00-00-5E |
+ +-------------------------------+
+ | PID 0x00-08 |
+ +-------------------------------+
+ | PAD 0x00 |
+ +-------------------------------+
+ | VPN related OUI (3 octets) |
+ +-------------------------------+
+ | VPN Index (4 octets) |
+ +-------------------------------+
+ | |
+ | (remainder of PDU) |
+ | |
+ +-------------------------------+
+
+ When the encapsulation header is used, the remainder of the PDU MUST
+ be structured according to the appropiate format described in section
+ 5 or 6 (i.e., the VPN encapsulation header is prepended to the PDU
+ within an AAL5 CPCS SDU).
+
+8.2 LLC-encapsulated routed or bridged PDUs within a VPN
+
+ When a LLC-encapsulated routed or bridged PDU is sent within a VPN
+ using ATM over AAL5, a VPN encapsulation header MUST be prepended to
+ the appropriate routed or bridged PDU format defined in sections 5.1
+ and 5.2, respectively.
+
+8.3 VC multiplexing of routed or bridged PDUs within a VPN
+
+ When a routed or bridged PDU is sent within a VPN using VC
+ multiplexing, the VPN identifier MAY either be specified a priori,
+ using ATM connection control signalling or adminstrative assignment
+ to an ATM interface, or it MAY be indicated using an encapsulation
+ header.
+
+ If the VPN is identified using ATM connection control signalling, all
+ PDUs carried by the ATM VC are associated with the same VPN. In this
+ case, the payload formats of routed and bridged PDUs MUST be as
+ defined in sections 6.1 and 6.2, respectively. If a PDU is received
+ containing a VPN encapsulation header when the VPN has been
+
+Grossman & Heinanen Standards Track [Page 14]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ identified using ATM signalling, the receiver MAY drop it and/or take
+ other actions which are implementation specific. Specification of
+ the mechanism in ATM connection control signalling for carrying VPN
+ identifiers is outside the scope of this Memo.
+
+ If a VPN identifier is administratively assigned to an ATM interface,
+ then all PDUs carried by any ATM VCs within that interface are
+ associated with that VPN. In this case, the payload formats of
+ routed and bridged PDUs MUST be as defined in sections 6.1 and 6.2,
+ respectively. If a PDU is received containing a VPN encapsulation
+ header when the VPN identifier has been administratively assigned,
+ the receiver MAY drop it and/or take other actions which are
+ implementation specific. Specification of mechanisms (such as MIBs)
+ for assigning VPN identifiers to ATM interfaces is outside the scope
+ of this memo.
+
+ If the VPN identifier is to be indicated using an encapsulation
+ header, then a VPN encapsulation header MUST be prepended to the
+ appropriate routed or bridged PDU format defined in sections 6.1 and
+ 6.2, respectively.
+
+9. Security Considerations
+
+ This memo defines mechanisms for multiprotocol encapsulation over
+ ATM. There is an element of trust in any encapsulation protocol: a
+ receiver must trust that the sender has correctly identified the
+ protocol being encapsulated. There is no way to ascertain that the
+ sender did use the proper protocol identification (nor would this be
+ desirable functionality). The encapsulation mechanisms described in
+ this memo are believed not to have any other properties that might be
+ exploited by an attacker. However, architectures and protocols
+ operating above the encapsulation layer may be subject to a variety
+ of attacks. In particular, the bridging architecture discussed in
+ section 7 has the same vulnerabilities as other bridging
+ architectures.
+
+ System security may be affected by the properties of the underlying
+ ATM network. The ATM Forum has published a security framework [12]
+ and a security specification [13] which may be relevant.
+
+Grossman & Heinanen Standards Track [Page 15]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+Acknowledgements
+
+ This memo replaces RFC 1483, which was developed by the IP over ATM
+ working group, and edited by Juha Heinanen (then at Telecom Finland,
+ now at Telia). The update was developed in the IP-over-NBMA (ION)
+ working group, and Dan Grossman (Motorola) was editor and also
+ contributed to the work on RFC 1483.
+
+ This material evolved from RFCs [1] and [4] from which much of the
+ material has been adopted. Thanks to their authors Terry Bradley,
+ Caralyn Brown, Andy Malis, Dave Piscitello, and C. Lawrence. Other
+ key contributors to the work included Brian Carpenter (CERN), Rao
+ Cherukuri (IBM), Joel Halpern (then at Network Systems), Bob Hinden
+ (Sun Microsystems, presently at Nokia), and Gary Kessler (MAN
+ Technology).
+
+ The material concerning VPNs was developed by Barbara Fox (Lucent)
+ and Bernhard Petri (Siemens).
+
+References
+
+ [1] Piscitello, D. and C. Lawrence, "The Transmission of IP
+ Datagrams over the SMDS Service", RFC 1209, March 1991.
+
+ [2] ITU-T Recommendation I.363.5, "B-ISDN ATM Adaptation Layer (AAL)
+ Type 5 Specification", August 1996.
+
+ [3] ITU-T Recommendation I.365.1, "Frame Relaying Service Specific
+ Convergence Sublayer (SSCS), November 1993.
+
+ [4] Brown, C. and A. Malis, "Multiprotocol Interconnect over Frame
+ Relay", RFC 2427, September 1998.
+
+ [5] Perez M., Liaw, F., Mankin, E., Grossman, D. and A. Malis, "ATM
+ Signalling Support for IP over ATM", RFC 1755, February 1995.
+
+ [6] Information technology - Telecommunications and Information
+ Exchange Between Systems, "Protocol Identification in the
+ Network Layer". ISO/IEC TR 9577, October 1990.
+
+ [7] Postel, J. and J. Reynolds, "A Standard for the Transmission of
+ IP Datagrams over IEEE 802 Networks", STD 43, RFC 1042, February
+ 1988.
+
+ [8] Maher, M., "IP over ATM Signalling - SIG 4.0 Update", RFC 2331,
+ April 1998.
+
+Grossman & Heinanen Standards Track [Page 16]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ [9] ITU-T Recommendation I.555, "Frame Relay Bearer Service
+ Interworking", September 1997.
+
+ [10] Bradner, S. "Key words for use in RFCs to Indicate Requirement
+ Levels", BCP 14, RFC 2119, March 1997.
+
+ [11] Fox, B. and B. Gleeson, "Virtual Private Networks Identifier",
+ RFC 2685, September 1999.
+
+ [12] The ATM Forum, "ATM Security Framework Version 1.0", af-sec-
+ 0096.000, February 1998.
+
+ [13] The ATM Forum, "ATM Security Specification v1.0", af-sec-
+ 0100.001, February 1999.
+
+Grossman & Heinanen Standards Track [Page 17]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+Appendix A. Multiprotocol Encapsulation over FR-SSCS
+
+ ITU-T Recommendation I.365.1 defines a Frame Relaying Specific
+ Convergence Sublayer (FR- SSCS) to be used on the top of the Common
+ Part Convergence Sublayer CPCS) of the AAL type 5 for Frame Relay/ATM
+ interworking. The service offered by FR-SSCS corresponds to the Core
+ service for Frame Relaying as described in I.233.
+
+ An FR-SSCS-PDU consists of Q.922 Address field followed by Q.922
+ Information field. The Q.922 flags and the FCS are omitted, since
+ the corresponding functions are provided by the AAL. The figure
+ below shows an FR-SSCS-PDU embedded in the Payload of an AAL5 CPCS-
+ PDU.
+
+ FR-SSCS-PDU in Payload of AAL5 CPCS-PDU
+ +-------------------------------+ -------
+ | Q.922 Address Field | FR-SSCS-PDU Header
+ | (2-4 octets) |
+ +-------------------------------+ -------
+ | . |
+ | . |
+ | Q.922 Information field | FR-SSCS-PDU Payload
+ | . |
+ | . |
+ +-------------------------------+ -------
+ | AAL5 CPCS-PDU Trailer |
+ +-------------------------------+
+
+ Routed and bridged PDUs are encapsulated inside the FR-SSCS-PDU as
+ defined in RFC 2427. The Q.922 Information field starts with a Q.922
+ Control field followed by an optional Pad octet that is used to align
+ the remainder of the frame to a convenient boundary for the sender.
+ The protocol of the carried PDU is then identified by prefixing the
+ PDU by an ISO/IEC TR 9577 Network Layer Protocol ID (NLPID).
+
+Grossman & Heinanen Standards Track [Page 18]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ In the particular case of an IP PDU, the NLPID is 0xCC and the FR-
+ SSCS-PDU has the following format:
+
+ FR-SSCS-PDU Format for Routed IP PDUs
+ +-------------------------------+
+ | Q.922 Addr Field |
+ | (2 or 4 octets) |
+ +-------------------------------+
+ | 0x03 (Q.922 Control) |
+ +-------------------------------+
+ | NLPID 0xCC |
+ +-------------------------------+
+ | . |
+ | IP PDU |
+ | (up to 2^16 - 5 octets) |
+ | . |
+ +-------------------------------+
+
+ Note that according to RFC 2427, the Q.922 Address field MUST be
+ either 2 or 4 octets, i.e., a 3 octet Address field MUST NOT be used.
+
+ In the particular case of a CLNP PDU, the NLPID is 0x81 and the FR-
+ SSCS-PDU has the following format:
+
+ FR-SSCS-PDU Format for Routed CLNP PDUs
+ +-------------------------------+
+ | Q.922 Addr Field |
+ | (2 or 4 octets) |
+ +-------------------------------+
+ | 0x03 (Q.922 Control) |
+ +-------------------------------+
+ | NLPID 0x81 |
+ +-------------------------------+
+ | . |
+ | Rest of CLNP PDU |
+ | (up to 2^16 - 5 octets) |
+ | . |
+ +-------------------------------+
+
+ Note that in case of ISO protocols the NLPID field forms the first
+ octet of the PDU itself and MUST not be repeated.
+
+ The above encapsulation applies only to those routed protocols that
+ have a unique NLPID assigned. For other routed protocols (and for
+ bridged protocols), it is necessary to provide another mechanism for
+ easy protocol identification. This can be achieved by using an NLPID
+ value 0x80 to indicate that an IEEE 802.1a SubNetwork Attachment
+ Point (SNAP) header follows.
+
+Grossman & Heinanen Standards Track [Page 19]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ See RFC 2427 for more details related to multiprotocol encapsulation
+ over FRCS.
+
+Appendix B. List of Locally Assigned values of OUI 00-80-C2
+
+ with preserved FCS w/o preserved FCS Media
+ ------------------ ----------------- --------------
+ 0x00-01 0x00-07 802.3/Ethernet
+ 0x00-02 0x00-08 802.4
+ 0x00-03 0x00-09 802.5
+ 0x00-04 0x00-0A FDDI
+ 0x00-05 0x00-0B 802.6
+ 0x00-0D Fragments
+ 0x00-0E BPDUs
+
+Appendix C. Partial List of NLPIDs
+
+ 0x00 Null Network Layer or Inactive Set (not used with ATM)
+ 0x80 SNAP
+ 0x81 ISO CLNP
+ 0x82 ISO ESIS
+ 0x83 ISO ISIS
+ 0xCC Internet IP
+
+Appendix D. Applications of multiprotocol encapsulation
+
+ Mutiprotocol encapsulation is necessary, but generally not
+ sufficient, for routing and bridging over the ATM networks. Since
+ the publication of RFC 1483 (the predecessor of this memo), several
+ system specifications were developed by the IETF and the ATM Forum to
+ address various aspects of, or scenarios for, bridged or routed
+ protocols. This appendix summarizes these applications.
+
+ 1) Point-to-point connection between routers and bridges --
+ multiprotocol encapsulation over ATM PVCs has been used to provide
+ a simple point-to-point link between bridges and routers across an
+ ATM network. Some amount of manual configuration (e.g., in lieu
+ of INARP) was necessary in these scenarios.
+
+ 2) Classical IP over ATM -- RFC 2225 (formerly RFC 1577) provides an
+ environment where the ATM network serves as a logical IP subnet
+ (LIS). ATM PVCs are supported, with address resolution provided by
+ INARP. For ATM SVCs, a new form of ARP, ATMARP, operates over the
+ ATM network between a host (or router) and an ATMARP server.
+ Where servers are replicated to provide higher availability or
+ performance, a Server Synchronization Cache Protocol (SCSP)
+ defined in RFC 2335 is used. Classical IP over ATM defaults to the
+ LLC/SNAP encapsulation.
+
+Grossman & Heinanen Standards Track [Page 20]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ 3) LAN Emulation -- The ATM Forum LAN Emulation specification
+ provides an environment where the ATM network is enhanced by LAN
+ Emulation Server(s) to behave as a bridged LAN. Stations obtain
+ configuration information from, and register with, a LAN Emulation
+ Configuration Server; they resolve MAC addresses to ATM addresses
+ through the services of a LAN Emulation Server; they can send
+ broadcast and multicast frames, and also send unicast frames for
+ which they have no direct VC to a Broadcast and Unicast Server.
+ LANE uses the VC multiplexing encapsulation foramts for Bridged
+ Etherent/802.3 (without LAN FCS) or Bridged 802.5 (without LAN
+ FCS) for the Data Direct, LE Multicast Send and Multicast Forward
+ VCCS. However, the initial PAD field described in this memo is
+ used as an LE header, and might not be set to all '0'.
+
+ 4) Next Hop Resolution Protocol (NHRP) -- In some cases, the
+ constraint that Classical IP over ATM serve a single LIS limits
+ performance. NHRP, as defined in RFC 2332, extends Classical to
+ allow 'shortcuts' over a an ATM network that supports several
+ LISs.
+
+ 5) Multiprotocol over ATM (MPOA) -- The ATM Forum Multiprotocol over
+ ATM Specification integrates LANE and NHRP to provide a generic
+ bridging/routing environment.
+
+ 6) IP Multicast -- RFC 2022 extends Classical IP to support IP
+ multicast. A multicast address resolution server (MARS) is used
+ possibly in conjunction with a multicast server to provide IP
+ multicast behavior over ATM point-to-multipoint and/or point to
+ point virtual connections.
+
+ 7) PPP over ATM -- RFC 2364 extends multiprotocol over ATM to the
+ case where the encapsulated protocol is the Point-to-Point
+ protocols. Both the VC based multiplexing and LLC/SNAP
+ encapsulations are used. This approach is used when the ATM
+ network is used as a point-to-point link and PPP functions are
+ required.
+
+Appendix E Differences from RFC 1483
+
+ This memo replaces RFC 1483. It was intended to remove anachronisms,
+ provide clarifications of ambiguities discovered by implementors or
+ created by changes to the base standards, and advance this work
+ through the IETF standards track process. A number of editorial
+ improvements were made, the RFC 2119 [10] conventions applied, and
+ the current RFC boilerplate added. The following substantive changes
+ were made. None of them is believed to obsolete implementations of
+ RFC 1483:
+
+Grossman & Heinanen Standards Track [Page 21]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+ -- usage of NLPID encapsulation is clarified in terms of the RFC 2119
+ conventions
+
+ -- a pointer to RFC 2364 is added to cover the case of PPP over ATM
+
+ -- RFC 1755 and RFC 2331 are referenced to describe how
+ encapsulations are negotiated, rather than a long-obsolete CCITT
+ (now ITU-T) working document and references to work then in
+ progress
+
+ -- usage of AAL5 is now a reference to ITU-T I.363.5. Options
+ created in AAL5 since the publication of RFC 1483 are selected.
+
+ -- formatting of routed NLPID-formatted PDUs (which are called
+ "routed ISO PDUs"
+ in RFC 1483) is clarified
+
+ -- clarification is provided concerning the use of padding between
+ the PID and MAC destination address in bridged PDUs and the bit
+ ordering of the MAC address.
+
+ -- clarification is provided concerning the use of padding of
+ Ethernet/802.3 frames
+
+ -- a new encapuslation for VPNs is added
+
+ -- substantive security considerations were added
+
+ -- a new appendix D provides a summary of applications of
+ multiprotocol over ATM
+
+Authors' Addresses
+
+ Dan Grossman
+ Motorola, Inc.
+ 20 Cabot Blvd.
+ Mansfield, MA 02048
+
+ EMail: dan at dma.isg.mot.com
+
+ Juha Heinanen
+ Telia Finland
+ Myyrmaentie 2
+ 01600 Vantaa, Finland
+
+ EMail: jh at telia.fi
+
+Grossman & Heinanen Standards Track [Page 22]
+
+RFC 2684 Multiprotocol Over AALS September 1999
+
+Full Copyright Statement
+
+ Copyright (C) The Internet Society (1999). All Rights Reserved.
+
+ This document and translations of it may be copied and furnished to
+ others, and derivative works that comment on or otherwise explain it
+ or assist in its implementation may be prepared, copied, published
+ and distributed, in whole or in part, without restriction of any
+ kind, provided that the above copyright notice and this paragraph are
+ included on all such copies and derivative works. However, this
+ document itself may not be modified in any way, such as by removing
+ the copyright notice or references to the Internet Society or other
+ Internet organizations, except as needed for the purpose of
+ developing Internet standards in which case the procedures for
+ copyrights defined in the Internet Standards process must be
+ followed, or as required to translate it into languages other than
+ English.
+
+ The limited permissions granted above are perpetual and will not be
+ revoked by the Internet Society or its successors or assigns.
+
+ This document and the information contained herein is provided on an
+ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+Grossman & Heinanen Standards Track [Page 23]
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/ABOUT-NLS
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/ABOUT-NLS Wed Dec 27 00:14:01 2006
@@ -0,0 +1,435 @@
+Notes on the Free Translation Project
+*************************************
+
+ Free software is going international! The Free Translation Project
+is a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+Quick configuration advice
+==========================
+
+ If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation. Future versions of GNU `gettext' will
+very likely convey even more functionality. So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+ So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+ Some packages are "localizable" when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU `gettext'. Other packages have their own
+ways to internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system already
+provides the GNU `gettext' functions. If not, the GNU `gettext' own
+library will be used. This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is _not_ required. Installers may use
+special options at configuration time for changing the default
+behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --disable-nls
+
+will respectively bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might be not what is desirable. You
+should use the more recent version of the GNU `gettext' library. I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ The configuration process will not test for the `catgets' function
+and therefore it will not be used. The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+ Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+ As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code. For example, let's
+suppose that you speak German and live in Germany. At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+ You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries. For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
+country code serves to distinguish the dialects.
+
+ The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc. On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
+locales supported by your system for your country by running the command
+`locale -a | grep '^LL''.
+
+ Not all programs have translations for all languages. By default, an
+English message is shown in place of a nonexistent translation. If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries. For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+ In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect. For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+Translating Teams
+=================
+
+ For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list. The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+ If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request at li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation at iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+ Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of August
+2002. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+ Ready PO files be bg ca cs da de el en eo es et fi fr
+ +----------------------------------------+
+ a2ps | [] [] [] [] |
+ ap-utils | |
+ bash | [] [] [] [] |
+ bfd | [] [] |
+ binutils | [] [] |
+ bison | [] [] [] [] |
+ clisp | |
+ clisp | [] [] [] [] |
+ clisplow | |
+ cpio | [] [] [] [] |
+ darkstat | () |
+ diffutils | [] [] [] [] [] [] |
+ enscript | [] [] |
+ error | [] [] [] |
+ fetchmail | [] () [] [] [] () |
+ fileutils | [] [] [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ gas | [] [] |
+ gawk | [] [] [] |
+ gcal | [] [] |
+ gcc | [] [] |
+ gettext | [] [] [] [] [] |
+ gnupg | [] [] [] [] [] [] [] |
+ gprof | [] [] |
+ gpsdrive | () () () () () |
+ grep | [] [] [] [] [] [] [] [] |
+ gretl | [] |
+ gthumb | () () () |
+ hello | [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] |
+ indent | [] [] [] [] [] |
+ jpilot | () [] [] [] |
+ jwhois | [] [] |
+ kbd | [] [] [] |
+ ld | [] [] |
+ libc | [] [] [] [] [] [] [] [] |
+ libiconv | [] [] [] [] |
+ lifelines | () () |
+ lilypond | [] [] |
+ lingoteach | [] [] |
+ lingoteach_lessons| () () |
+ lynx | [] [] [] [] [] |
+ m4 | [] [] [] [] [] |
+ make | [] [] [] [] |
+ man-db | [] () () [] () () |
+ mysecretdiary | [] [] [] |
+ nano | [] () [] [] [] [] |
+ nano_1_0 | [] () [] [] [] [] |
+ opcodes | [] [] [] |
+ parted | [] [] [] [] [] |
+ ptx | [] [] [] [] [] [] [] |
+ python | |
+ recode | [] [] [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] [] [] |
+ sh-utils | [] [] [] [] |
+ sharutils | [] [] [] [] [] [] [] |
+ sketch | () [] () |
+ soundtracker | [] [] [] |
+ sp | [] |
+ tar | [] [] [] [] [] [] |
+ texinfo | [] [] [] [] [] |
+ textutils | [] [] [] [] [] |
+ util-linux | [] [] [] [] [] [] |
+ vorbis-tools | [] |
+ wastesedge | |
+ wdiff | [] [] [] [] [] [] |
+ wget | [] [] [] [] [] [] [] [] [] [] |
+ +----------------------------------------+
+ be bg ca cs da de el en eo es et fi fr
+ 0 2 19 10 30 44 9 1 12 44 17 6 53
+
+ gl he hr hu id it ja ko lv nb nl nn
+ +-------------------------------------+
+ a2ps | () () [] |
+ ap-utils | |
+ bash | [] |
+ bfd | [] |
+ binutils | [] |
+ bison | [] [] [] [] |
+ clisp | |
+ clisp | [] |
+ clisplow | |
+ cpio | [] [] [] [] |
+ darkstat | |
+ diffutils | [] [] [] [] [] |
+ enscript | [] [] |
+ error | [] |
+ fetchmail | [] |
+ fileutils | [] [] [] |
+ findutils | [] [] [] [] [] [] [] [] |
+ flex | [] |
+ gas | |
+ gawk | [] |
+ gcal | |
+ gcc | [] |
+ gettext | [] [] |
+ gnupg | [] [] [] [] |
+ gprof | [] |
+ gpsdrive | [] () () |
+ grep | [] [] [] [] [] [] [] |
+ gretl | |
+ gthumb | () () |
+ hello | [] [] [] [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] |
+ indent | [] [] [] [] |
+ jpilot | () () |
+ jwhois | [] [] |
+ kbd | |
+ ld | |
+ libc | [] [] [] [] |
+ libiconv | [] [] [] |
+ lifelines | |
+ lilypond | [] |
+ lingoteach | [] |
+ lingoteach_lessons| |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ make | [] [] [] [] [] [] |
+ man-db | () () |
+ mysecretdiary | [] |
+ nano | [] [] [] [] |
+ nano_1_0 | [] [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] [] [] |
+ ptx | [] [] [] [] [] |
+ python | |
+ recode | [] [] [] |
+ sed | [] [] [] [] [] [] [] [] |
+ sh-utils | [] [] [] |
+ sharutils | [] [] [] |
+ sketch | () |
+ soundtracker | [] [] |
+ sp | |
+ tar | [] [] [] [] [] [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] [] |
+ util-linux | () [] |
+ vorbis-tools | [] |
+ wastesedge | |
+ wdiff | [] [] [] |
+ wget | [] [] [] [] [] [] |
+ +-------------------------------------+
+ gl he hr hu id it ja ko lv nb nl nn
+ 23 9 12 19 16 13 26 9 1 7 19 3
+
+ no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
+ +----------------------------------------------+
+ a2ps | () () () [] [] [] [] [] | 10
+ ap-utils | () | 0
+ bash | [] | 6
+ bfd | [] [] | 5
+ binutils | [] [] | 5
+ bison | [] [] [] [] | 12
+ clisp | | 0
+ clisp | | 5
+ clisplow | | 0
+ cpio | [] [] [] [] | 12
+ darkstat | [] [] () () | 2
+ diffutils | [] [] [] [] [] [] | 17
+ enscript | [] [] [] [] | 8
+ error | [] [] [] | 7
+ fetchmail | () () [] | 6
+ fileutils | [] [] [] [] [] [] | 14
+ findutils | [] [] [] [] [] [] [] | 21
+ flex | [] [] [] | 9
+ gas | [] | 3
+ gawk | [] [] | 6
+ gcal | [] [] | 4
+ gcc | [] | 4
+ gettext | [] [] [] [] [] [] | 13
+ gnupg | [] [] [] | 14
+ gprof | [] [] | 5
+ gpsdrive | [] [] | 3
+ grep | [] [] [] [] [] | 20
+ gretl | | 1
+ gthumb | () () [] | 1
+ hello | [] [] [] [] [] [] [] | 28
+ id-utils | [] [] [] [] | 9
+ indent | [] [] [] [] [] | 14
+ jpilot | () () [] [] | 5
+ jwhois | [] () () [] [] | 7
+ kbd | [] [] | 5
+ ld | [] [] | 4
+ libc | [] [] [] [] [] [] | 18
+ libiconv | [] [] [] [] [] | 12
+ lifelines | [] | 1
+ lilypond | [] | 4
+ lingoteach | [] [] | 5
+ lingoteach_lessons| () | 0
+ lynx | [] [] [] [] | 13
+ m4 | [] [] [] [] | 13
+ make | [] [] [] [] [] | 15
+ man-db | | 3
+ mysecretdiary | [] [] [] | 7
+ nano | [] [] [] [] | 13
+ nano_1_0 | [] [] [] [] | 14
+ opcodes | [] [] [] | 8
+ parted | [] [] [] [] | 12
+ ptx | [] [] [] [] [] [] [] | 19
+ python | | 0
+ recode | [] [] [] [] [] [] | 15
+ sed | [] [] [] [] [] [] | 24
+ sh-utils | [] [] | 9
+ sharutils | [] [] [] [] | 14
+ sketch | [] () [] | 4
+ soundtracker | [] | 6
+ sp | | 1
+ tar | [] [] [] [] [] [] [] | 19
+ texinfo | [] [] | 10
+ textutils | [] [] [] [] [] | 14
+ util-linux | [] [] [] | 10
+ vorbis-tools | [] | 3
+ wastesedge | | 0
+ wdiff | [] [] [] [] [] | 14
+ wget | [] [] [] [] [] [] [] [] | 24
+ +----------------------------------------------+
+ 37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
+ 68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If August 2002 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+Using `gettext' in new packages
+===============================
+
+ If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package. Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library. This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+ Once the sources are changed appropriately and the setup can handle
+to use of `gettext' the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+`translation at iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/AUTHORS
==============================================================================
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/COPYING
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/COPYING Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/COPYING
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/ChangeLog
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/ChangeLog Wed Dec 27 00:14:01 2006
@@ -0,0 +1,7 @@
+2003-01-08 gettextize <bug-gnu-gettext at gnu.org>
+
+ * Makefile.am (SUBDIRS): Add intl, m4.
+ (ACLOCAL_AMFLAGS): New variable.
+ (EXTRA_DIST): Add config.rpath.
+ * configure.in (AC_OUTPUT): Add intl/Makefile, po/Makefile.in, m4/Makefile.
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/INSTALL
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/INSTALL Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/INSTALL
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,414 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = .
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/bewan_adsl_status
+pkglibdir = $(libdir)/bewan_adsl_status
+pkgincludedir = $(includedir)/bewan_adsl_status
+
+top_builddir = .
+
+ACLOCAL = aclocal-1.4
+AUTOCONF = autoconf
+AUTOMAKE = automake-1.4
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+BUILD_INCLUDED_LIBINTL = no
+CATOBJEXT = .gmo
+CC = gcc
+DATADIRNAME = share
+GENCAT = gencat
+GLIBC21 = yes
+GMSGFMT = /usr/bin/msgfmt
+GTK_CFLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+GTK_CONFIG = /usr/bin/gtk-config
+GTK_LIBS = -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = .mo
+INTLBISON = bison
+INTLLIBS =
+INTLOBJS =
+INTL_LIBTOOL_SUFFIX_PREFIX =
+LIB = @LIB@
+LIBICONV =
+LIBINTL =
+LTLIB = @LTLIB@
+LTLIBICONV =
+LTLIBINTL =
+MAKEINFO = makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+PACKAGE = bewan_adsl_status
+POSUB = po
+RANLIB = ranlib
+USE_INCLUDED_LIBINTL = no
+USE_NLS = yes
+VERSION = 0.1
+
+SUBDIRS = intl m4 intl po src
+
+EXTRA_DIST = config.rpath autogen.sh bewan_adsl_status.glade
+
+
+ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
+INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \
+config.h.in config.sub configure configure.in install-sh missing \
+mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): configure.in m4/codeset.m4 m4/gettext.m4 m4/glibc21.m4 \
+ m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 \
+ m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 \
+ m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 \
+ m4/lib-prefix.m4 m4/progtest.m4 m4/stdint_h.m4 \
+ m4/uintmax_t.m4 m4/ulonglong.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" != "." || dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am: install-data-local
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-local install-data-am \
+install-data install-am install uninstall-am uninstall all-redirect \
+all-am all installdirs-am installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+install-data-local:
+ @$(NORMAL_INSTALL)
+ if test -d $(srcdir)/pixmaps; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ for pixmap in $(srcdir)/pixmaps/*; do \
+ if test -f $$pixmap; then \
+ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+dist-hook:
+ if test -d pixmaps; then \
+ mkdir $(distdir)/pixmaps; \
+ for pixmap in pixmaps/*; do \
+ if test -f $$pixmap; then \
+ cp -p $$pixmap $(distdir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.am
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.am Wed Dec 27 00:14:01 2006
@@ -0,0 +1,31 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = intl m4 intl po src
+
+EXTRA_DIST = config.rpath \
+ autogen.sh \
+ bewan_adsl_status.glade
+
+install-data-local:
+ @$(NORMAL_INSTALL)
+ if test -d $(srcdir)/pixmaps; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ for pixmap in $(srcdir)/pixmaps/*; do \
+ if test -f $$pixmap; then \
+ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+dist-hook:
+ if test -d pixmaps; then \
+ mkdir $(distdir)/pixmaps; \
+ for pixmap in pixmaps/*; do \
+ if test -f $$pixmap; then \
+ cp -p $$pixmap $(distdir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+
+ACLOCAL_AMFLAGS = -I m4
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/Makefile.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,414 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LTLIB = @LTLIB@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+PACKAGE = @PACKAGE@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+
+SUBDIRS = intl m4 intl po src
+
+EXTRA_DIST = config.rpath autogen.sh bewan_adsl_status.glade
+
+
+ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
+INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \
+config.h.in config.sub configure configure.in install-sh missing \
+mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): configure.in m4/codeset.m4 m4/gettext.m4 m4/glibc21.m4 \
+ m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 \
+ m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 \
+ m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 \
+ m4/lib-prefix.m4 m4/progtest.m4 m4/stdint_h.m4 \
+ m4/uintmax_t.m4 m4/ulonglong.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+ at SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" != "." || dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am: install-data-local
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-local install-data-am \
+install-data install-am install uninstall-am uninstall all-redirect \
+all-am all installdirs-am installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+install-data-local:
+ @$(NORMAL_INSTALL)
+ if test -d $(srcdir)/pixmaps; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ for pixmap in $(srcdir)/pixmaps/*; do \
+ if test -f $$pixmap; then \
+ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+dist-hook:
+ if test -d pixmaps; then \
+ mkdir $(distdir)/pixmaps; \
+ for pixmap in pixmaps/*; do \
+ if test -f $$pixmap; then \
+ cp -p $$pixmap $(distdir)/pixmaps; \
+ fi \
+ done \
+ fi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/NEWS
==============================================================================
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/README
==============================================================================
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/acconfig.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/acconfig.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,9 @@
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+#undef HAVE_STPCPY
+#undef HAVE_LIBSM
+#undef PACKAGE_LOCALE_DIR
+#undef PACKAGE_DATA_DIR
+#undef PACKAGE_SOURCE_DIR
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/aclocal.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/aclocal.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,2357 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.4-p6])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
+
+# serial 1
+
+# @defmac AC_PROG_CC_STDC
+# @maindex PROG_CC_STDC
+# @ovindex CC
+# If the C compiler in not in ANSI C mode by default, try to add an option
+# to output variable @code{CC} to make it so. This macro tries various
+# options that select ANSI C on some system or another. It considers the
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
+#
+# If you use this macro, you should check after calling it whether the C
+# compiler has been set to accept ANSI C; if not, the shell variable
+# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+# program @code{ansi2knr}, which comes with Ghostscript.
+# @end defmac
+
+AC_DEFUN([AM_PROG_CC_STDC],
+[AC_REQUIRE([AC_PROG_CC])
+AC_BEFORE([$0], [AC_C_INLINE])
+AC_BEFORE([$0], [AC_C_CONST])
+dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+dnl a magic option to avoid problems with ANSI preprocessor commands
+dnl like #elif.
+dnl FIXME: can't do this because then AC_AIX won't work due to a
+dnl circular dependency.
+dnl AC_BEFORE([$0], [AC_PROG_CPP])
+AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_CACHE_VAL(am_cv_prog_cc_stdc,
+[am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ AC_TRY_COMPILE(
+[#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+],
+[am_cv_prog_cc_stdc="$ac_arg"; break])
+done
+CC="$ac_save_CC"
+])
+if test -z "$am_cv_prog_cc_stdc"; then
+ AC_MSG_RESULT([none needed])
+else
+ AC_MSG_RESULT($am_cv_prog_cc_stdc)
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+])
+
+# Configure paths for GTK+
+# Owen Taylor 97-11-3
+
+dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
+dnl
+AC_DEFUN(AM_PATH_GTK,
+[dnl
+dnl Get the cflags and libraries from the gtk-config script
+dnl
+AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
+ gtk_config_prefix="$withval", gtk_config_prefix="")
+AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
+ gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
+AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
+ , enable_gtktest=yes)
+
+ for module in . $4
+ do
+ case "$module" in
+ gthread)
+ gtk_config_args="$gtk_config_args gthread"
+ ;;
+ esac
+ done
+
+ if test x$gtk_config_exec_prefix != x ; then
+ gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
+ fi
+ fi
+ if test x$gtk_config_prefix != x ; then
+ gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
+ fi
+ fi
+
+ AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
+ min_gtk_version=ifelse([$1], ,0.99.7,$1)
+ AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
+ no_gtk=""
+ if test "$GTK_CONFIG" = "no" ; then
+ no_gtk=yes
+ else
+ GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
+ GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
+ gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$GTK_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTK is sufficiently new. (Also sanity
+dnl checks the results of gtk-config to some extent
+dnl
+ rm -f conf.gtktest
+ AC_TRY_RUN([
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.gtktest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gtk_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_gtk_version");
+ exit(1);
+ }
+
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If gtk-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
+ printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
+ printf("*** before re-running configure\n");
+ }
+#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
+ else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+ (gtk_minor_version != GTK_MINOR_VERSION) ||
+ (gtk_micro_version != GTK_MICRO_VERSION))
+ {
+ printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ }
+#endif /* defined (GTK_MAJOR_VERSION) ... */
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
+ printf("*** correct copy of gtk-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gtk" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$GTK_CONFIG" = "no" ; then
+ echo "*** The gtk-config script installed by GTK could not be found"
+ echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GTK_CONFIG environment variable to the"
+ echo "*** full path to gtk-config."
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK test program, checking why..."
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK or finding the wrong"
+ echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ echo "***"
+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+ echo "*** came with the system with the command"
+ echo "***"
+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+ echo "*** or that you have moved GTK since it was installed. In the latter case, you"
+ echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+ rm -f conf.gtktest
+])
+
+# gettext.m4 serial 17 (gettext-0.11.5)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible at clisp.cons.org>, 2000-2002.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ dnl Add a version number to the cache macros.
+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ gt_cv_func_gnugettext_libc=yes,
+ gt_cv_func_gnugettext_libc=no)])
+
+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ gt_cv_func_gnugettext_libintl,
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ gt_cv_func_gnugettext_libintl=yes,
+ gt_cv_func_gnugettext_libintl=no)
+ dnl Now see whether libintl exists and depends on libiconv.
+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext_libintl=yes
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ && test "$PACKAGE" != gettext; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(INTLOBJS)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the po subdirectory,
+dnl except for USE_NLS.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_OUTPUT_COMMANDS([
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test $ac_cv_header_locale_h = yes; then
+ AM_LC_MESSAGES
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+# lib-link.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L,
+dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+# lib-prefix.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+# lib-ld.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
+
+# progtest.m4 serial 2 (gettext-0.10.40)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
+
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
+
+# uintmax_t.m4 serial 6 (gettext-0.11)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to `unsigned long' or `unsigned long long'
+# if <inttypes.h> does not exist.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <inttypes.h> and <stdint.h> don't define.])
+ fi
+])
+
+# inttypes_h.m4 serial 4 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+
+# stdint_h.m4 serial 2 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_stdint_h=yes,
+ jm_ac_cv_header_stdint_h=no)])
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+ [unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+ ac_cv_type_unsigned_long_long=yes,
+ ac_cv_type_unsigned_long_long=no)])
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the unsigned long long type.])
+ fi
+])
+
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+ ])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ fi
+])
+
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ fi
+])
+
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
+
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/autogen.sh
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/autogen.sh Wed Dec 27 00:14:01 2006
@@ -0,0 +1,148 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+PKG_NAME="the package."
+
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`autoconf' installed to."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+ (libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`libtool' installed."
+ echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+ }
+}
+
+grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
+ grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+ (gettext --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`gettext' installed."
+ echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+ }
+}
+
+grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
+ grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+ (gettext --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`gettext' installed."
+ echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+ }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`automake' installed."
+ echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+ NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: Missing \`aclocal'. The version of \`automake'"
+ echo "installed doesn't appear recent enough."
+ echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with no arguments."
+ echo "If you wish to pass any to it, please specify them on the"
+ echo \`$0\'" command line."
+ echo
+fi
+
+case $CC in
+xlc )
+ am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -name configure.in -print`
+do
+ dr=`dirname $coin`
+ if test -f $dr/NO-AUTO-GEN; then
+ echo skipping $dr -- flagged as no auto-gen
+ else
+ echo processing $dr
+ macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
+ ( cd $dr
+ aclocalinclude="$ACLOCAL_FLAGS"
+ for k in $macrodirs; do
+ if test -d $k; then
+ aclocalinclude="$aclocalinclude -I $k"
+ ##else
+ ## echo "**Warning**: No such directory \`$k'. Ignored."
+ fi
+ done
+ if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
+ if grep "sed.*POTFILES" configure.in >/dev/null; then
+ : do nothing -- we still have an old unmodified configure.in
+ else
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+ echo "Running gettextize... Ignore non-fatal messages."
+ echo "no" | gettextize --force --copy --intl
+ echo "Making $dr/aclocal.m4 writable ..."
+ test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+ fi
+ fi
+ if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+ echo "Running gettextize... Ignore non-fatal messages."
+ echo "no" | gettextize --force --copy --intl
+ echo "Making $dr/aclocal.m4 writable ..."
+ test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+ fi
+ if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
+ echo "Running libtoolize..."
+ libtoolize --force --copy
+ fi
+ echo "Running aclocal $aclocalinclude ..."
+ aclocal $aclocalinclude
+ if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+ echo "Running autoheader..."
+ autoheader
+ fi
+ echo "Running automake --gnu $am_opt ..."
+ automake --add-missing --gnu $am_opt
+ echo "Running autoconf ..."
+ autoconf
+ )
+ fi
+done
+
+#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
+
+if test x$NOCONFIGURE = x; then
+ echo Running $srcdir/configure $conf_flags "$@" ...
+ $srcdir/configure $conf_flags "$@" \
+ && echo Now type \`make\' to compile $PKG_NAME
+else
+ echo Skipping configure process.
+fi
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/bewan.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/bewan.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,85 @@
+/* XPM */
+static char *bewan[] =
+{
+/* width height ncolors chars_per_pixel */
+"100 42 35 2",
+/* colors */
+"AA c #FFFFFFFFFFFF",
+"BA c #808080808080",
+"CA c #C0C0DCDCC0C0",
+"DA c #A6A6CACAF0F0",
+"EA c #2A2A3F3FAAAA",
+"FA c #55553F3FAAAA",
+"GA c #55555F5FAAAA",
+"HA c #55555F5FFFFF",
+"IA c #55557F7FAAAA",
+"JA c #55557F7FFFFF",
+"KA c #7F7F5F5FAAAA",
+"LA c #7F7F5F5FFFFF",
+"MA c #7F7F7F7FAAAA",
+"NA c #7F7F7F7FFFFF",
+"OA c #7F7F9F9FAAAA",
+"PA c #7F7F9F9FFFFF",
+"AB c #AAAA7F7FAAAA",
+"BB c #AAAA7F7FFFFF",
+"CB c #AAAA9F9FAAAA",
+"DB c #AAAA9F9FFFFF",
+"EB c #AAAABFBFAAAA",
+"FB c #AAAABFBFFFFF",
+"GB c #AAAADFDFFFFF",
+"HB c #D4D49F9FFFFF",
+"IB c #D4D4BFBFAAAA",
+"JB c #D4D4BFBFFFFF",
+"KB c #D4D4DFDFFFFF",
+"LB c #D4D4FFFFFFFF",
+"MB c #FFFFDFDFFFFF",
+"NB c #CCCCCCCCFFFF",
+"OB c #FFFFCCCCFFFF",
+"PB c #CCCCFFFFFFFF",
+"AC c #2A2A0000AAAA",
+"BC c #2A2A1F1FAAAA",
+"CC c #A0A0A0A0A4A4",
+/* pixels */
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAFBAAKBAAKBAAKBAAKBAAKBCACAGAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAFBAAKBAAKBCAFAEAEAGAKBAAKBAAKBEAEAEAEAFAAAKBAAKBAAGAEAEAEAEAEAFAOAFBCAAAKBAAKBAAMAEAEAGAAAKBAAKBAAGAEAEAEAEADBAAKBAAKBOAEAEAEAEAAA",
+"AAEAEAEAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEACCAAAAAAAAAAEAEAEAGAAAAAAAAAAABAEAEAEAMAAAAAAAAAKBEAEAEAEAEADAAAAAAAAAAAAAAAAAAAJBEAEAGAAAAAAAAAAAAAGAEAEAEAEBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAEAEAEAEAEAEAEAEAEAEAEAEAEANAAAAAAAAAAAGAEAEAPAAAAAAAAAAAJBEAEAEAEBAAAAAAAAOAEAEAEAIAAAAAAAAAAAAAAAAAAAAAAACAEAEAGAAAAAAAAAAAAAAANAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEABBKBKBKBKBKBKBKBKBAAAAAAAAAAAAAAOAEAEAEAEAEAEAEAEAEAEAEAEAEAEAGAAAAAAAAAAANAEAEACCAAAAAAAAAAAAFAEAEAKBAAAAAAAAGAEAEAMAAAAAAAAAAAAAAAAAKBKBKBKBKBGAEAGAAAAAAAAAAAAAAAAAIAEAHBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEABAMAMAMAMAEAEAEAFAMAAAAAAAAAAAOAEAEAEAEAGAMACBDADACBMAGAEAEAEAAAAAAAAAAAOAEAEADAAAAAAAAAAAAAGAEAFAAAAAAAAAAAEAEAFAAAAAAAAAAAAAAAOAMAMAMAMAMAGAEAEAGAAAAAAAAAAAAAAAAACABCCAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEAEAEADBAAAAAAAAAAGAEAEAFADAAAAAAAAAAAAAAAAACAKAEAEBAAAAAAAAFBEAEACAAAAAAAAAAAAACCEAGAAAAAAAAADAEAEAOAAAAAAAAAAACCFAEACCAAAAAAAAFBEAEAGAAAAAAAAAAAAAAAAAAACAJBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAFAKBAAAAAAAAAAFAEAEAEAPBAAAAAAAAAAAAAAAAAAAAAAFAMAAAAAAAAAIBEAEAAAAAAAAAAAAAAAKBEACBAAAAAAAADBEAEAKBAAAAAAAADAEAEAEADAAAAAAAAACCEAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEACAAAAAAAAAAACAEAEAEAMAAAAAAAAAAAAAAAAAAAAAAAAAGAFAAAAAAAAAAAEAGAAAAAAAAAAAAAAAAAEADAAAAAAAAABAEAGAAAAAAAAAAAGAEAEAEACBAAAAAAAAFBEAEAGAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBMAKBAAAAAAAAAAAAGAEAEAEAFBAAAAAAAAFBGAGAAAAAAAAAAAGAEACCAAAAAAAAEABAAAAAAAFBAAAAAAAAGAAAAAAAAAAAGAEAABAAAAAAAAAADBCADBCAKBAAAAAAAACCEAEAGAAAAAAAAAAAGAPAKBAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEACCAAAAAAAAAAAAGAEAEAKBAAAAAAAAFAEAFAAAAAAAAAAAEAEAGAAAAAAAAAMACBAAAAAAABAAAAAAAAOAAAAAAAAAMBEAEAGBAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAGAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAFADAAAAAAAAAAAKBFAEAJBAAAAAAAAGAEACAAAAAAAAACBEAEAFAAAAAAAAACBNBAAAAAAGANBAAAAAADBAAAAAAAADAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEACAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEAEAEAGAAAAAAAAAAACAEAEBAAAAAAAACAKBAAAAAAAAOAFAEAEAEADAAAAAAAKBAAAAAAAAGABAAAAAAAAAAAAAAAAAIAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAFAJBAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAEAEAEADBAAAAAAAAAAFAGAAAAAAAAAAAAAAAAAAABBEAEAEAEAEACAAAAAAAAAAAAAAAKBEAGAAAAAAAAAAAAAAAKBEAEAEAKBAAAAAAAAMAMAMAMAMANBAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEABCBCBCEACCAAAAAAAAAAGAEAKBAAAAAAAAAAAAAACBEAEAEAEAEAEALAAAAAAAAAAAAAAADAEAEAAAAAAAAAAAAAAADAEAEAEAKBAAAAAAAAGABCEAEAEACBAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEAJBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAACAJBCAOBCAAAAAAAAAAAAAGAEAGAAAAAAAAAAAAACCDBOACBGAEAEAEAIAAAAAAAAAAAAAAAABEAEANBAAAAAAAAAAAAGAEAEAEAEBAAAAAAAAMAEAEAEAEAFBAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEAEBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAEAEAMAAAAAAAAAAAAAAAAAAAGAEAEAEAFAAAAAAAAAAAAAAAGAEAEACAAAAAAAAAAAAAEAEAEAEAMAAAAAAAAANBEAEAEAEADAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAACAGAEAEAEAEANACAAAAAAAAAAAAAFBEAEAEAEAEAFBAAAAAAAAAADAEAEAEANAAAAAAAAAAACAEAEAEAEAEAAAAAAAAAAAMAEAEAEADAAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEADBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAKBMAEAEAEAEAEAEAEAEAKAKBAAAAAAAAGAEAEAEAEAEABAAAAAAAAAAAOAEAEAEAIAAAAAAAAAAADBEAEAEAEAEAFBAAAAAAAAAAEAEAEADAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAGAGAGAGAGAGAGAGAGAGAGAFAEAEAEAEAEAEAEAEAEAEAEAEAGAGAGAGAEAEAEAEAEAEAEAGAGAGAGAGAFAEAEAEAGAGAGAGAGAGAEAEAEAEAEAEAMAAAAAAAAAAAGAEAEAGAGAGAGAGAGAEAEAEAGAGAGAGAGAEAEAEAEAEAFAGAGAGAGAGAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAFAKBAAKBIAFAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAGAOAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AACBKBAAAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAAKBAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAAAKBAAAAKBAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAANAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCAA",
+"AACBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAKBCAFBIBNBCACANBAAAAKBCAFBCAAAAAAAAACAFBCCAAAAAAAADBCACAJBCACAFBKBAAKBCADBMAGAEAMACAAAAAAAAAAAKBCAKBEBDBEBAAAAAAKBCACAEBDBCAAAKBCADBCCNBAAAAAACAJBCCDBAAAAAAAAKBCACACAJBCACAFBKBAAAACBAA",
+"AACBAAAAAAAAAACAEABCKBAAAAJBGAGAAAKBOABCEAEAFBAAAAKBEABCEADBAACAEAEAFAAAAAAAMAEAKBAACBMAGAEAEAGAMAKBAAAAKBCBGAGAJBAAJAEABCNAAAAAKBEAACEAEAAACBGAEAEAEAGAAAKBGAEABCEAEAKAAAAAKBFAACBBAAAAKBFAEAKBAAAAPAAA",
+"AAPAAAAAAAAAAAHAEAEABAKBAAAAAAFBAAAAAAFAEAEAMAAAAAAAKBKAEACAAAMAEAEAEAIBAAAAAAMAAAAAAAKBEAEAEACCAAAAAAKBGABCEAKBAAAAGAEAEACAAAAAAAEAEAEACBCBFBKBEAEAEAABCBMAKBMAEAEAEACBAAAACBEAEAIAAAAAAAKBBAAAAAAACBAA",
+"AACBAAAAAAAAAACAKAEAEAEAMACAAAAAAAAAAAGAEAEAFAAAAAAAKBPACAAAAAKBKAEAEAEAGACCAAAAAAAACAGAEAEAGAAAAAAAMAEAEAFADACADBGAMACCKBAAAAAAGAEAEAFADBAAKBGAEAEAEAPACAAANBEAEAEABAAAAAAAAAMAEAEAEAKACAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAADBEAEAEAACCBAAAAAAAAABEAEAEAKBAACBGAKBAAAAAAAAAAJBBAEAEAEANAAAAAAAFAEAEAGAAAAAAADBEAEAEAGBNBNBAAAAAAAAAAAAAADAEAEAEAPAAAAAGAEAEAEADAAAAAAAIAEAEAGAAAAAAAAAAAAAKBGAEAEAEAFBAAAAAAAACBAA",
+"AACBAAAAAAMAGAKBAAAAAANAEAEADBAAAAAAAACCEAEAEADBCCCAMBAAAADBIAKBAAAAAADBEAEACBAAAABBEAEAEAJBCAKBAACCEAEAEAOACAMBCACACAJBAAAACAFAEAEAMAAAAACCEAEAEACAAAAAAACBEAEAEACCDAAACCJAKBAAAAAAMAEAEACAAAAAAAAAPAAA",
+"AAPAAAAAKBGABAGAOADACBBACCAAAAAAAAAAAAGBEAEAEAMAAAAAAAAAAAMABAGAABDADABAMANBAAAAAAOAEAEAGAOAJBAAAAAACBGAFAEAEAFAMACBOBAAAAAAGAGAGAGAAAAAAAMAGAGABAAAAAAAAAOAEAFAGADBAAAAPABAGABADACCMAKAKBAAAAAAAAAACBAA",
+"AACBAAAAAAAAAAAAKBKBKBAAAAAAAAAAAAAAAACBBCFAKBAAAAAAAAAAAAAAAAAALBKBKBKBAAAAAAAAAAAAAAKBAAAAAAAAAAAAAAAAAAKBMBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBPBAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAACAIAGANACACAABCBLBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAA",
+"AACBAAAAAAAAAAAAAAAAAAAAAAJBGAFAGAMAHBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAA",
+"AAGADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOAHAAA",
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/bewan_adsl_status.glade
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/bewan_adsl_status.glade Wed Dec 27 00:14:01 2006
@@ -0,0 +1,4294 @@
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>bewan_adsl_status</name>
+ <program_name>bewan_adsl_status</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>False</gnome_support>
+ <gettext_support>True</gettext_support>
+ <use_widget_names>True</use_widget_names>
+ <output_translatable_strings>True</output_translatable_strings>
+ <translatable_strings_file>strings.c</translatable_strings_file>
+</project>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>main_window</name>
+ <signal>
+ <name>destroy_event</name>
+ <handler>gtk_main_quit</handler>
+ <last_modification_time>Tue, 12 Aug 2003 17:46:44 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>delete_event</name>
+ <handler>gtk_main_quit</handler>
+ <last_modification_time>Tue, 12 Aug 2003 17:47:04 GMT</last_modification_time>
+ </signal>
+ <title>BeWAN ADSL</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook1</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame1</name>
+ <border_width>4</border_width>
+ <label>Line State</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table1</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label8</name>
+ <label>Modem state:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label9</name>
+ <label>Remote report:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label10</name>
+ <label>Last failure:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label11</name>
+ <label>Time connected:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ModemStateText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>RemoteReportText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LastFailureText</name>
+ <width>192</width>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>TimeConnectedText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox3</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>StartButton</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>on_StartButton_clicked</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:52:43 GMT</last_modification_time>
+ </signal>
+ <label>Start</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>StopButton</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>on_StopButton_clicked</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:52:52 GMT</last_modification_time>
+ </signal>
+ <label>Stop</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame2</name>
+ <border_width>4</border_width>
+ <label>Actual bit rate (Kbps)</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table2</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label16</name>
+ <label>Near End Fast Channel:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label17</name>
+ <label>Far End Fast Channel:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label18</name>
+ <label>Near End Interleaved Channel:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label19</name>
+ <label>Far End Interleaved Channel:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearEndFastChannelText</name>
+ <width>39</width>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarEndFastChannelText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearEndInterleavedChannelText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarEndInterleavedChannelText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>pixmap2</name>
+ <filename>bewan.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>State</name>
+ <label>State</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame21</name>
+ <border_width>4</border_width>
+ <label>Operational Data</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox15</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox7</name>
+ <border_width>4</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ModulationLabel</name>
+ <label>Modulation:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ModulationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table3</name>
+ <border_width>4</border_width>
+ <rows>5</rows>
+ <columns>5</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label106</name>
+ <label>Capacity Occupation (%)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label107</name>
+ <label>Noise Margin (dB)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label108</name>
+ <label>Attenuation (dB)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label109</name>
+ <label>Output Power (dBm)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DsCapacityOccupationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DsNoiseMarginText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DsAttenuationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DsOutputPowerText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>UsCapacityOccupationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>UsNoiseMarginText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>UsOutputPowerText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>UsAttenuationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator1</name>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator2</name>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label118</name>
+ <label>DownStream</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label119</name>
+ <label>UpStream</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame22</name>
+ <border_width>4</border_width>
+ <label>Power</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox3</name>
+ <border_width>4</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkDrawingArea</class>
+ <name>PowerChart</name>
+ <width>256</width>
+ <height>80</height>
+ <signal>
+ <name>expose_event</name>
+ <handler>on_PowerChart_expose_event</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:51:40 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>configure_event</name>
+ <handler>on_PowerChart_configure_event</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:51:53 GMT</last_modification_time>
+ </signal>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>RxPathLabel</name>
+ <signal>
+ <name>configure_event</name>
+ <handler>on_RxPathLabel_configure_event</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:55:05 GMT</last_modification_time>
+ </signal>
+ <label>Rx Path</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>SNRLabel</name>
+ <signal>
+ <name>configure_event</name>
+ <handler>on_SNRLabel_configure_event</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:55:10 GMT</last_modification_time>
+ </signal>
+ <label>SNR</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>EchoNoiseLabel</name>
+ <signal>
+ <name>configure_event</name>
+ <handler>on_EchoNoiseLabel_configure_event</handler>
+ <last_modification_time>Tue, 12 Aug 2003 13:55:15 GMT</last_modification_time>
+ </signal>
+ <label>Echo+Noise</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Line</name>
+ <label>Line</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox6</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame23</name>
+ <border_width>4</border_width>
+ <label>Fast Channel Error Counters</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table4</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>5</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label123</name>
+ <label>Forward Error Corrections (FEC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label124</name>
+ <label>Cyclic Redundancy Checks (CRC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label125</name>
+ <label>Cyclic Header Error Check (HEC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocFastCRCText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocFastFECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocFastHECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisFastFECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisFastCRCText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisFastHECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator3</name>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator4</name>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label126</name>
+ <label>Local</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label127</name>
+ <label>Distant</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame24</name>
+ <border_width>4</border_width>
+ <label>Interleaved Channel Error Counters</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table5</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>5</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label134</name>
+ <label>Forward Error Corrections (FEC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label135</name>
+ <label>Cyclic Redundancy Checks (CRC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label136</name>
+ <label>Cyclic Header Error Check (HEC)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocItlvCRCText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocItlvFECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>LocItlvHECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisItlvFECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisItlvCRCText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DisItlvHECText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator5</name>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator6</name>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label137</name>
+ <label>Local</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label141</name>
+ <label>Distant</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>4</left_attach>
+ <right_attach>5</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Errors</name>
+ <label>Errors</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox8</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame25</name>
+ <border_width>4</border_width>
+ <label>Near End Defects Detected</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>NearEndDefectsDetectedTable</name>
+ <border_width>4</border_width>
+ <rows>3</rows>
+ <columns>4</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearLoMLabel</name>
+ <label>Loss of Margin (LoM)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearLoPLabel</name>
+ <label>Loss of Power (LoP)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearLoSLabel</name>
+ <label>Loss of Signal (LoS)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearLoFLabel</name>
+ <label>Loss of Frame (LoF)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NearLoCDLabel</name>
+ <label>Loss of Cell Delineation (LoCD)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label198</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed5</name>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoCDRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoCDLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed4</name>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoFRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoFLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed3</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoSRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoSLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed2</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoPRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoPLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed1</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoMRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>NearLoMLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame26</name>
+ <border_width>4</border_width>
+ <label>Far End Defects detected</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>FarEndDefectsDetectedTable</name>
+ <border_width>4</border_width>
+ <rows>3</rows>
+ <columns>4</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarLoMLabel</name>
+ <label>Loss of Margin (LoM)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarLoPLabel</name>
+ <label>Loss of Power (LoP)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarLoSLabel</name>
+ <label>Loss of Signal (LoS)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarLoFLabel</name>
+ <label>Loss of Frame (LoF)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>DyingGaspLabel</name>
+ <label>Dying Gasp message received</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FarLoCDLabel</name>
+ <label>Loss of Cell Delineation (LoCD)</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed7</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoMRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoMLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed8</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoPRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoPLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed9</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoSRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoSLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed10</name>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoFRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoFLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed11</name>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoCDRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>FarLoCDLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed12</name>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>DyingGaspRedLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>red_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>DyingGaspLed</name>
+ <x>0</x>
+ <y>0</y>
+ <width>0</width>
+ <height>0</height>
+ <filename>green_led.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Defects</name>
+ <label>Defects</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame27</name>
+ <border_width>4</border_width>
+ <label>ATM maintenance indicators (OAM-F5)</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox9</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox11</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox12</name>
+ <border_width>4</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>GenerateLBcellsButton</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>toggled</name>
+ <handler>on_GenerateLBcellsButton_toggled</handler>
+ <last_modification_time>Tue, 12 Aug 2003 14:21:08 GMT</last_modification_time>
+ </signal>
+ <label>Generate looback cells (OAM-F5 LB cells)</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table10</name>
+ <border_width>4</border_width>
+ <rows>2</rows>
+ <columns>4</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label157</name>
+ <label>VPI:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label158</name>
+ <label>VCI:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>VPIEntry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>VCIEntry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>ResetCountersButton</name>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>on_ResetCountersButton_clicked</handler>
+ <last_modification_time>Tue, 12 Aug 2003 14:22:48 GMT</last_modification_time>
+ </signal>
+ <label>Reset Counters</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label197</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame28</name>
+ <border_width>6</border_width>
+ <label>Receive counters</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table11</name>
+ <border_width>4</border_width>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label159</name>
+ <label>Continuity Check cells (CC):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label160</name>
+ <label>Remote Defect Indication cells (RDI):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label161</name>
+ <label>Alarm Indication Signal cells (AIS):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label162</name>
+ <label>Far-end loopback cells (LB):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label163</name>
+ <label>Near-end loopback cells (LB):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>CCText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>RDIText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FeLBText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>AISText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>NeLBText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Test</name>
+ <label>Test</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox13</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame29</name>
+ <border_width>4</border_width>
+ <label>Installed Profile</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table12</name>
+ <border_width>4</border_width>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label169</name>
+ <label>Modulation:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label170</name>
+ <label>VPI:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label171</name>
+ <label>VCI:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label172</name>
+ <label>Protocol:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label173</name>
+ <label>Encapsulation:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ConfigVpiText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ConfigVciText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ConfigProtocolText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ConfigEncapsText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ConfigModulationText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Config</name>
+ <label>Config</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox14</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame30</name>
+ <border_width>4</border_width>
+ <label>ADSL Package Information</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table13</name>
+ <border_width>4</border_width>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label179</name>
+ <label>Package Name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label180</name>
+ <label>Package Version:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label181</name>
+ <label>Firmware Version:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label182</name>
+ <label>Manufacturer:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label183</name>
+ <label>Copyright:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>PackageNameText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>PackageVersionText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>FirmwareVersionText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ManufacturerText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>CopyrightText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox6</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame31</name>
+ <border_width>4</border_width>
+ <label>Far End Modem Identification</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table14</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>0</row_spacing>
+ <column_spacing>0</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label184</name>
+ <label>Vendor Code:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label185</name>
+ <label>Vendor Country Code:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label186</name>
+ <label>ITU Revision Number:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label187</name>
+ <label>Vendor Specific Info:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>VendorCodeText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>VendorCountryCodeText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>ITURevisionNumberText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>VendorSpecificInfoText</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>pixmap15</name>
+ <filename>bewan.xpm</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>Info</name>
+ <label>Info</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+</widget>
+
+</GTK-Interface>
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.cache
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.cache Wed Dec 27 00:14:01 2006
@@ -0,0 +1,101 @@
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+ac_cv_c_const=${ac_cv_c_const=yes}
+ac_cv_c_inline=${ac_cv_c_inline=inline}
+ac_cv_func___argz_count=${ac_cv_func___argz_count=yes}
+ac_cv_func___argz_next=${ac_cv_func___argz_next=yes}
+ac_cv_func___argz_stringify=${ac_cv_func___argz_stringify=yes}
+ac_cv_func_alloca_works=${ac_cv_func_alloca_works=yes}
+ac_cv_func_feof_unlocked=${ac_cv_func_feof_unlocked=yes}
+ac_cv_func_fgets_unlocked=${ac_cv_func_fgets_unlocked=yes}
+ac_cv_func_getc_unlocked=${ac_cv_func_getc_unlocked=yes}
+ac_cv_func_getcwd=${ac_cv_func_getcwd=yes}
+ac_cv_func_getegid=${ac_cv_func_getegid=yes}
+ac_cv_func_geteuid=${ac_cv_func_geteuid=yes}
+ac_cv_func_getgid=${ac_cv_func_getgid=yes}
+ac_cv_func_getpagesize=${ac_cv_func_getpagesize=yes}
+ac_cv_func_getuid=${ac_cv_func_getuid=yes}
+ac_cv_func_mempcpy=${ac_cv_func_mempcpy=yes}
+ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
+ac_cv_func_munmap=${ac_cv_func_munmap=yes}
+ac_cv_func_putenv=${ac_cv_func_putenv=yes}
+ac_cv_func_setenv=${ac_cv_func_setenv=yes}
+ac_cv_func_setlocale=${ac_cv_func_setlocale=yes}
+ac_cv_func_stpcpy=${ac_cv_func_stpcpy=yes}
+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes}
+ac_cv_func_strdup=${ac_cv_func_strdup=yes}
+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes}
+ac_cv_func_tsearch=${ac_cv_func_tsearch=yes}
+ac_cv_gnu_library_2_1=${ac_cv_gnu_library_2_1=yes}
+ac_cv_header_alloca_h=${ac_cv_header_alloca_h=yes}
+ac_cv_header_argz_h=${ac_cv_header_argz_h=yes}
+ac_cv_header_limits_h=${ac_cv_header_limits_h=yes}
+ac_cv_header_locale_h=${ac_cv_header_locale_h=yes}
+ac_cv_header_malloc_h=${ac_cv_header_malloc_h=yes}
+ac_cv_header_nl_types_h=${ac_cv_header_nl_types_h=yes}
+ac_cv_header_stdc=${ac_cv_header_stdc=yes}
+ac_cv_header_stddef_h=${ac_cv_header_stddef_h=yes}
+ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes}
+ac_cv_header_string_h=${ac_cv_header_string_h=yes}
+ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h=yes}
+ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
+ac_cv_lib_cposix_strerror=${ac_cv_lib_cposix_strerror=no}
+ac_cv_path_GMSGFMT=${ac_cv_path_GMSGFMT=/usr/bin/msgfmt}
+ac_cv_path_GTK_CONFIG=${ac_cv_path_GTK_CONFIG=/usr/bin/gtk-config}
+ac_cv_path_MSGFMT=${ac_cv_path_MSGFMT=/usr/bin/msgfmt}
+ac_cv_path_MSGMERGE=${ac_cv_path_MSGMERGE=/usr/bin/msgmerge}
+ac_cv_path_XGETTEXT=${ac_cv_path_XGETTEXT=/usr/bin/xgettext}
+ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
+ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
+ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
+ac_cv_prog_INTLBISON=${ac_cv_prog_INTLBISON=bison}
+ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib}
+ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
+ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
+ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
+ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
+ac_cv_type_off_t=${ac_cv_type_off_t=yes}
+ac_cv_type_size_t=${ac_cv_type_size_t=yes}
+ac_cv_type_unsigned_long_long=${ac_cv_type_unsigned_long_long=yes}
+acl_cv_hardcode_direct=${acl_cv_hardcode_direct=no}
+acl_cv_hardcode_libdir_flag_spec=${acl_cv_hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'}
+acl_cv_hardcode_libdir_separator=${acl_cv_hardcode_libdir_separator=}
+acl_cv_hardcode_minus_L=${acl_cv_hardcode_minus_L=no}
+acl_cv_libext=${acl_cv_libext=a}
+acl_cv_path_LD=${acl_cv_path_LD=/usr/bin/ld}
+acl_cv_prog_gnu_ld=${acl_cv_prog_gnu_ld=yes}
+acl_cv_rpath=${acl_cv_rpath=done}
+acl_cv_shlibext=${acl_cv_shlibext=}
+acl_cv_sys_lib_dlsearch_path_spec=${acl_cv_sys_lib_dlsearch_path_spec='/lib /usr/lib'}
+acl_cv_sys_lib_search_path_spec=${acl_cv_sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'}
+acl_cv_wl=${acl_cv_wl=-Wl,}
+am_cv_func_iconv=${am_cv_func_iconv=yes}
+am_cv_langinfo_codeset=${am_cv_langinfo_codeset=yes}
+am_cv_lib_iconv=${am_cv_lib_iconv=no}
+am_cv_prog_cc_stdc=${am_cv_prog_cc_stdc=}
+am_cv_proto_iconv=${am_cv_proto_iconv='extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);'}
+am_cv_proto_iconv_arg1=${am_cv_proto_iconv_arg1=}
+am_cv_val_LC_MESSAGES=${am_cv_val_LC_MESSAGES=yes}
+gt_cv_func_gnugettext1_libc=${gt_cv_func_gnugettext1_libc=yes}
+gt_cv_header_inttypes_h=${gt_cv_header_inttypes_h=yes}
+gt_cv_int_divbyzero_sigfpe=${gt_cv_int_divbyzero_sigfpe=yes}
+gt_cv_inttypes_pri_broken=${gt_cv_inttypes_pri_broken=no}
+jm_ac_cv_header_inttypes_h=${jm_ac_cv_header_inttypes_h=yes}
+jm_ac_cv_header_stdint_h=${jm_ac_cv_header_stdint_h=yes}
+nls_cv_force_use_gnu_gettext=${nls_cv_force_use_gnu_gettext=no}
+nls_cv_header_intl=${nls_cv_header_intl=}
+nls_cv_header_libgt=${nls_cv_header_libgt=}
+nls_cv_use_gnu_gettext=${nls_cv_use_gnu_gettext=no}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.guess
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.guess Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/config.guess
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,201 @@
+/* config.h. Generated automatically by configure. */
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+/* #undef C_ALLOCA */
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define if you have alloca, as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#define HAVE_ALLOCA_H 1
+
+/* Define if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define as __inline if that's what the C compiler calls it. */
+/* #undef inline */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef off_t */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+/* #undef STACK_DIRECTION */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+#define ENABLE_NLS 1
+/* #undef HAVE_CATGETS */
+#define HAVE_GETTEXT 1
+#define HAVE_LC_MESSAGES 1
+#define HAVE_STPCPY 1
+/* #undef HAVE_LIBSM */
+#define PACKAGE_LOCALE_DIR "/usr/local/share/locale"
+#define PACKAGE_DATA_DIR "/usr/local/share/bewan_adsl_status"
+#define PACKAGE_SOURCE_DIR "/home/fisaksen/src/unicorn/adsl_status"
+
+/* Define if you have the __argz_count function. */
+#define HAVE___ARGZ_COUNT 1
+
+/* Define if you have the __argz_next function. */
+#define HAVE___ARGZ_NEXT 1
+
+/* Define if you have the __argz_stringify function. */
+#define HAVE___ARGZ_STRINGIFY 1
+
+/* Define if you have the feof_unlocked function. */
+#define HAVE_FEOF_UNLOCKED 1
+
+/* Define if you have the fgets_unlocked function. */
+#define HAVE_FGETS_UNLOCKED 1
+
+/* Define if you have the getc_unlocked function. */
+#define HAVE_GETC_UNLOCKED 1
+
+/* Define if you have the getcwd function. */
+#define HAVE_GETCWD 1
+
+/* Define if you have the getegid function. */
+#define HAVE_GETEGID 1
+
+/* Define if you have the geteuid function. */
+#define HAVE_GETEUID 1
+
+/* Define if you have the getgid function. */
+#define HAVE_GETGID 1
+
+/* Define if you have the getpagesize function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if you have the getuid function. */
+#define HAVE_GETUID 1
+
+/* Define if you have the mempcpy function. */
+#define HAVE_MEMPCPY 1
+
+/* Define if you have the munmap function. */
+#define HAVE_MUNMAP 1
+
+/* Define if you have the putenv function. */
+#define HAVE_PUTENV 1
+
+/* Define if you have the setenv function. */
+#define HAVE_SETENV 1
+
+/* Define if you have the setlocale function. */
+#define HAVE_SETLOCALE 1
+
+/* Define if you have the stpcpy function. */
+#define HAVE_STPCPY 1
+
+/* Define if you have the strcasecmp function. */
+#define HAVE_STRCASECMP 1
+
+/* Define if you have the strdup function. */
+#define HAVE_STRDUP 1
+
+/* Define if you have the strtoul function. */
+#define HAVE_STRTOUL 1
+
+/* Define if you have the tsearch function. */
+#define HAVE_TSEARCH 1
+
+/* Define if you have the <argz.h> header file. */
+#define HAVE_ARGZ_H 1
+
+/* Define if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define if you have the <nl_types.h> header file. */
+#define HAVE_NL_TYPES_H 1
+
+/* Define if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define PACKAGE "bewan_adsl_status"
+
+/* Version number of package */
+#define VERSION "0.1"
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. */
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. */
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define if you have the unsigned long long type. */
+#define HAVE_UNSIGNED_LONG_LONG 1
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#define INTDIV0_RAISES_SIGFPE 1
+
+/* Define to unsigned long or unsigned long long
+ if <inttypes.h> and <stdint.h> don't define. */
+/* #undef uintmax_t */
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+/* #undef PRI_MACROS_BROKEN */
+
+/* Define if you have the iconv() function. */
+#define HAVE_ICONV 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#define HAVE_LANGINFO_CODESET 1
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#define HAVE_LC_MESSAGES 1
+
+/* Define to 1 if translation of program messages to the user's native language
+ is requested. */
+#define ENABLE_NLS 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#define HAVE_GETTEXT 1
+
+/* Define if the GNU dcgettext() function is already present or preinstalled. */
+#define HAVE_DCGETTEXT 1
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.h.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.h.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,200 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+#undef HAVE_STPCPY
+#undef HAVE_LIBSM
+#undef PACKAGE_LOCALE_DIR
+#undef PACKAGE_DATA_DIR
+#undef PACKAGE_SOURCE_DIR
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the feof_unlocked function. */
+#undef HAVE_FEOF_UNLOCKED
+
+/* Define if you have the fgets_unlocked function. */
+#undef HAVE_FGETS_UNLOCKED
+
+/* Define if you have the getc_unlocked function. */
+#undef HAVE_GETC_UNLOCKED
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getegid function. */
+#undef HAVE_GETEGID
+
+/* Define if you have the geteuid function. */
+#undef HAVE_GETEUID
+
+/* Define if you have the getgid function. */
+#undef HAVE_GETGID
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the getuid function. */
+#undef HAVE_GETUID
+
+/* Define if you have the mempcpy function. */
+#undef HAVE_MEMPCPY
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the strtoul function. */
+#undef HAVE_STRTOUL
+
+/* Define if you have the tsearch function. */
+#undef HAVE_TSEARCH
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define if you have the unsigned long long type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#undef INTDIV0_RAISES_SIGFPE
+
+/* Define to unsigned long or unsigned long long
+ if <inttypes.h> and <stdint.h> don't define. */
+#undef uintmax_t
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if translation of program messages to the user's native language
+ is requested. */
+#undef ENABLE_NLS
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled. */
+#undef HAVE_DCGETTEXT
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.log
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.log Wed Dec 27 00:14:01 2006
@@ -0,0 +1,89 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+configure:589: checking for non-GNU ld
+configure:624: checking if the linker (/usr/bin/ld) is GNU ld
+configure:673: checking for a BSD compatible install
+configure:726: checking whether build environment is sane
+configure:783: checking whether make sets ${MAKE}
+configure:829: checking for working aclocal-1.4
+configure:842: checking for working autoconf
+configure:855: checking for working automake-1.4
+configure:868: checking for working autoheader
+configure:881: checking for working makeinfo
+configure:900: checking for strerror in -lcposix
+configure:944: checking for gcc
+configure:1057: checking whether the C compiler (gcc ) works
+configure:1073: gcc -o conftest conftest.c 1>&5
+configure:1099: checking whether the C compiler (gcc ) is a cross-compiler
+configure:1104: checking whether we are using GNU C
+configure:1132: checking whether gcc accepts -g
+configure:1167: checking for gcc option to accept ANSI C
+configure:1244: checking how to run the C preprocessor
+configure:1324: checking for ANSI C header files
+configure:1478: checking for gtk-config
+configure:1513: checking for GTK - version >= 1.2.0
+configure:1614: gcc -o conftest -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include conftest.c -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm 1>&5
+configure:1700: checking for inttypes.h
+configure:1735: checking for stdint.h
+configure:1770: checking for unsigned long long
+configure:1821: checking for shared library run path origin
+configure:1870: checking host system type
+configure:1893: checking for ranlib
+configure:1921: checking for working const
+configure:1996: checking for inline
+configure:2036: checking for off_t
+configure:2069: checking for size_t
+configure:2104: checking for working alloca.h
+configure:2137: checking for alloca
+configure:2339: checking for unistd.h
+configure:2378: checking for getpagesize
+configure:2431: checking for working mmap
+configure:2603: checking whether we are using the GNU C Library 2.1 or newer
+configure:2641: checking whether integer division by zero raises SIGFPE
+configure:2739: checking for inttypes.h
+configure:2778: checking whether the inttypes.h PRIxNN macros are broken
+configure:3206: checking for msgfmt
+configure:3241: checking for gmsgfmt
+configure:3278: checking for xgettext
+configure:3315: checking for msgmerge
+configure:3378: checking for argz.h
+configure:3378: checking for limits.h
+configure:3378: checking for locale.h
+configure:3378: checking for nl_types.h
+configure:3378: checking for malloc.h
+configure:3378: checking for stddef.h
+configure:3378: checking for stdlib.h
+configure:3378: checking for string.h
+configure:3378: checking for unistd.h
+configure:3378: checking for sys/param.h
+configure:3419: checking for feof_unlocked
+configure:3419: checking for fgets_unlocked
+configure:3419: checking for getc_unlocked
+configure:3419: checking for getcwd
+configure:3419: checking for getegid
+configure:3419: checking for geteuid
+configure:3419: checking for getgid
+configure:3419: checking for getuid
+configure:3419: checking for mempcpy
+configure:3419: checking for munmap
+configure:3419: checking for putenv
+configure:3419: checking for setenv
+configure:3419: checking for setlocale
+configure:3419: checking for stpcpy
+configure:3419: checking for strcasecmp
+configure:3419: checking for strdup
+configure:3419: checking for strtoul
+configure:3419: checking for tsearch
+configure:3419: checking for __argz_count
+configure:3419: checking for __argz_stringify
+configure:3419: checking for __argz_next
+configure:3503: checking for iconv
+configure:3578: checking for iconv declaration
+configure:3627: checking for nl_langinfo and CODESET
+configure:3663: checking for LC_MESSAGES
+configure:3702: checking for bison
+configure:3735: checking version of bison
+configure:3764: checking whether NLS is requested
+configure:3788: checking whether included gettext is requested
+configure:3808: checking for GNU gettext in libc
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.rpath
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.rpath Wed Dec 27 00:14:01 2006
@@ -0,0 +1,513 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2002 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shlibext=
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ wl='-Wl,'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6*)
+ wl='-Wl,'
+ ;;
+ linux*)
+ echo '__INTEL_COMPILER' > conftest.$ac_ext
+ if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
+ then
+ :
+ else
+ # Intel icc
+ wl='-Qoption,ld,'
+ fi
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ if test "x$host_vendor" = xsni; then
+ wl='-LD'
+ else
+ wl='-Wl,'
+ fi
+ ;;
+ esac
+fi
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX, the GNU linker is very broken
+ ld_shlibs=no
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=yes
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_minus_L=yes # Not in the search PATH, but as the default
+ # location of the library.
+ ;;
+ irix5* | irix6*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ if test "x$host_vendor" = xsno; then
+ hardcode_direct=yes # is this really true???
+ else
+ hardcode_direct=no # Motorola manual says yes, but my tests say they lie
+ fi
+ ;;
+ sysv4.3*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4.2uw2*)
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ ;;
+ sysv5uw7* | unixware7*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+libname_spec='lib$name'
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+case "$host_os" in
+ aix3*)
+ shlibext=so
+ ;;
+ aix4* | aix5*)
+ shlibext=so
+ ;;
+ amigaos*)
+ shlibext=ixlibrary
+ ;;
+ beos*)
+ shlibext=so
+ ;;
+ bsdi4*)
+ shlibext=so
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ ;;
+ cygwin* | mingw* | pw32*)
+ case $GCC,$host_os in
+ yes,cygwin*)
+ shlibext=dll.a
+ ;;
+ yes,mingw*)
+ shlibext=dll
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+ ;;
+ yes,pw32*)
+ shlibext=dll
+ ;;
+ *)
+ shlibext=dll
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ shlibext=dylib
+ ;;
+ freebsd1*)
+ ;;
+ freebsd*)
+ shlibext=so
+ ;;
+ gnu*)
+ shlibext=so
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ shlibext=sl
+ ;;
+ irix5* | irix6*)
+ shlibext=so
+ case "$host_os" in
+ irix5*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ ;;
+ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ ;;
+ linux-gnu*)
+ shlibext=so
+ ;;
+ netbsd*)
+ shlibext=so
+ ;;
+ newsos6)
+ shlibext=so
+ ;;
+ openbsd*)
+ shlibext=so
+ ;;
+ os2*)
+ libname_spec='$name'
+ shlibext=dll
+ ;;
+ osf3* | osf4* | osf5*)
+ shlibext=so
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+ sco3.2v5*)
+ shlibext=so
+ ;;
+ solaris*)
+ shlibext=so
+ ;;
+ sunos4*)
+ shlibext=so
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ shlibext=so
+ case "$host_vendor" in
+ motorola)
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+ uts4*)
+ shlibext=so
+ ;;
+ dgux*)
+ shlibext=so
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ shlibext=so
+ fi
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
+
+EOF
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.status
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.status Wed Dec 27 00:14:01 2006
@@ -0,0 +1,617 @@
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host moutons:
+#
+# ./configure
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion"
+ exec ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "./config.status generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "$ac_cs_usage"; exit 0 ;;
+ *) echo "$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=.
+ac_given_INSTALL="/usr/bin/install -c"
+
+trap 'rm -fr intl/Makefile po/Makefile.in m4/Makefile
+Makefile
+src/Makefile
+intl/Makefile
+po/Makefile.in
+ config.h conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+/^[ ]*VPATH[ ]*=[^:]*$/d
+
+s%@SHELL@%/bin/sh%g
+s%@CFLAGS@%-g -O2 -Wall%g
+s%@CPPFLAGS@%%g
+s%@CXXFLAGS@%%g
+s%@FFLAGS@%%g
+s%@DEFS@%-DHAVE_CONFIG_H%g
+s%@LDFLAGS@%%g
+s%@LIBS@%%g
+s%@exec_prefix@%${prefix}%g
+s%@prefix@%/usr/local%g
+s%@program_transform_name@%s,x,x,%g
+s%@bindir@%${exec_prefix}/bin%g
+s%@sbindir@%${exec_prefix}/sbin%g
+s%@libexecdir@%${exec_prefix}/libexec%g
+s%@datadir@%${prefix}/share%g
+s%@sysconfdir@%${prefix}/etc%g
+s%@sharedstatedir@%${prefix}/com%g
+s%@localstatedir@%${prefix}/var%g
+s%@libdir@%${exec_prefix}/lib%g
+s%@includedir@%${prefix}/include%g
+s%@oldincludedir@%/usr/include%g
+s%@infodir@%${prefix}/info%g
+s%@mandir@%${prefix}/man%g
+s%@INSTALL_PROGRAM@%${INSTALL}%g
+s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g
+s%@INSTALL_DATA@%${INSTALL} -m 644%g
+s%@PACKAGE@%bewan_adsl_status%g
+s%@VERSION@%0.1%g
+s%@ACLOCAL@%aclocal-1.4%g
+s%@AUTOCONF@%autoconf%g
+s%@AUTOMAKE@%automake-1.4%g
+s%@AUTOHEADER@%autoheader%g
+s%@MAKEINFO@%makeinfo%g
+s%@SET_MAKE@%%g
+s%@CC@%gcc%g
+s%@CPP@%gcc -E%g
+s%@GTK_CONFIG@%/usr/bin/gtk-config%g
+s%@GTK_CFLAGS@%-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include%g
+s%@GTK_LIBS@%-L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm%g
+s%@MKINSTALLDIRS@%./mkinstalldirs%g
+s%@MSGFMT@%/usr/bin/msgfmt%g
+s%@GMSGFMT@%/usr/bin/msgfmt%g
+s%@XGETTEXT@%/usr/bin/xgettext%g
+s%@MSGMERGE@%/usr/bin/msgmerge%g
+s%@host@%i686-pc-linux-gnu%g
+s%@host_alias@%i686-pc-linux-gnu%g
+s%@host_cpu@%i686%g
+s%@host_vendor@%pc%g
+s%@host_os@%linux-gnu%g
+s%@RANLIB@%ranlib%g
+s%@ALLOCA@%%g
+s%@GLIBC21@%yes%g
+s%@LIBICONV@%%g
+s%@LTLIBICONV@%%g
+s%@INTLBISON@%bison%g
+s%@USE_NLS@%yes%g
+s%@BUILD_INCLUDED_LIBINTL@%no%g
+s%@USE_INCLUDED_LIBINTL@%no%g
+s%@CATOBJEXT@%.gmo%g
+s%@INTLOBJS@%%g
+s%@DATADIRNAME@%share%g
+s%@INSTOBJEXT@%.mo%g
+s%@GENCAT@%gencat%g
+s%@INTL_LIBTOOL_SUFFIX_PREFIX@%%g
+s%@INTLLIBS@%%g
+s%@LIBINTL@%%g
+s%@LTLIBINTL@%%g
+s%@POSUB@%po%g
+
+CEOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+
+CONFIG_FILES=${CONFIG_FILES-"intl/Makefile po/Makefile.in m4/Makefile
+Makefile
+src/Makefile
+intl/Makefile
+po/Makefile.in
+"}
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+ CONFIG_HEADERS="config.h"
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"bewan_adsl_status"${ac_dD}
+${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"bewan_adsl_status"${ac_uD}
+${ac_eA}PACKAGE${ac_eB}PACKAGE${ac_eC}"bewan_adsl_status"${ac_eD}
+${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"0.1"${ac_dD}
+${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"0.1"${ac_uD}
+${ac_eA}VERSION${ac_eB}VERSION${ac_eC}"0.1"${ac_eD}
+${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
+${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
+${ac_eA}STDC_HEADERS${ac_eB}STDC_HEADERS${ac_eC}1${ac_eD}
+${ac_dA}HAVE_INTTYPES_H_WITH_UINTMAX${ac_dB}HAVE_INTTYPES_H_WITH_UINTMAX${ac_dC}1${ac_dD}
+${ac_uA}HAVE_INTTYPES_H_WITH_UINTMAX${ac_uB}HAVE_INTTYPES_H_WITH_UINTMAX${ac_uC}1${ac_uD}
+${ac_eA}HAVE_INTTYPES_H_WITH_UINTMAX${ac_eB}HAVE_INTTYPES_H_WITH_UINTMAX${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_STDINT_H_WITH_UINTMAX${ac_dB}HAVE_STDINT_H_WITH_UINTMAX${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STDINT_H_WITH_UINTMAX${ac_uB}HAVE_STDINT_H_WITH_UINTMAX${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STDINT_H_WITH_UINTMAX${ac_eB}HAVE_STDINT_H_WITH_UINTMAX${ac_eC}1${ac_eD}
+${ac_dA}HAVE_UNSIGNED_LONG_LONG${ac_dB}HAVE_UNSIGNED_LONG_LONG${ac_dC}1${ac_dD}
+${ac_uA}HAVE_UNSIGNED_LONG_LONG${ac_uB}HAVE_UNSIGNED_LONG_LONG${ac_uC}1${ac_uD}
+${ac_eA}HAVE_UNSIGNED_LONG_LONG${ac_eB}HAVE_UNSIGNED_LONG_LONG${ac_eC}1${ac_eD}
+${ac_dA}HAVE_ALLOCA_H${ac_dB}HAVE_ALLOCA_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_ALLOCA_H${ac_uB}HAVE_ALLOCA_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_ALLOCA_H${ac_eB}HAVE_ALLOCA_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_ALLOCA${ac_dB}HAVE_ALLOCA${ac_dC}1${ac_dD}
+${ac_uA}HAVE_ALLOCA${ac_uB}HAVE_ALLOCA${ac_uC}1${ac_uD}
+${ac_eA}HAVE_ALLOCA${ac_eB}HAVE_ALLOCA${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETPAGESIZE${ac_dB}HAVE_GETPAGESIZE${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETPAGESIZE${ac_uB}HAVE_GETPAGESIZE${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETPAGESIZE${ac_eB}HAVE_GETPAGESIZE${ac_eC}1${ac_eD}
+${ac_dA}HAVE_MMAP${ac_dB}HAVE_MMAP${ac_dC}1${ac_dD}
+${ac_uA}HAVE_MMAP${ac_uB}HAVE_MMAP${ac_uC}1${ac_uD}
+${ac_eA}HAVE_MMAP${ac_eB}HAVE_MMAP${ac_eC}1${ac_eD}
+${ac_dA}INTDIV0_RAISES_SIGFPE${ac_dB}INTDIV0_RAISES_SIGFPE${ac_dC}1${ac_dD}
+${ac_uA}INTDIV0_RAISES_SIGFPE${ac_uB}INTDIV0_RAISES_SIGFPE${ac_uC}1${ac_uD}
+${ac_eA}INTDIV0_RAISES_SIGFPE${ac_eB}INTDIV0_RAISES_SIGFPE${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_INTTYPES_H${ac_eB}HAVE_INTTYPES_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_ARGZ_H${ac_dB}HAVE_ARGZ_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_ARGZ_H${ac_uB}HAVE_ARGZ_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_ARGZ_H${ac_eB}HAVE_ARGZ_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_LIMITS_H${ac_dB}HAVE_LIMITS_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_LIMITS_H${ac_uB}HAVE_LIMITS_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_LIMITS_H${ac_eB}HAVE_LIMITS_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_LOCALE_H${ac_dB}HAVE_LOCALE_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_LOCALE_H${ac_uB}HAVE_LOCALE_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_LOCALE_H${ac_eB}HAVE_LOCALE_H${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_NL_TYPES_H${ac_dB}HAVE_NL_TYPES_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_NL_TYPES_H${ac_uB}HAVE_NL_TYPES_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_NL_TYPES_H${ac_eB}HAVE_NL_TYPES_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_MALLOC_H${ac_dB}HAVE_MALLOC_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_MALLOC_H${ac_uB}HAVE_MALLOC_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_MALLOC_H${ac_eB}HAVE_MALLOC_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_STDDEF_H${ac_dB}HAVE_STDDEF_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STDDEF_H${ac_uB}HAVE_STDDEF_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STDDEF_H${ac_eB}HAVE_STDDEF_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STDLIB_H${ac_eB}HAVE_STDLIB_H${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STRING_H${ac_eB}HAVE_STRING_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_SYS_PARAM_H${ac_dB}HAVE_SYS_PARAM_H${ac_dC}1${ac_dD}
+${ac_uA}HAVE_SYS_PARAM_H${ac_uB}HAVE_SYS_PARAM_H${ac_uC}1${ac_uD}
+${ac_eA}HAVE_SYS_PARAM_H${ac_eB}HAVE_SYS_PARAM_H${ac_eC}1${ac_eD}
+${ac_dA}HAVE_FEOF_UNLOCKED${ac_dB}HAVE_FEOF_UNLOCKED${ac_dC}1${ac_dD}
+${ac_uA}HAVE_FEOF_UNLOCKED${ac_uB}HAVE_FEOF_UNLOCKED${ac_uC}1${ac_uD}
+${ac_eA}HAVE_FEOF_UNLOCKED${ac_eB}HAVE_FEOF_UNLOCKED${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_FGETS_UNLOCKED${ac_dB}HAVE_FGETS_UNLOCKED${ac_dC}1${ac_dD}
+${ac_uA}HAVE_FGETS_UNLOCKED${ac_uB}HAVE_FGETS_UNLOCKED${ac_uC}1${ac_uD}
+${ac_eA}HAVE_FGETS_UNLOCKED${ac_eB}HAVE_FGETS_UNLOCKED${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETC_UNLOCKED${ac_dB}HAVE_GETC_UNLOCKED${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETC_UNLOCKED${ac_uB}HAVE_GETC_UNLOCKED${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETC_UNLOCKED${ac_eB}HAVE_GETC_UNLOCKED${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETCWD${ac_dB}HAVE_GETCWD${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETCWD${ac_uB}HAVE_GETCWD${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETCWD${ac_eB}HAVE_GETCWD${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETEGID${ac_dB}HAVE_GETEGID${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETEGID${ac_uB}HAVE_GETEGID${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETEGID${ac_eB}HAVE_GETEGID${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_GETEUID${ac_dB}HAVE_GETEUID${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETEUID${ac_uB}HAVE_GETEUID${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETEUID${ac_eB}HAVE_GETEUID${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETGID${ac_dB}HAVE_GETGID${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETGID${ac_uB}HAVE_GETGID${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETGID${ac_eB}HAVE_GETGID${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETUID${ac_dB}HAVE_GETUID${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETUID${ac_uB}HAVE_GETUID${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETUID${ac_eB}HAVE_GETUID${ac_eC}1${ac_eD}
+${ac_dA}HAVE_MEMPCPY${ac_dB}HAVE_MEMPCPY${ac_dC}1${ac_dD}
+${ac_uA}HAVE_MEMPCPY${ac_uB}HAVE_MEMPCPY${ac_uC}1${ac_uD}
+${ac_eA}HAVE_MEMPCPY${ac_eB}HAVE_MEMPCPY${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_MUNMAP${ac_dB}HAVE_MUNMAP${ac_dC}1${ac_dD}
+${ac_uA}HAVE_MUNMAP${ac_uB}HAVE_MUNMAP${ac_uC}1${ac_uD}
+${ac_eA}HAVE_MUNMAP${ac_eB}HAVE_MUNMAP${ac_eC}1${ac_eD}
+${ac_dA}HAVE_PUTENV${ac_dB}HAVE_PUTENV${ac_dC}1${ac_dD}
+${ac_uA}HAVE_PUTENV${ac_uB}HAVE_PUTENV${ac_uC}1${ac_uD}
+${ac_eA}HAVE_PUTENV${ac_eB}HAVE_PUTENV${ac_eC}1${ac_eD}
+${ac_dA}HAVE_SETENV${ac_dB}HAVE_SETENV${ac_dC}1${ac_dD}
+${ac_uA}HAVE_SETENV${ac_uB}HAVE_SETENV${ac_uC}1${ac_uD}
+${ac_eA}HAVE_SETENV${ac_eB}HAVE_SETENV${ac_eC}1${ac_eD}
+${ac_dA}HAVE_SETLOCALE${ac_dB}HAVE_SETLOCALE${ac_dC}1${ac_dD}
+${ac_uA}HAVE_SETLOCALE${ac_uB}HAVE_SETLOCALE${ac_uC}1${ac_uD}
+${ac_eA}HAVE_SETLOCALE${ac_eB}HAVE_SETLOCALE${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_STPCPY${ac_dB}HAVE_STPCPY${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STPCPY${ac_uB}HAVE_STPCPY${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STPCPY${ac_eB}HAVE_STPCPY${ac_eC}1${ac_eD}
+${ac_dA}HAVE_STRCASECMP${ac_dB}HAVE_STRCASECMP${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STRCASECMP${ac_uB}HAVE_STRCASECMP${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STRCASECMP${ac_eB}HAVE_STRCASECMP${ac_eC}1${ac_eD}
+${ac_dA}HAVE_STRDUP${ac_dB}HAVE_STRDUP${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STRDUP${ac_uB}HAVE_STRDUP${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STRDUP${ac_eB}HAVE_STRDUP${ac_eC}1${ac_eD}
+${ac_dA}HAVE_STRTOUL${ac_dB}HAVE_STRTOUL${ac_dC}1${ac_dD}
+${ac_uA}HAVE_STRTOUL${ac_uB}HAVE_STRTOUL${ac_uC}1${ac_uD}
+${ac_eA}HAVE_STRTOUL${ac_eB}HAVE_STRTOUL${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_TSEARCH${ac_dB}HAVE_TSEARCH${ac_dC}1${ac_dD}
+${ac_uA}HAVE_TSEARCH${ac_uB}HAVE_TSEARCH${ac_uC}1${ac_uD}
+${ac_eA}HAVE_TSEARCH${ac_eB}HAVE_TSEARCH${ac_eC}1${ac_eD}
+${ac_dA}HAVE___ARGZ_COUNT${ac_dB}HAVE___ARGZ_COUNT${ac_dC}1${ac_dD}
+${ac_uA}HAVE___ARGZ_COUNT${ac_uB}HAVE___ARGZ_COUNT${ac_uC}1${ac_uD}
+${ac_eA}HAVE___ARGZ_COUNT${ac_eB}HAVE___ARGZ_COUNT${ac_eC}1${ac_eD}
+${ac_dA}HAVE___ARGZ_STRINGIFY${ac_dB}HAVE___ARGZ_STRINGIFY${ac_dC}1${ac_dD}
+${ac_uA}HAVE___ARGZ_STRINGIFY${ac_uB}HAVE___ARGZ_STRINGIFY${ac_uC}1${ac_uD}
+${ac_eA}HAVE___ARGZ_STRINGIFY${ac_eB}HAVE___ARGZ_STRINGIFY${ac_eC}1${ac_eD}
+${ac_dA}HAVE___ARGZ_NEXT${ac_dB}HAVE___ARGZ_NEXT${ac_dC}1${ac_dD}
+${ac_uA}HAVE___ARGZ_NEXT${ac_uB}HAVE___ARGZ_NEXT${ac_uC}1${ac_uD}
+${ac_eA}HAVE___ARGZ_NEXT${ac_eB}HAVE___ARGZ_NEXT${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}HAVE_ICONV${ac_dB}HAVE_ICONV${ac_dC}1${ac_dD}
+${ac_uA}HAVE_ICONV${ac_uB}HAVE_ICONV${ac_uC}1${ac_uD}
+${ac_eA}HAVE_ICONV${ac_eB}HAVE_ICONV${ac_eC}1${ac_eD}
+${ac_dA}ICONV_CONST${ac_dB}ICONV_CONST${ac_dC}${ac_dD}
+${ac_uA}ICONV_CONST${ac_uB}ICONV_CONST${ac_uC}${ac_uD}
+${ac_eA}ICONV_CONST${ac_eB}ICONV_CONST${ac_eC}${ac_eD}
+${ac_dA}HAVE_LANGINFO_CODESET${ac_dB}HAVE_LANGINFO_CODESET${ac_dC}1${ac_dD}
+${ac_uA}HAVE_LANGINFO_CODESET${ac_uB}HAVE_LANGINFO_CODESET${ac_uC}1${ac_uD}
+${ac_eA}HAVE_LANGINFO_CODESET${ac_eB}HAVE_LANGINFO_CODESET${ac_eC}1${ac_eD}
+${ac_dA}HAVE_LC_MESSAGES${ac_dB}HAVE_LC_MESSAGES${ac_dC}1${ac_dD}
+${ac_uA}HAVE_LC_MESSAGES${ac_uB}HAVE_LC_MESSAGES${ac_uC}1${ac_uD}
+${ac_eA}HAVE_LC_MESSAGES${ac_eB}HAVE_LC_MESSAGES${ac_eC}1${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}ENABLE_NLS${ac_dB}ENABLE_NLS${ac_dC}1${ac_dD}
+${ac_uA}ENABLE_NLS${ac_uB}ENABLE_NLS${ac_uC}1${ac_uD}
+${ac_eA}ENABLE_NLS${ac_eB}ENABLE_NLS${ac_eC}1${ac_eD}
+${ac_dA}HAVE_GETTEXT${ac_dB}HAVE_GETTEXT${ac_dC}1${ac_dD}
+${ac_uA}HAVE_GETTEXT${ac_uB}HAVE_GETTEXT${ac_uC}1${ac_uD}
+${ac_eA}HAVE_GETTEXT${ac_eB}HAVE_GETTEXT${ac_eC}1${ac_eD}
+${ac_dA}HAVE_DCGETTEXT${ac_dB}HAVE_DCGETTEXT${ac_dC}1${ac_dD}
+${ac_uA}HAVE_DCGETTEXT${ac_uB}HAVE_DCGETTEXT${ac_uC}1${ac_uD}
+${ac_eA}HAVE_DCGETTEXT${ac_eB}HAVE_DCGETTEXT${ac_eC}1${ac_eD}
+${ac_dA}PACKAGE_LOCALE_DIR${ac_dB}PACKAGE_LOCALE_DIR${ac_dC}"/usr/local/share/locale"${ac_dD}
+${ac_uA}PACKAGE_LOCALE_DIR${ac_uB}PACKAGE_LOCALE_DIR${ac_uC}"/usr/local/share/locale"${ac_uD}
+${ac_eA}PACKAGE_LOCALE_DIR${ac_eB}PACKAGE_LOCALE_DIR${ac_eC}"/usr/local/share/locale"${ac_eD}
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ cat > conftest.frag <<CEOF
+${ac_dA}PACKAGE_DATA_DIR${ac_dB}PACKAGE_DATA_DIR${ac_dC}"/usr/local/share/bewan_adsl_status"${ac_dD}
+${ac_uA}PACKAGE_DATA_DIR${ac_uB}PACKAGE_DATA_DIR${ac_uC}"/usr/local/share/bewan_adsl_status"${ac_uD}
+${ac_eA}PACKAGE_DATA_DIR${ac_eB}PACKAGE_DATA_DIR${ac_eC}"/usr/local/share/bewan_adsl_status"${ac_eD}
+${ac_dA}PACKAGE_SOURCE_DIR${ac_dB}PACKAGE_SOURCE_DIR${ac_dC}"/home/fisaksen/src/unicorn/adsl_status"${ac_dD}
+${ac_uA}PACKAGE_SOURCE_DIR${ac_uB}PACKAGE_SOURCE_DIR${ac_uC}"/home/fisaksen/src/unicorn/adsl_status"${ac_uD}
+${ac_eA}PACKAGE_SOURCE_DIR${ac_eB}PACKAGE_SOURCE_DIR${ac_eC}"/home/fisaksen/src/unicorn/adsl_status"${ac_eD}
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'ALL_LINGUAS''="fr it"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="%UNSET%"
+
+
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done
+
+exit 0
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/config.sub
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/config.sub Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/config.sub
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/configure
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/configure Wed Dec 27 00:14:01 2006
@@ -0,0 +1,4963 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)"
+ac_help="$ac_help
+ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
+ac_help="$ac_help
+ --disable-gtktest Do not try to compile and run a test GTK program"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+ --disable-rpath do not hardcode runtime library paths"
+ac_help="$ac_help
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir"
+ac_help="$ac_help
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=configure.in
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:556: checking for ld used by GCC" >&5
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:586: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:589: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'acl_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:624: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'acl_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$acl_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+am__api_version="1.4"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:673: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:726: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:783: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=bewan_adsl_status
+
+VERSION=0.1
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
+echo "configure:829: checking for working aclocal-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:842: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
+echo "configure:855: checking for working automake-${am__api_version}" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake-${am__api_version}
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:868: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:881: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:900: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 908 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
+
+int main() {
+strerror()
+; return 0; }
+EOF
+if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -lcposix"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:944: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:974: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1025: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1057: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1068 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1099: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1104: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1132: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+
+
+
+echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+echo "configure:1167: checking for ${CC-cc} option to accept ANSI C" >&5
+if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ cat > conftest.$ac_ext <<EOF
+#line 1183 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+
+int main() {
+
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+
+; return 0; }
+EOF
+if { (eval echo configure:1220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_prog_cc_stdc="$ac_arg"; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+CC="$ac_save_CC"
+
+fi
+
+if test -z "$am_cv_prog_cc_stdc"; then
+ echo "$ac_t""none needed" 1>&6
+else
+ echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1244: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1259 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1276 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1293 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1324: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1329 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1354 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1372 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1393 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+
+# Check whether --with-gtk-prefix or --without-gtk-prefix was given.
+if test "${with_gtk_prefix+set}" = set; then
+ withval="$with_gtk_prefix"
+ gtk_config_prefix="$withval"
+else
+ gtk_config_prefix=""
+fi
+
+# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
+if test "${with_gtk_exec_prefix+set}" = set; then
+ withval="$with_gtk_exec_prefix"
+ gtk_config_exec_prefix="$withval"
+else
+ gtk_config_exec_prefix=""
+fi
+
+# Check whether --enable-gtktest or --disable-gtktest was given.
+if test "${enable_gtktest+set}" = set; then
+ enableval="$enable_gtktest"
+ :
+else
+ enable_gtktest=yes
+fi
+
+
+ for module in .
+ do
+ case "$module" in
+ gthread)
+ gtk_config_args="$gtk_config_args gthread"
+ ;;
+ esac
+ done
+
+ if test x$gtk_config_exec_prefix != x ; then
+ gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
+ fi
+ fi
+ if test x$gtk_config_prefix != x ; then
+ gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
+ fi
+ fi
+
+ # Extract the first word of "gtk-config", so it can be a program name with args.
+set dummy gtk-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1478: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GTK_CONFIG" in
+ /*)
+ ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
+ ;;
+esac
+fi
+GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
+if test -n "$GTK_CONFIG"; then
+ echo "$ac_t""$GTK_CONFIG" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ min_gtk_version=1.2.0
+ echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
+echo "configure:1513: checking for GTK - version >= $min_gtk_version" >&5
+ no_gtk=""
+ if test "$GTK_CONFIG" = "no" ; then
+ no_gtk=yes
+ else
+ GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
+ GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
+ gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$GTK_LIBS $LIBS"
+ rm -f conf.gtktest
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1536 "configure"
+#include "confdefs.h"
+
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.gtktest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gtk_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_gtk_version");
+ exit(1);
+ }
+
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If gtk-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
+ printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
+ printf("*** before re-running configure\n");
+ }
+#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
+ else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+ (gtk_minor_version != GTK_MINOR_VERSION) ||
+ (gtk_micro_version != GTK_MICRO_VERSION))
+ {
+ printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ }
+#endif /* defined (GTK_MAJOR_VERSION) ... */
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
+ printf("*** correct copy of gtk-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+
+EOF
+if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ no_gtk=yes
+fi
+rm -fr conftest*
+fi
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gtk" = x ; then
+ echo "$ac_t""yes" 1>&6
+ :
+ else
+ echo "$ac_t""no" 1>&6
+ if test "$GTK_CONFIG" = "no" ; then
+ echo "*** The gtk-config script installed by GTK could not be found"
+ echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GTK_CONFIG environment variable to the"
+ echo "*** full path to gtk-config."
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK test program, checking why..."
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ cat > conftest.$ac_ext <<EOF
+#line 1648 "configure"
+#include "confdefs.h"
+
+#include <gtk/gtk.h>
+#include <stdio.h>
+
+int main() {
+ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
+; return 0; }
+EOF
+if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK or finding the wrong"
+ echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ echo "***"
+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+ echo "*** came with the system with the command"
+ echo "***"
+ echo "*** rpm --erase --nodeps gtk gtk-devel"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+ echo "*** or that you have moved GTK since it was installed. In the latter case, you"
+ echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
+fi
+rm -f conftest*
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ { echo "configure: error: Cannot find GTK: Is gtk-config in path?" 1>&2; exit 1; }
+ fi
+
+
+ rm -f conf.gtktest
+
+
+ALL_LINGUAS="fr it"
+
+ echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
+echo "configure:1700: checking for inttypes.h" >&5
+if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1705 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <inttypes.h>
+int main() {
+uintmax_t i = (uintmax_t) -1;
+; return 0; }
+EOF
+if { (eval echo configure:1713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ jm_ac_cv_header_inttypes_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ jm_ac_cv_header_inttypes_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ cat >> confdefs.h <<EOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for stdint.h""... $ac_c" 1>&6
+echo "configure:1735: checking for stdint.h" >&5
+if eval "test \"`echo '$''{'jm_ac_cv_header_stdint_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1740 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <stdint.h>
+int main() {
+uintmax_t i = (uintmax_t) -1;
+; return 0; }
+EOF
+if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ jm_ac_cv_header_stdint_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ jm_ac_cv_header_stdint_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$jm_ac_cv_header_stdint_h" 1>&6
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ cat >> confdefs.h <<EOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for unsigned long long""... $ac_c" 1>&6
+echo "configure:1770: checking for unsigned long long" >&5
+if eval "test \"`echo '$''{'ac_cv_type_unsigned_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1775 "configure"
+#include "confdefs.h"
+unsigned long long ull = 1; int i = 63;
+int main() {
+unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+; return 0; }
+EOF
+if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_type_unsigned_long_long=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_unsigned_long_long=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_unsigned_long_long" 1>&6
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+EOF
+
+ fi
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+ echo $ac_n "checking for shared library run path origin""... $ac_c" 1>&6
+echo "configure:1821: checking for shared library run path origin" >&5
+if eval "test \"`echo '$''{'acl_cv_rpath'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+
+echo "$ac_t""$acl_cv_rpath" 1>&6
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ # Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval="$enable_rpath"
+ :
+else
+ enable_rpath=yes
+fi
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:1870: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1893: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1921: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1926 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:1996: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2003 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2036: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2041 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2069: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2074 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:2104: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2109 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2137: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2142 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2202: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2207 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2232: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2237 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2287: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2295 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2339: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2344 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2378: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2383 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2431: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2439 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
+echo "configure:2603: checking whether we are using the GNU C Library 2.1 or newer" >&5
+if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2608 "configure"
+#include "confdefs.h"
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "Lucky GNU user" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_gnu_library_2_1=yes
+else
+ rm -rf conftest*
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+
+echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+
+ echo $ac_n "checking whether integer division by zero raises SIGFPE""... $ac_c" 1>&6
+echo "configure:2641: checking whether integer division by zero raises SIGFPE" >&5
+if eval "test \"`echo '$''{'gt_cv_int_divbyzero_sigfpe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ if test "$cross_compiling" = yes; then
+
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i3456786 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2658 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+
+EOF
+if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ gt_cv_int_divbyzero_sigfpe=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ gt_cv_int_divbyzero_sigfpe=no
+fi
+rm -fr conftest*
+fi
+
+
+fi
+
+echo "$ac_t""$gt_cv_int_divbyzero_sigfpe" 1>&6
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ cat >> confdefs.h <<EOF
+#define INTDIV0_RAISES_SIGFPE $value
+EOF
+
+
+
+
+
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ cat >> confdefs.h <<EOF
+#define uintmax_t $ac_type
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
+echo "configure:2739: checking for inttypes.h" >&5
+if eval "test \"`echo '$''{'gt_cv_header_inttypes_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 2745 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <inttypes.h>
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gt_cv_header_inttypes_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_header_inttypes_h=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gt_cv_header_inttypes_h" 1>&6
+ if test $gt_cv_header_inttypes_h = yes; then
+ cat >> confdefs.h <<EOF
+#define HAVE_INTTYPES_H 1
+EOF
+
+ fi
+
+
+
+ if test $gt_cv_header_inttypes_h = yes; then
+ echo $ac_n "checking whether the inttypes.h PRIxNN macros are broken""... $ac_c" 1>&6
+echo "configure:2778: checking whether the inttypes.h PRIxNN macros are broken" >&5
+if eval "test \"`echo '$''{'gt_cv_inttypes_pri_broken'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 2784 "configure"
+#include "confdefs.h"
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gt_cv_inttypes_pri_broken=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_inttypes_pri_broken=yes
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gt_cv_inttypes_pri_broken" 1>&6
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ cat >> confdefs.h <<EOF
+#define PRI_MACROS_BROKEN 1
+EOF
+
+ fi
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval="$with_libiconv_prefix"
+
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3206: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3241: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3278: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ rm -f messages.po
+
+ # Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3315: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGMERGE" in
+ /*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$ac_t""$MSGMERGE" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$ac_t""found $GMSGFMT program is not GNU msgfmt; ignore it" 1>&6
+ GMSGFMT=":"
+ fi
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+
+
+
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3378: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3383 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3419: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3424 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ echo $ac_n "checking for iconv""... $ac_c" 1>&6
+echo "configure:3503: checking for iconv" >&5
+if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat > conftest.$ac_ext <<EOF
+#line 3511 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_func_iconv=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat > conftest.$ac_ext <<EOF
+#line 3533 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+
+echo "$ac_t""$am_cv_func_iconv" 1>&6
+ if test "$am_cv_func_iconv" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ICONV 1
+EOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ echo $ac_n "checking how to link with libiconv""... $ac_c" 1>&6
+echo "configure:3566: checking how to link with libiconv" >&5
+ echo "$ac_t""$LIBICONV" 1>&6
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
+echo "configure:3578: checking for iconv declaration" >&5
+ if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 3584 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_proto_iconv_arg1=""
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_proto_iconv_arg1="const"
+fi
+rm -f conftest*
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ echo "$ac_t""${ac_t:-
+ }$am_cv_proto_iconv" 1>&6
+ cat >> confdefs.h <<EOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
+echo "configure:3627: checking for nl_langinfo and CODESET" >&5
+if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3632 "configure"
+#include "confdefs.h"
+#include <langinfo.h>
+int main() {
+char* cs = nl_langinfo(CODESET);
+; return 0; }
+EOF
+if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_langinfo_codeset=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_langinfo_codeset=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
+ if test $am_cv_langinfo_codeset = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LANGINFO_CODESET 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3663: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3668 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+
+ fi
+
+ for ac_prog in bison
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3702: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$INTLBISON"; then
+ ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_INTLBISON="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+INTLBISON="$ac_cv_prog_INTLBISON"
+if test -n "$INTLBISON"; then
+ echo "$ac_t""$INTLBISON" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$INTLBISON" && break
+done
+
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ echo $ac_n "checking version of bison""... $ac_c" 1>&6
+echo "configure:3735: checking version of bison" >&5
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ echo "$ac_t""$ac_prog_version" 1>&6
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3764: checking whether NLS is requested" >&5
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3788: checking whether included gettext is requested" >&5
+ # Check whether --with-included-gettext or --without-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+ withval="$with_included_gettext"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+
+
+
+
+
+
+ echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
+echo "configure:3808: checking for GNU gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3813 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int main() {
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
+; return 0; }
+EOF
+if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ gt_cv_func_gnugettext1_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gnugettext1_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
+
+ if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+ withval="$with_libintl_prefix"
+
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+ echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
+echo "configure:4218: checking for GNU gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat > conftest.$ac_ext <<EOF
+#line 4227 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int main() {
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+; return 0; }
+EOF
+if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ gt_cv_func_gnugettext1_libintl=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gnugettext1_libintl=no
+fi
+rm -f conftest*
+ if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat > conftest.$ac_ext <<EOF
+#line 4254 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int main() {
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+; return 0; }
+EOF
+if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext1_libintl=yes
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+
+echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
+ fi
+
+ if test "$gt_cv_func_gnugettext1_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+ && test "$PACKAGE" != gettext; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
+ LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ CATOBJEXT=.gmo
+ fi
+
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+ echo $ac_n "checking how to link with libintl""... $ac_c" 1>&6
+echo "configure:4334: checking how to link with libintl" >&5
+ echo "$ac_t""$LIBINTL" 1>&6
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_DCGETTEXT 1
+EOF
+
+ fi
+
+ POSUB=po
+ fi
+
+
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+
+
+
+
+
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ DATADIRNAME=share
+
+
+ INSTOBJEXT=.mo
+
+
+ GENCAT=gencat
+
+
+ INTL_LIBTOOL_SUFFIX_PREFIX=
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+if test "x${prefix}" = "xNONE"; then
+ cat >> confdefs.h <<EOF
+#define PACKAGE_LOCALE_DIR "${ac_default_prefix}/${DATADIRNAME}/locale"
+EOF
+
+else
+ cat >> confdefs.h <<EOF
+#define PACKAGE_LOCALE_DIR "${prefix}/${DATADIRNAME}/locale"
+EOF
+
+fi
+
+if test "x${datadir}" = 'x${prefix}/share'; then
+ if test "x${prefix}" = "xNONE"; then
+ cat >> confdefs.h <<EOF
+#define PACKAGE_DATA_DIR "${ac_default_prefix}/share/${PACKAGE}"
+EOF
+
+ else
+ cat >> confdefs.h <<EOF
+#define PACKAGE_DATA_DIR "${prefix}/share/${PACKAGE}"
+EOF
+
+ fi
+else
+ cat >> confdefs.h <<EOF
+#define PACKAGE_DATA_DIR "${datadir}/${PACKAGE}"
+EOF
+
+fi
+
+packagesrcdir=`cd $srcdir && pwd`
+cat >> confdefs.h <<EOF
+#define PACKAGE_SOURCE_DIR "${packagesrcdir}"
+EOF
+
+
+if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
+ *[\ \ ]-Wall[\ \ ]*) ;;
+ *) CFLAGS="$CFLAGS -Wall" ;;
+ esac
+fi
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo " intl/Makefile po/Makefile.in m4/Makefile
+Makefile
+src/Makefile
+intl/Makefile
+po/Makefile.in
+ config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@GTK_CONFIG@%$GTK_CONFIG%g
+s%@GTK_CFLAGS@%$GTK_CFLAGS%g
+s%@GTK_LIBS@%$GTK_LIBS%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@MSGMERGE@%$MSGMERGE%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@RANLIB@%$RANLIB%g
+s%@ALLOCA@%$ALLOCA%g
+s%@GLIBC21@%$GLIBC21%g
+s%@LIBICONV@%$LIBICONV%g
+s%@LTLIBICONV@%$LTLIBICONV%g
+s%@INTLBISON@%$INTLBISON%g
+s%@USE_NLS@%$USE_NLS%g
+s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@LIBINTL@%$LIBINTL%g
+s%@LTLIBINTL@%$LTLIBINTL%g
+s%@POSUB@%$POSUB%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"intl/Makefile po/Makefile.in m4/Makefile
+Makefile
+src/Makefile
+intl/Makefile
+po/Makefile.in
+"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/configure.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/configure.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,57 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(configure.in)
+AM_INIT_AUTOMAKE(bewan_adsl_status, 0.1)
+AM_CONFIG_HEADER(config.h)
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+
+AM_PATH_GTK(1.2.0, ,
+ AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
+
+dnl Add the languages which your application supports here.
+ALL_LINGUAS="fr it"
+AM_GNU_GETTEXT
+
+dnl Set PACKAGE_LOCALE_DIR in config.h.
+if test "x${prefix}" = "xNONE"; then
+ AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
+else
+ AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
+fi
+
+dnl Set PACKAGE_DATA_DIR in config.h.
+if test "x${datadir}" = 'x${prefix}/share'; then
+ if test "x${prefix}" = "xNONE"; then
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
+ else
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
+ fi
+else
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
+fi
+
+dnl Set PACKAGE_SOURCE_DIR in config.h.
+packagesrcdir=`cd $srcdir && pwd`
+AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
+
+dnl Use -Wall if we have gcc.
+changequote(,)dnl
+if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
+ *[\ \ ]-Wall[\ \ ]*) ;;
+ *) CFLAGS="$CFLAGS -Wall" ;;
+ esac
+fi
+changequote([,])dnl
+
+AC_OUTPUT([ intl/Makefile po/Makefile.in m4/Makefile
+Makefile
+src/Makefile
+intl/Makefile
+po/Makefile.in
+])
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/green_led.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/green_led.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,24 @@
+/* XPM */
+static char *green_led[] =
+{
+/* width height ncolors chars_per_pixel */
+"8 11 5 1",
+/* colors */
+"A c #CCCCCCCCCCCC",
+"B c #3333FFFF9999",
+"C c #333399996666",
+"D c #0000BBBB0000",
+"E c #000000000000",
+/* pixels */
+"AEEEEEEA",
+"EBBBBBAE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EACCCCCE",
+"AEEEEEEA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/install-sh
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/install-sh Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/install-sh
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ChangeLog
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ChangeLog Wed Dec 27 00:14:01 2006
@@ -0,0 +1,4 @@
+2002-08-06 GNU <bug-gnu-gettext at gnu.org>
+
+ * Version 0.11.5 released.
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,337 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+PACKAGE = bewan_adsl_status
+VERSION = 0.1
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+top_builddir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+transform = s,x,x,
+libdir = ${exec_prefix}/lib
+includedir = ${prefix}/include
+datadir = ${prefix}/share
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+MKINSTALLDIRS = ./mkinstalldirs
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+l =
+
+AR = ar
+CC = gcc
+LIBTOOL = @LIBTOOL@
+RANLIB = ranlib
+YACC = bison -y -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL -DHAVE_CONFIG_H
+CPPFLAGS =
+CFLAGS = -g -O2 -Wall
+LDFLAGS =
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
+COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
+SOURCES = $(COMSRCS) intl-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
+plural-exp.c localcharset.c localename.c osdep.c os2compat.c
+OBJECTS = bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
+plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=4
+LTV_REVISION=0
+LTV_AGE=2
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+.c.o:
+ $(COMPILE) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+.y.c:
+ $(YACC) $(YFLAGS) --output $@ $<
+ rm -f $*.h
+
+.sin.sed:
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/bewan_adsl_status/g' $< > t-$@
+ mv t-$@ $@
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl
+
+all: all-no
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no-no
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+ $(OBJECTS) -lc \
+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+ -rpath $(libdir) \
+ -no-undefined
+
+libintl.h: libgnuintl.h
+ cp $(srcdir)/libgnuintl.h libintl.h
+
+charset.alias: config.charset
+ $(SHELL) $(srcdir)/config.charset 'i686-pc-linux-gnu' > t-$@
+ mv t-$@ $@
+
+check: all
+
+# This installation goal is only used in GNU gettext. Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+ if test "$(PACKAGE)" = "gettext" \
+ && test '' = '$(GETTOBJS)'; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=install \
+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+ else \
+ : ; \
+ fi
+ if test 'no' = yes; then \
+ test yes != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+ dest=$(DESTDIR)$(libdir)/charset.alias; \
+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+ orig=$(DESTDIR)$(libdir)/charset.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ if test yes = no; then \
+ orig=charset.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ fi; \
+ fi; \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ test -f $(DESTDIR)$(localedir)/locale.alias \
+ && orig=$(DESTDIR)$(localedir)/locale.alias \
+ || orig=$(srcdir)/locale.alias; \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+ dists="$(DISTFILES.generated)"; \
+ for file in $$dists; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ $(INSTALL_DATA) $$dir/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ dists="$(DISTFILES.obsolete)"; \
+ for file in $$dists; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+install-strip: install
+
+installdirs:
+ if test "$(PACKAGE)" = "gettext" \
+ && test '' = '$(GETTOBJS)'; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ else \
+ : ; \
+ fi
+ if test 'no' = yes; then \
+ test yes != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ if test "$(PACKAGE)" = "gettext" \
+ && test '' = '$(GETTOBJS)'; then \
+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=uninstall \
+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+ else \
+ : ; \
+ fi
+ if test 'no' = yes; then \
+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+ dest=$(DESTDIR)$(libdir)/charset.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext"; then \
+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+info dvi:
+
+$(OBJECTS): ../config.h libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
+dcigettext.$lo: hash-string.h
+explodename.$lo l10nflist.$lo: loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
+dcigettext.$lo: eval-plural.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.la *.o *.lo core core.*
+ rm -f libintl.h charset.alias ref-add.sed ref-del.sed
+ rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS
+ if test "$(PACKAGE)" = gettext; then \
+ rm -f ChangeLog.inst $(DISTFILES.normal); \
+ else \
+ : ; \
+ fi
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+ if test "$(PACKAGE)" = gettext; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ cp -p $$dir/$$file $(distdir); \
+ done
+
+Makefile: Makefile.in ../config.status
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/Makefile.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,337 @@
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @INTLBISON@ -y -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
+COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
+SOURCES = $(COMSRCS) intl-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
+plural-exp.c localcharset.c localename.c osdep.c os2compat.c
+OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
+plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=4
+LTV_REVISION=0
+LTV_AGE=2
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+.c.o:
+ $(COMPILE) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+.y.c:
+ $(YACC) $(YFLAGS) --output $@ $<
+ rm -f $*.h
+
+.sin.sed:
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
+ mv t-$@ $@
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl
+
+all: all- at USE_INCLUDED_LIBINTL@
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no- at BUILD_INCLUDED_LIBINTL@
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+ $(OBJECTS) @LTLIBICONV@ -lc \
+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+ -rpath $(libdir) \
+ -no-undefined
+
+libintl.h: libgnuintl.h
+ cp $(srcdir)/libgnuintl.h libintl.h
+
+charset.alias: config.charset
+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+ mv t-$@ $@
+
+check: all
+
+# This installation goal is only used in GNU gettext. Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=install \
+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+ dest=$(DESTDIR)$(libdir)/charset.alias; \
+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+ orig=$(DESTDIR)$(libdir)/charset.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ if test @GLIBC21@ = no; then \
+ orig=charset.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ fi; \
+ fi; \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ test -f $(DESTDIR)$(localedir)/locale.alias \
+ && orig=$(DESTDIR)$(localedir)/locale.alias \
+ || orig=$(srcdir)/locale.alias; \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+ dists="$(DISTFILES.generated)"; \
+ for file in $$dists; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ $(INSTALL_DATA) $$dir/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ dists="$(DISTFILES.obsolete)"; \
+ for file in $$dists; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+install-strip: install
+
+installdirs:
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=uninstall \
+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+ dest=$(DESTDIR)$(libdir)/charset.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext"; then \
+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+info dvi:
+
+$(OBJECTS): ../config.h libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
+dcigettext.$lo: hash-string.h
+explodename.$lo l10nflist.$lo: loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
+dcigettext.$lo: eval-plural.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.la *.o *.lo core core.*
+ rm -f libintl.h charset.alias ref-add.sed ref-del.sed
+ rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS
+ if test "$(PACKAGE)" = gettext; then \
+ rm -f ChangeLog.inst $(DISTFILES.normal); \
+ else \
+ : ; \
+ fi
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+ if test "$(PACKAGE)" = gettext; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ cp -p $$dir/$$file $(distdir); \
+ done
+
+Makefile: Makefile.in ../config.status
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/VERSION
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/VERSION Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.11.5
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/bindtextdom.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/bindtextdom.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,369 @@
+/* Implementation of the bindtextdomain(3) function
+ Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs. */
+extern const char _nl_default_dirname[];
+
+/* List with bindings of specific domains. */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
+#endif
+
+/* Prototypes for local functions. */
+static void set_binding_values PARAMS ((const char *domainname,
+ const char **dirnamep,
+ const char **codesetp));
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+ to be used for the DOMAINNAME message catalog.
+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+ modified, only the current value is returned.
+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+ modified nor returned. */
+static void
+set_binding_values (domainname, dirnamep, codesetp)
+ const char *domainname;
+ const char **dirnamep;
+ const char **codesetp;
+{
+ struct binding *binding;
+ int modified;
+
+ /* Some sanity checks. */
+ if (domainname == NULL || domainname[0] == '\0')
+ {
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ return;
+ }
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ modified = 0;
+
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding != NULL)
+ {
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The current binding has be to returned. */
+ *dirnamep = binding->dirname;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->dirname;
+ if (strcmp (dirname, result) != 0)
+ {
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ result = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, dirname, len);
+#endif
+ }
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->dirname != _nl_default_dirname)
+ free (binding->dirname);
+
+ binding->dirname = result;
+ modified = 1;
+ }
+ }
+ *dirnamep = result;
+ }
+ }
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset == NULL)
+ /* The current binding has be to returned. */
+ *codesetp = binding->codeset;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->codeset;
+ if (result == NULL || strcmp (codeset, result) != 0)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, codeset, len);
+#endif
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->codeset != NULL)
+ free (binding->codeset);
+
+ binding->codeset = result;
+ binding->codeset_cntr++;
+ modified = 1;
+ }
+ }
+ *codesetp = result;
+ }
+ }
+ }
+ else if ((dirnamep == NULL || *dirnamep == NULL)
+ && (codesetp == NULL || *codesetp == NULL))
+ {
+ /* Simply return the default values. */
+ if (dirnamep)
+ *dirnamep = _nl_default_dirname;
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ else
+ {
+ /* We have to create a new binding. */
+ size_t len = strlen (domainname) + 1;
+ struct binding *new_binding =
+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
+
+ if (__builtin_expect (new_binding == NULL, 0))
+ goto failed;
+
+ memcpy (new_binding->domainname, domainname, len);
+
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The default value. */
+ dirname = _nl_default_dirname;
+ else
+ {
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ dirname = _nl_default_dirname;
+ else
+ {
+ char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+ memcpy (result, dirname, len);
+#endif
+ dirname = result;
+ }
+ }
+ *dirnamep = dirname;
+ new_binding->dirname = (char *) dirname;
+ }
+ else
+ /* The default value. */
+ new_binding->dirname = (char *) _nl_default_dirname;
+
+ new_binding->codeset_cntr = 0;
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset != NULL)
+ {
+ char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+ memcpy (result, codeset, len);
+#endif
+ codeset = result;
+ new_binding->codeset_cntr++;
+ }
+ *codesetp = codeset;
+ new_binding->codeset = (char *) codeset;
+ }
+ else
+ new_binding->codeset = NULL;
+
+ /* Now enqueue it. */
+ if (_nl_domain_bindings == NULL
+ || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+ {
+ new_binding->next = _nl_domain_bindings;
+ _nl_domain_bindings = new_binding;
+ }
+ else
+ {
+ binding = _nl_domain_bindings;
+ while (binding->next != NULL
+ && strcmp (domainname, binding->next->domainname) > 0)
+ binding = binding->next;
+
+ new_binding->next = binding->next;
+ binding->next = new_binding;
+ }
+
+ modified = 1;
+
+ /* Here we deal with memory allocation failures. */
+ if (0)
+ {
+ failed_codeset:
+ if (new_binding->dirname != _nl_default_dirname)
+ free (new_binding->dirname);
+ failed_dirname:
+ free (new_binding);
+ failed:
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ }
+
+ /* If we modified any binding, we flush the caches. */
+ if (modified)
+ ++_nl_msg_cat_cntr;
+
+ __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ set_binding_values (domainname, &dirname, NULL);
+ return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+char *
+BIND_TEXTDOMAIN_CODESET (domainname, codeset)
+ const char *domainname;
+ const char *codeset;
+{
+ set_binding_values (domainname, NULL, &codeset);
+ return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library. */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/config.charset
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/config.charset Wed Dec 27 00:14:01 2006
@@ -0,0 +1,466 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+# Copyright (C) 2000-2002 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+#
+# The table consists of lines of the form
+# ALIAS CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+# name used by which systems a MIME name?
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
+# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-3 glibc solaris yes
+# ISO-8859-4 osf solaris freebsd yes
+# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-6 glibc aix hpux solaris yes
+# ISO-8859-7 glibc aix hpux irix osf solaris yes
+# ISO-8859-8 glibc aix hpux osf solaris yes
+# ISO-8859-9 glibc aix hpux irix osf solaris yes
+# ISO-8859-13 glibc
+# ISO-8859-14 glibc
+# ISO-8859-15 glibc aix osf solaris freebsd
+# KOI8-R glibc solaris freebsd yes
+# KOI8-U glibc freebsd yes
+# KOI8-T glibc
+# CP437 dos
+# CP775 dos
+# CP850 aix osf dos
+# CP852 dos
+# CP855 dos
+# CP856 aix
+# CP857 dos
+# CP861 dos
+# CP862 dos
+# CP864 dos
+# CP865 dos
+# CP866 freebsd dos
+# CP869 dos
+# CP874 woe32 dos
+# CP922 aix
+# CP932 aix woe32 dos
+# CP943 aix
+# CP949 osf woe32 dos
+# CP950 woe32 dos
+# CP1046 aix
+# CP1124 aix
+# CP1125 dos
+# CP1129 aix
+# CP1250 woe32
+# CP1251 glibc woe32
+# CP1252 aix woe32
+# CP1253 woe32
+# CP1254 woe32
+# CP1255 glibc woe32
+# CP1256 woe32
+# CP1257 woe32
+# GB2312 glibc aix hpux irix solaris freebsd yes
+# EUC-JP glibc aix hpux irix osf solaris freebsd yes
+# EUC-KR glibc aix hpux irix osf solaris freebsd yes
+# EUC-TW glibc aix hpux irix osf solaris
+# BIG5 glibc aix hpux osf solaris freebsd yes
+# BIG5-HKSCS glibc solaris
+# GBK glibc aix osf solaris woe32 dos
+# GB18030 glibc solaris
+# SHIFT_JIS hpux osf solaris freebsd yes
+# JOHAB glibc solaris woe32
+# TIS-620 glibc aix hpux osf solaris
+# VISCII glibc yes
+# TCVN5712-1 glibc
+# GEORGIAN-PS glibc
+# HP-ROMAN8 hpux
+# HP-ARABIC8 hpux
+# HP-GREEK8 hpux
+# HP-HEBREW8 hpux
+# HP-TURKISH8 hpux
+# HP-KANA8 hpux
+# DEC-KANJI osf
+# DEC-HANYU osf
+# UTF-8 glibc aix hpux osf solaris yes
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+ linux* | *-gnu*)
+ # With glibc-2.1 or newer, we don't need any canonicalization,
+ # because glibc has iconv and both glibc and libiconv support all
+ # GNU canonical names directly. Therefore, the Makefile does not
+ # need to install the alias file at all.
+ # The following applies only to glibc-2.0.x and older libcs.
+ echo "ISO_646.IRV:1983 ASCII"
+ ;;
+ aix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "IBM-850 CP850"
+ echo "IBM-856 CP856"
+ echo "IBM-921 ISO-8859-13"
+ echo "IBM-922 CP922"
+ echo "IBM-932 CP932"
+ echo "IBM-943 CP943"
+ echo "IBM-1046 CP1046"
+ echo "IBM-1124 CP1124"
+ echo "IBM-1129 CP1129"
+ echo "IBM-1252 CP1252"
+ echo "IBM-eucCN GB2312"
+ echo "IBM-eucJP EUC-JP"
+ echo "IBM-eucKR EUC-KR"
+ echo "IBM-eucTW EUC-TW"
+ echo "big5 BIG5"
+ echo "GBK GBK"
+ echo "TIS-620 TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ hpux*)
+ echo "iso88591 ISO-8859-1"
+ echo "iso88592 ISO-8859-2"
+ echo "iso88595 ISO-8859-5"
+ echo "iso88596 ISO-8859-6"
+ echo "iso88597 ISO-8859-7"
+ echo "iso88598 ISO-8859-8"
+ echo "iso88599 ISO-8859-9"
+ echo "iso885915 ISO-8859-15"
+ echo "roman8 HP-ROMAN8"
+ echo "arabic8 HP-ARABIC8"
+ echo "greek8 HP-GREEK8"
+ echo "hebrew8 HP-HEBREW8"
+ echo "turkish8 HP-TURKISH8"
+ echo "kana8 HP-KANA8"
+ echo "tis620 TIS-620"
+ echo "big5 BIG5"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "hp15CN GB2312"
+ #echo "ccdc ?" # what is this?
+ echo "SJIS SHIFT_JIS"
+ echo "utf8 UTF-8"
+ ;;
+ irix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ ;;
+ osf*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "cp850 CP850"
+ echo "big5 BIG5"
+ echo "dechanyu DEC-HANYU"
+ echo "dechanzi GB2312"
+ echo "deckanji DEC-KANJI"
+ echo "deckorean EUC-KR"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "GBK GBK"
+ echo "KSC5601 CP949"
+ echo "sdeckanji EUC-JP"
+ echo "SJIS SHIFT_JIS"
+ echo "TACTIS TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ solaris*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "koi8-r KOI8-R"
+ echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
+ echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "cns11643 EUC-TW"
+ echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
+ echo "eucJP EUC-JP"
+ echo "PCK SHIFT_JIS"
+ echo "TIS620.2533 TIS-620"
+ #echo "sun_eu_greek ?" # what is this?
+ echo "UTF-8 UTF-8"
+ ;;
+ freebsd* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ echo "$l.ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+ echo "$l.ISO_8859-1 ISO-8859-1"
+ echo "$l.DIS_8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+ echo "$l.ISO_8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO_8859-4 ISO-8859-4"
+ done
+ for l in ru_RU ru_SU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO_8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ja_JP.Shift_JIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ netbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "BIG5 BIG5"
+ echo "SJIS SHIFT_JIS"
+ ;;
+ beos*)
+ # BeOS has a single locale, and it has UTF-8 encoding.
+ echo "* UTF-8"
+ ;;
+ msdosdjgpp*)
+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "#"
+ echo "# The encodings given here may not all be correct."
+ echo "# If you find that the encoding given for your language and"
+ echo "# country is not the one your DOS machine actually uses, just"
+ echo "# correct it in this file, and send a mail to"
+ echo "# Juan Manuel Guerrero <st001906 at hrz1.hrz.tu-darmstadt.de>"
+ echo "# and Bruno Haible <bruno at clisp.org>."
+ echo "#"
+ echo "C ASCII"
+ # ISO-8859-1 languages
+ echo "ca CP850"
+ echo "ca_ES CP850"
+ echo "da CP865" # not CP850 ??
+ echo "da_DK CP865" # not CP850 ??
+ echo "de CP850"
+ echo "de_AT CP850"
+ echo "de_CH CP850"
+ echo "de_DE CP850"
+ echo "en CP850"
+ echo "en_AU CP850" # not CP437 ??
+ echo "en_CA CP850"
+ echo "en_GB CP850"
+ echo "en_NZ CP437"
+ echo "en_US CP437"
+ echo "en_ZA CP850" # not CP437 ??
+ echo "es CP850"
+ echo "es_AR CP850"
+ echo "es_BO CP850"
+ echo "es_CL CP850"
+ echo "es_CO CP850"
+ echo "es_CR CP850"
+ echo "es_CU CP850"
+ echo "es_DO CP850"
+ echo "es_EC CP850"
+ echo "es_ES CP850"
+ echo "es_GT CP850"
+ echo "es_HN CP850"
+ echo "es_MX CP850"
+ echo "es_NI CP850"
+ echo "es_PA CP850"
+ echo "es_PY CP850"
+ echo "es_PE CP850"
+ echo "es_SV CP850"
+ echo "es_UY CP850"
+ echo "es_VE CP850"
+ echo "et CP850"
+ echo "et_EE CP850"
+ echo "eu CP850"
+ echo "eu_ES CP850"
+ echo "fi CP850"
+ echo "fi_FI CP850"
+ echo "fr CP850"
+ echo "fr_BE CP850"
+ echo "fr_CA CP850"
+ echo "fr_CH CP850"
+ echo "fr_FR CP850"
+ echo "ga CP850"
+ echo "ga_IE CP850"
+ echo "gd CP850"
+ echo "gd_GB CP850"
+ echo "gl CP850"
+ echo "gl_ES CP850"
+ echo "id CP850" # not CP437 ??
+ echo "id_ID CP850" # not CP437 ??
+ echo "is CP861" # not CP850 ??
+ echo "is_IS CP861" # not CP850 ??
+ echo "it CP850"
+ echo "it_CH CP850"
+ echo "it_IT CP850"
+ echo "lt CP775"
+ echo "lt_LT CP775"
+ echo "lv CP775"
+ echo "lv_LV CP775"
+ echo "nb CP865" # not CP850 ??
+ echo "nb_NO CP865" # not CP850 ??
+ echo "nl CP850"
+ echo "nl_BE CP850"
+ echo "nl_NL CP850"
+ echo "nn CP865" # not CP850 ??
+ echo "nn_NO CP865" # not CP850 ??
+ echo "no CP865" # not CP850 ??
+ echo "no_NO CP865" # not CP850 ??
+ echo "pt CP850"
+ echo "pt_BR CP850"
+ echo "pt_PT CP850"
+ echo "sv CP850"
+ echo "sv_SE CP850"
+ # ISO-8859-2 languages
+ echo "cs CP852"
+ echo "cs_CZ CP852"
+ echo "hr CP852"
+ echo "hr_HR CP852"
+ echo "hu CP852"
+ echo "hu_HU CP852"
+ echo "pl CP852"
+ echo "pl_PL CP852"
+ echo "ro CP852"
+ echo "ro_RO CP852"
+ echo "sk CP852"
+ echo "sk_SK CP852"
+ echo "sl CP852"
+ echo "sl_SI CP852"
+ echo "sq CP852"
+ echo "sq_AL CP852"
+ echo "sr CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+ # ISO-8859-3 languages
+ echo "mt CP850"
+ echo "mt_MT CP850"
+ # ISO-8859-5 languages
+ echo "be CP866"
+ echo "be_BE CP866"
+ echo "bg CP866" # not CP855 ??
+ echo "bg_BG CP866" # not CP855 ??
+ echo "mk CP866" # not CP855 ??
+ echo "mk_MK CP866" # not CP855 ??
+ echo "ru CP866"
+ echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
+ # ISO-8859-6 languages
+ echo "ar CP864"
+ echo "ar_AE CP864"
+ echo "ar_DZ CP864"
+ echo "ar_EG CP864"
+ echo "ar_IQ CP864"
+ echo "ar_IR CP864"
+ echo "ar_JO CP864"
+ echo "ar_KW CP864"
+ echo "ar_MA CP864"
+ echo "ar_OM CP864"
+ echo "ar_QA CP864"
+ echo "ar_SA CP864"
+ echo "ar_SY CP864"
+ # ISO-8859-7 languages
+ echo "el CP869"
+ echo "el_GR CP869"
+ # ISO-8859-8 languages
+ echo "he CP862"
+ echo "he_IL CP862"
+ # ISO-8859-9 languages
+ echo "tr CP857"
+ echo "tr_TR CP857"
+ # Japanese
+ echo "ja CP932"
+ echo "ja_JP CP932"
+ # Chinese
+ echo "zh_CN GBK"
+ echo "zh_TW CP950" # not CP938 ??
+ # Korean
+ echo "kr CP949" # not CP934 ??
+ echo "kr_KR CP949" # not CP934 ??
+ # Thai
+ echo "th CP874"
+ echo "th_TH CP874"
+ # Other
+ echo "eo CP850"
+ echo "eo_EO CP850"
+ ;;
+esac
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcgettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcgettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,59 @@
+/* Implementation of the dcgettext(3) function.
+ Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCGETTEXT (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+INTDEF(__dcgettext)
+weak_alias (__dcgettext, dcgettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcigettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcigettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1206 @@
+/* Implementation of the internal dcigettext function.
+ Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include <locale.h>
+
+#ifdef _LIBC
+ /* Guess whether integer division by zero raises signal SIGFPE.
+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
+# if defined __alpha__ || defined __arm__ || defined __i386__ \
+ || defined __m68k__ || defined __s390__
+# define INTDIV0_RAISES_SIGFPE 1
+# else
+# define INTDIV0_RAISES_SIGFPE 0
+# endif
+#endif
+#if !INTDIV0_RAISES_SIGFPE
+# include <signal.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettextP.h"
+#include "plural-exp.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness. */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* Alignment of types. */
+#if defined __GNUC__ && __GNUC__ >= 2
+# define alignof(TYPE) __alignof__ (TYPE)
+#else
+# define alignof(TYPE) \
+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define getcwd __getcwd
+# ifndef stpcpy
+# define stpcpy __stpcpy
+# endif
+# define tfind __tfind
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+# define getcwd(buf, max) getwd (buf)
+# else
+char *getcwd ();
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+# ifndef HAVE_MEMPCPY
+static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try. */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h. */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+ PATH_MAX but might cause redefinition warnings when sys/param.h is
+ later included (as on MORE/BSD 4.3). */
+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+#endif
+
+/* This is the type used for the search tree where known translations
+ are stored. */
+struct known_translation_t
+{
+ /* Domain in which to search. */
+ char *domainname;
+
+ /* The category. */
+ int category;
+
+ /* State of the catalog counter at the point the string was found. */
+ int counter;
+
+ /* Catalog where the string was found. */
+ struct loaded_l10nfile *domain;
+
+ /* And finally the translation. */
+ const char *translation;
+ size_t translation_length;
+
+ /* Pointer to the string in question. */
+ char msgid[ZERO];
+};
+
+/* Root of the search tree with known translations. We can use this
+ only if the system provides the `tsearch' function family. */
+#if defined HAVE_TSEARCH || defined _LIBC
+# include <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+# define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations. */
+static int transcmp PARAMS ((const void *p1, const void *p2));
+static int
+transcmp (p1, p2)
+ const void *p1;
+ const void *p2;
+{
+ const struct known_translation_t *s1;
+ const struct known_translation_t *s2;
+ int result;
+
+ s1 = (const struct known_translation_t *) p1;
+ s2 = (const struct known_translation_t *) p2;
+
+ result = strcmp (s1->msgid, s2->msgid);
+ if (result == 0)
+ {
+ result = strcmp (s1->domainname, s2->domainname);
+ if (result == 0)
+ /* We compare the category last (though this is the cheapest
+ operation) since it is hopefully always the same (namely
+ LC_MESSAGES). */
+ result = s1->category - s2->category;
+ }
+
+ return result;
+}
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+ textdomain(3). The default value for this is "messages". */
+const char _nl_default_default_domain[] attribute_hidden = "messages";
+
+/* Value used as the default domain for gettext(3). */
+const char *_nl_current_default_domain attribute_hidden
+ = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs. */
+#if defined __EMX__
+extern const char _nl_default_dirname[];
+#else
+const char _nl_default_dirname[] = LOCALEDIR;
+#endif
+
+/* List with bindings of specific domains created by bindtextdomain()
+ calls. */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions. */
+static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
+ unsigned long int n,
+ const char *translation,
+ size_t translation_len))
+ internal_function;
+static const char *category_to_name PARAMS ((int category)) internal_function;
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname))
+ internal_function;
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define freea(p) /* nothing */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old->address); \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+# define freea(p) free (p)
+#endif /* have alloca */
+
+
+#ifdef _LIBC
+/* List of blocks allocated for translations. */
+typedef struct transmem_list
+{
+ struct transmem_list *next;
+ char data[ZERO];
+} transmem_block_t;
+static struct transmem_list *transmem_list;
+#else
+typedef unsigned char transmem_block_t;
+#endif
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCIGETTEXT __dcigettext
+#else
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+#ifdef _LIBC
+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
+#endif
+
+/* Checking whether the binaries runs SUID must be done and glibc provides
+ easier methods therefore we make a difference here. */
+#ifdef _LIBC
+# define ENABLE_SECURE __libc_enable_secure
+# define DETERMINE_SECURE
+#else
+# ifndef HAVE_GETUID
+# define getuid() 0
+# endif
+# ifndef HAVE_GETGID
+# define getgid() 0
+# endif
+# ifndef HAVE_GETEUID
+# define geteuid() getuid()
+# endif
+# ifndef HAVE_GETEGID
+# define getegid() getgid()
+# endif
+static int enable_secure;
+# define ENABLE_SECURE (enable_secure == 1)
+# define DETERMINE_SECURE \
+ if (enable_secure == 0) \
+ { \
+ if (getuid () != geteuid () || getgid () != getegid ()) \
+ enable_secure = 1; \
+ else \
+ enable_secure = -1; \
+ }
+#endif
+
+/* Get the function to evaluate the plural expression. */
+#include "eval-plural.h"
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ CATEGORY locale and, if PLURAL is nonzero, search over string
+ depending on the plural form determined by N. */
+char *
+DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ int plural;
+ unsigned long int n;
+ int category;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ struct loaded_l10nfile *domain;
+ struct binding *binding;
+ const char *categoryname;
+ const char *categoryvalue;
+ char *dirname, *xdomainname;
+ char *single_locale;
+ char *retval;
+ size_t retlen;
+ int saved_errno;
+#if defined HAVE_TSEARCH || defined _LIBC
+ struct known_translation_t *search;
+ struct known_translation_t **foundp = NULL;
+ size_t msgid_len;
+#endif
+ size_t domainname_len;
+
+ /* If no real MSGID is given return NULL. */
+ if (msgid1 == NULL)
+ return NULL;
+
+ __libc_rwlock_rdlock (_nl_state_lock);
+
+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
+ CATEGORY is not LC_MESSAGES this might not make much sense but the
+ definition left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
+ /* OS/2 specific: backward compatibility with older libintl versions */
+#ifdef LC_MESSAGES_COMPAT
+ if (category == LC_MESSAGES_COMPAT)
+ category = LC_MESSAGES;
+#endif
+
+#if defined HAVE_TSEARCH || defined _LIBC
+ msgid_len = strlen (msgid1) + 1;
+
+ /* Try to find the translation among those which we found at
+ some time. */
+ search = (struct known_translation_t *)
+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
+ memcpy (search->msgid, msgid1, msgid_len);
+ search->domainname = (char *) domainname;
+ search->category = category;
+
+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+ freea (search);
+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+ {
+ /* Now deal with plural. */
+ if (plural)
+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
+ (*foundp)->translation_length);
+ else
+ retval = (char *) (*foundp)->translation;
+
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+#endif
+
+ /* Preserve the `errno' value. */
+ saved_errno = errno;
+
+ /* See whether this is a SUID binary or not. */
+ DETERMINE_SECURE;
+
+ /* First find matching binding. */
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding == NULL)
+ dirname = (char *) _nl_default_dirname;
+ else if (IS_ABSOLUTE_PATH (binding->dirname))
+ dirname = binding->dirname;
+ else
+ {
+ /* We have a relative path. Make it absolute now. */
+ size_t dirname_len = strlen (binding->dirname) + 1;
+ size_t path_max;
+ char *ret;
+
+ path_max = (unsigned int) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ for (;;)
+ {
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+
+ __set_errno (0);
+ ret = getcwd (dirname, path_max);
+ if (ret != NULL || errno != ERANGE)
+ break;
+
+ path_max += path_max / 2;
+ path_max += PATH_INCR;
+ }
+
+ if (ret == NULL)
+ {
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ FREE_BLOCKS (block_list);
+ __libc_rwlock_unlock (_nl_state_lock);
+ __set_errno (saved_errno);
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+ }
+
+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+ }
+
+ /* Now determine the symbolic name of CATEGORY and its value. */
+ categoryname = category_to_name (category);
+ categoryvalue = guess_category_value (category, categoryname);
+
+ domainname_len = strlen (domainname);
+ xdomainname = (char *) alloca (strlen (categoryname)
+ + domainname_len + 5);
+ ADD_BLOCK (block_list, xdomainname);
+
+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ domainname, domainname_len),
+ ".mo");
+
+ /* Creating working area. */
+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+ ADD_BLOCK (block_list, single_locale);
+
+
+ /* Search for the given string. This is a loop because we perhaps
+ got an ordered list of languages to consider for the translation. */
+ while (1)
+ {
+ /* Make CATEGORYVALUE point to the next element of the list. */
+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+ ++categoryvalue;
+ if (categoryvalue[0] == '\0')
+ {
+ /* The whole contents of CATEGORYVALUE has been searched but
+ no valid entry has been found. We solve this situation
+ by implicitly appending a "C" entry, i.e. no translation
+ will take place. */
+ single_locale[0] = 'C';
+ single_locale[1] = '\0';
+ }
+ else
+ {
+ char *cp = single_locale;
+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+ *cp++ = *categoryvalue++;
+ *cp = '\0';
+
+ /* When this is a SUID binary we must not allow accessing files
+ outside the dedicated directories. */
+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
+ /* Ingore this entry. */
+ continue;
+ }
+
+ /* If the current locale value is C (or POSIX) we don't load a
+ domain. Return the MSGID. */
+ if (strcmp (single_locale, "C") == 0
+ || strcmp (single_locale, "POSIX") == 0)
+ {
+ FREE_BLOCKS (block_list);
+ __libc_rwlock_unlock (_nl_state_lock);
+ __set_errno (saved_errno);
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+ }
+
+
+ /* Find structure describing the message catalog matching the
+ DOMAINNAME and CATEGORY. */
+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
+
+ if (domain != NULL)
+ {
+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
+
+ if (retval == NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+ {
+ retval = _nl_find_msg (domain->successor[cnt], binding,
+ msgid1, &retlen);
+
+ if (retval != NULL)
+ {
+ domain = domain->successor[cnt];
+ break;
+ }
+ }
+ }
+
+ if (retval != NULL)
+ {
+ /* Found the translation of MSGID1 in domain DOMAIN:
+ starting at RETVAL, RETLEN bytes. */
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+#if defined HAVE_TSEARCH || defined _LIBC
+ if (foundp == NULL)
+ {
+ /* Create a new entry and add it to the search tree. */
+ struct known_translation_t *newp;
+
+ newp = (struct known_translation_t *)
+ malloc (offsetof (struct known_translation_t, msgid)
+ + msgid_len + domainname_len + 1);
+ if (newp != NULL)
+ {
+ newp->domainname =
+ mempcpy (newp->msgid, msgid1, msgid_len);
+ memcpy (newp->domainname, domainname, domainname_len + 1);
+ newp->category = category;
+ newp->counter = _nl_msg_cat_cntr;
+ newp->domain = domain;
+ newp->translation = retval;
+ newp->translation_length = retlen;
+
+ /* Insert the entry in the search tree. */
+ foundp = (struct known_translation_t **)
+ tsearch (newp, &root, transcmp);
+ if (foundp == NULL
+ || __builtin_expect (*foundp != newp, 0))
+ /* The insert failed. */
+ free (newp);
+ }
+ }
+ else
+ {
+ /* We can update the existing entry. */
+ (*foundp)->counter = _nl_msg_cat_cntr;
+ (*foundp)->domain = domain;
+ (*foundp)->translation = retval;
+ (*foundp)->translation_length = retlen;
+ }
+#endif
+ /* Now deal with plural. */
+ if (plural)
+ retval = plural_lookup (domain, n, retval, retlen);
+
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+ }
+ }
+ /* NOTREACHED */
+}
+
+
+char *
+internal_function
+_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
+ struct loaded_l10nfile *domain_file;
+ struct binding *domainbinding;
+ const char *msgid;
+ size_t *lengthp;
+{
+ struct loaded_domain *domain;
+ nls_uint32 nstrings;
+ size_t act;
+ char *result;
+ size_t resultlen;
+
+ if (domain_file->decided == 0)
+ _nl_load_domain (domain_file, domainbinding);
+
+ if (domain_file->data == NULL)
+ return NULL;
+
+ domain = (struct loaded_domain *) domain_file->data;
+
+ nstrings = domain->nstrings;
+
+ /* Locate the MSGID and its translation. */
+ if (domain->hash_tab != NULL)
+ {
+ /* Use the hashing table. */
+ nls_uint32 len = strlen (msgid);
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+ while (1)
+ {
+ nls_uint32 nstr =
+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
+
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ nstr--;
+
+ /* Compare msgid with the original string at index nstr.
+ We compare the lengths with >=, not ==, because plural entries
+ are represented by strings with an embedded NUL. */
+ if (nstr < nstrings
+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
+ && (strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr].offset))
+ == 0)
+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
+ && (strcmp (msgid,
+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
+ == 0))
+ {
+ act = nstr;
+ goto found;
+ }
+
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+ }
+ /* NOTREACHED */
+ }
+ else
+ {
+ /* Try the default method: binary search in the sorted array of
+ messages. */
+ size_t top, bottom;
+
+ bottom = 0;
+ top = nstrings;
+ while (bottom < top)
+ {
+ int cmp_val;
+
+ act = (bottom + top) / 2;
+ cmp_val = strcmp (msgid, (domain->data
+ + W (domain->must_swap,
+ domain->orig_tab[act].offset)));
+ if (cmp_val < 0)
+ top = act;
+ else if (cmp_val > 0)
+ bottom = act + 1;
+ else
+ goto found;
+ }
+ /* No translation was found. */
+ return NULL;
+ }
+
+ found:
+ /* The translation was found at index ACT. If we have to convert the
+ string to use a different character set, this is the time. */
+ if (act < nstrings)
+ {
+ result = (char *)
+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
+ }
+ else
+ {
+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
+ }
+
+#if defined _LIBC || HAVE_ICONV
+ if (domain->codeset_cntr
+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
+ {
+ /* The domain's codeset has changed through bind_textdomain_codeset()
+ since the message catalog was initialized or last accessed. We
+ have to reinitialize the converter. */
+ _nl_free_domain_conv (domain);
+ _nl_init_domain_conv (domain_file, domain, domainbinding);
+ }
+
+ if (
+# ifdef _LIBC
+ domain->conv != (__gconv_t) -1
+# else
+# if HAVE_ICONV
+ domain->conv != (iconv_t) -1
+# endif
+# endif
+ )
+ {
+ /* We are supposed to do a conversion. First allocate an
+ appropriate table with the same structure as the table
+ of translations in the file, where we can put the pointers
+ to the converted strings in.
+ There is a slight complication with plural entries. They
+ are represented by consecutive NUL terminated strings. We
+ handle this case by converting RESULTLEN bytes, including
+ NULs. */
+
+ if (domain->conv_tab == NULL
+ && ((domain->conv_tab =
+ (char **) calloc (nstrings + domain->n_sysdep_strings,
+ sizeof (char *)))
+ == NULL))
+ /* Mark that we didn't succeed allocating a table. */
+ domain->conv_tab = (char **) -1;
+
+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
+ /* Nothing we can do, no more memory. */
+ goto converted;
+
+ if (domain->conv_tab[act] == NULL)
+ {
+ /* We haven't used this string so far, so it is not
+ translated yet. Do this now. */
+ /* We use a bit more efficient memory handling.
+ We allocate always larger blocks which get used over
+ time. This is faster than many small allocations. */
+ __libc_lock_define_initialized (static, lock)
+# define INITIAL_BLOCK_SIZE 4080
+ static unsigned char *freemem;
+ static size_t freemem_size;
+
+ const unsigned char *inbuf;
+ unsigned char *outbuf;
+ int malloc_count;
+# ifndef _LIBC
+ transmem_block_t *transmem_list = NULL;
+# endif
+
+ __libc_lock_lock (lock);
+
+ inbuf = (const unsigned char *) result;
+ outbuf = freemem + sizeof (size_t);
+
+ malloc_count = 0;
+ while (1)
+ {
+ transmem_block_t *newmem;
+# ifdef _LIBC
+ size_t non_reversible;
+ int res;
+
+ if (freemem_size < sizeof (size_t))
+ goto resize_freemem;
+
+ res = __gconv (domain->conv,
+ &inbuf, inbuf + resultlen,
+ &outbuf,
+ outbuf + freemem_size - sizeof (size_t),
+ &non_reversible);
+
+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
+ break;
+
+ if (res != __GCONV_FULL_OUTPUT)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+ inbuf = result;
+# else
+# if HAVE_ICONV
+ const char *inptr = (const char *) inbuf;
+ size_t inleft = resultlen;
+ char *outptr = (char *) outbuf;
+ size_t outleft;
+
+ if (freemem_size < sizeof (size_t))
+ goto resize_freemem;
+
+ outleft = freemem_size - sizeof (size_t);
+ if (iconv (domain->conv,
+ (ICONV_CONST char **) &inptr, &inleft,
+ &outptr, &outleft)
+ != (size_t) (-1))
+ {
+ outbuf = (unsigned char *) outptr;
+ break;
+ }
+ if (errno != E2BIG)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+# endif
+# endif
+
+ resize_freemem:
+ /* We must allocate a new buffer or resize the old one. */
+ if (malloc_count > 0)
+ {
+ ++malloc_count;
+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
+ newmem = (transmem_block_t *) realloc (transmem_list,
+ freemem_size);
+# ifdef _LIBC
+ if (newmem != NULL)
+ transmem_list = transmem_list->next;
+ else
+ {
+ struct transmem_list *old = transmem_list;
+
+ transmem_list = transmem_list->next;
+ free (old);
+ }
+# endif
+ }
+ else
+ {
+ malloc_count = 1;
+ freemem_size = INITIAL_BLOCK_SIZE;
+ newmem = (transmem_block_t *) malloc (freemem_size);
+ }
+ if (__builtin_expect (newmem == NULL, 0))
+ {
+ freemem = NULL;
+ freemem_size = 0;
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+# ifdef _LIBC
+ /* Add the block to the list of blocks we have to free
+ at some point. */
+ newmem->next = transmem_list;
+ transmem_list = newmem;
+
+ freemem = newmem->data;
+ freemem_size -= offsetof (struct transmem_list, data);
+# else
+ transmem_list = newmem;
+ freemem = newmem;
+# endif
+
+ outbuf = freemem + sizeof (size_t);
+ }
+
+ /* We have now in our buffer a converted string. Put this
+ into the table of conversions. */
+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
+ domain->conv_tab[act] = (char *) freemem;
+ /* Shrink freemem, but keep it aligned. */
+ freemem_size -= outbuf - freemem;
+ freemem = outbuf;
+ freemem += freemem_size & (alignof (size_t) - 1);
+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
+
+ __libc_lock_unlock (lock);
+ }
+
+ /* Now domain->conv_tab[act] contains the translation of all
+ the plural variants. */
+ result = domain->conv_tab[act] + sizeof (size_t);
+ resultlen = *(size_t *) domain->conv_tab[act];
+ }
+
+ converted:
+ /* The result string is converted. */
+
+#endif /* _LIBC || HAVE_ICONV */
+
+ *lengthp = resultlen;
+ return result;
+}
+
+
+/* Look up a plural variant. */
+static char *
+internal_function
+plural_lookup (domain, n, translation, translation_len)
+ struct loaded_l10nfile *domain;
+ unsigned long int n;
+ const char *translation;
+ size_t translation_len;
+{
+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
+ unsigned long int index;
+ const char *p;
+
+ index = plural_eval (domaindata->plural, n);
+ if (index >= domaindata->nplurals)
+ /* This should never happen. It means the plural expression and the
+ given maximum value do not match. */
+ index = 0;
+
+ /* Skip INDEX strings at TRANSLATION. */
+ p = translation;
+ while (index-- > 0)
+ {
+#ifdef _LIBC
+ p = __rawmemchr (p, '\0');
+#else
+ p = strchr (p, '\0');
+#endif
+ /* And skip over the NUL byte. */
+ p++;
+
+ if (p >= translation + translation_len)
+ /* This should never happen. It means the plural expression
+ evaluated to a value larger than the number of variants
+ available for MSGID1. */
+ return (char *) translation;
+ }
+ return (char *) p;
+}
+
+
+/* Return string representation of locale CATEGORY. */
+static const char *
+internal_function
+category_to_name (category)
+ int category;
+{
+ const char *retval;
+
+ switch (category)
+ {
+#ifdef LC_COLLATE
+ case LC_COLLATE:
+ retval = "LC_COLLATE";
+ break;
+#endif
+#ifdef LC_CTYPE
+ case LC_CTYPE:
+ retval = "LC_CTYPE";
+ break;
+#endif
+#ifdef LC_MONETARY
+ case LC_MONETARY:
+ retval = "LC_MONETARY";
+ break;
+#endif
+#ifdef LC_NUMERIC
+ case LC_NUMERIC:
+ retval = "LC_NUMERIC";
+ break;
+#endif
+#ifdef LC_TIME
+ case LC_TIME:
+ retval = "LC_TIME";
+ break;
+#endif
+#ifdef LC_MESSAGES
+ case LC_MESSAGES:
+ retval = "LC_MESSAGES";
+ break;
+#endif
+#ifdef LC_RESPONSE
+ case LC_RESPONSE:
+ retval = "LC_RESPONSE";
+ break;
+#endif
+#ifdef LC_ALL
+ case LC_ALL:
+ /* This might not make sense but is perhaps better than any other
+ value. */
+ retval = "LC_ALL";
+ break;
+#endif
+ default:
+ /* If you have a better idea for a default value let me know. */
+ retval = "LC_XXX";
+ }
+
+ return retval;
+}
+
+/* Guess value of current locale from value of the environment variables. */
+static const char *
+internal_function
+guess_category_value (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *language;
+ const char *retval;
+
+ /* The highest priority value is the `LANGUAGE' environment
+ variable. But we don't use the value if the currently selected
+ locale is the C locale. This is a GNU extension. */
+ language = getenv ("LANGUAGE");
+ if (language != NULL && language[0] == '\0')
+ language = NULL;
+
+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+ `LC_xxx', and `LANG'. On some systems this can be done by the
+ `setlocale' function itself. */
+#ifdef _LIBC
+ retval = setlocale (category, NULL);
+#else
+ retval = _nl_locale_name (category, categoryname);
+#endif
+
+ /* Ignore LANGUAGE if the locale is set to "C" because
+ 1. "C" locale usually uses the ASCII encoding, and most international
+ messages use non-ASCII characters. These characters get displayed
+ as question marks (if using glibc's iconv()) or as invalid 8-bit
+ characters (because other iconv()s refuse to convert most non-ASCII
+ characters to ASCII). In any case, the output is ugly.
+ 2. The precise output of some programs in the "C" locale is specified
+ by POSIX and should not depend on environment variables like
+ "LANGUAGE". We allow such programs to use gettext(). */
+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
+
+#if !_LIBC && !HAVE_MEMPCPY
+static void *
+mempcpy (dest, src, n)
+ void *dest;
+ const void *src;
+ size_t n;
+{
+ return (void *) ((char *) memcpy (dest, src, n) + n);
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+ program's end. */
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ void *old;
+
+ while (_nl_domain_bindings != NULL)
+ {
+ struct binding *oldp = _nl_domain_bindings;
+ _nl_domain_bindings = _nl_domain_bindings->next;
+ if (oldp->dirname != _nl_default_dirname)
+ /* Yes, this is a pointer comparison. */
+ free (oldp->dirname);
+ free (oldp->codeset);
+ free (oldp);
+ }
+
+ if (_nl_current_default_domain != _nl_default_default_domain)
+ /* Yes, again a pointer comparison. */
+ free ((char *) _nl_current_default_domain);
+
+ /* Remove the search tree with the known translations. */
+ __tdestroy (root, free);
+ root = NULL;
+
+ while (transmem_list != NULL)
+ {
+ old = transmem_list;
+ transmem_list = transmem_list->next;
+ free (old);
+ }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcngettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dcngettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,61 @@
+/* Implementation of the dcngettext(3) function.
+ Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCNGETTEXT __dcngettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCNGETTEXT (domainname, msgid1, msgid2, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+INTDEF(__dcngettext)
+weak_alias (__dcngettext, dcngettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dgettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dgettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,59 @@
+/* Implementation of the dgettext(3) function.
+ Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale. */
+char *
+DGETTEXT (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dgettext, dgettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dngettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/dngettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,61 @@
+/* Implementation of the dngettext(3) function.
+ Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DNGETTEXT __dngettext
+# define DCNGETTEXT INTUSE(__dcngettext)
+#else
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale and skip message according to the plural form. */
+char *
+DNGETTEXT (domainname, msgid1, msgid2, n)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dngettext, dngettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/eval-plural.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/eval-plural.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,114 @@
+/* Plural expression evaluation.
+ Copyright (C) 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef STATIC
+#define STATIC static
+#endif
+
+/* Evaluate the plural expression and return an index value. */
+STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp,
+ unsigned long int n))
+ internal_function;
+
+STATIC
+unsigned long int
+internal_function
+plural_eval (pexp, n)
+ struct expression *pexp;
+ unsigned long int n;
+{
+ switch (pexp->nargs)
+ {
+ case 0:
+ switch (pexp->operation)
+ {
+ case var:
+ return n;
+ case num:
+ return pexp->val.num;
+ default:
+ break;
+ }
+ /* NOTREACHED */
+ break;
+ case 1:
+ {
+ /* pexp->operation must be lnot. */
+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
+ return ! arg;
+ }
+ case 2:
+ {
+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
+ if (pexp->operation == lor)
+ return leftarg || plural_eval (pexp->val.args[1], n);
+ else if (pexp->operation == land)
+ return leftarg && plural_eval (pexp->val.args[1], n);
+ else
+ {
+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
+
+ switch (pexp->operation)
+ {
+ case mult:
+ return leftarg * rightarg;
+ case divide:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
+ return leftarg / rightarg;
+ case module:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
+ return leftarg % rightarg;
+ case plus:
+ return leftarg + rightarg;
+ case minus:
+ return leftarg - rightarg;
+ case less_than:
+ return leftarg < rightarg;
+ case greater_than:
+ return leftarg > rightarg;
+ case less_or_equal:
+ return leftarg <= rightarg;
+ case greater_or_equal:
+ return leftarg >= rightarg;
+ case equal:
+ return leftarg == rightarg;
+ case not_equal:
+ return leftarg != rightarg;
+ default:
+ break;
+ }
+ }
+ /* NOTREACHED */
+ break;
+ }
+ case 3:
+ {
+ /* pexp->operation must be qmop. */
+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
+ }
+ }
+ /* NOTREACHED */
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/explodename.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/explodename.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,192 @@
+/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (name)
+ const char *name;
+{
+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+ && name[0] != '+' && name[0] != ',')
+ ++name;
+
+ return (char *) name;
+}
+
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+ normalized_codeset, special, sponsor, revision)
+ char *name;
+ const char **language;
+ const char **modifier;
+ const char **territory;
+ const char **codeset;
+ const char **normalized_codeset;
+ const char **special;
+ const char **sponsor;
+ const char **revision;
+{
+ enum { undecided, xpg, cen } syntax;
+ char *cp;
+ int mask;
+
+ *modifier = NULL;
+ *territory = NULL;
+ *codeset = NULL;
+ *normalized_codeset = NULL;
+ *special = NULL;
+ *sponsor = NULL;
+ *revision = NULL;
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = 0;
+ syntax = undecided;
+ *language = cp = name;
+ cp = _nl_find_language (*language);
+
+ if (*language == cp)
+ /* This does not make sense: language has to be specified. Use
+ this entry as it is without exploding. Perhaps it is an alias. */
+ cp = strchr (*language, '\0');
+ else if (cp[0] == '_')
+ {
+ /* Next is the territory. */
+ cp[0] = '\0';
+ *territory = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= TERRITORY;
+
+ if (cp[0] == '.')
+ {
+ /* Next is the codeset. */
+ syntax = xpg;
+ cp[0] = '\0';
+ *codeset = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '@')
+ ++cp;
+
+ mask |= XPG_CODESET;
+
+ if (*codeset != cp && (*codeset)[0] != '\0')
+ {
+ *normalized_codeset = _nl_normalize_codeset (*codeset,
+ cp - *codeset);
+ if (strcmp (*codeset, *normalized_codeset) == 0)
+ free ((char *) *normalized_codeset);
+ else
+ mask |= XPG_NORM_CODESET;
+ }
+ }
+ }
+
+ if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+ {
+ /* Next is the modifier. */
+ syntax = cp[0] == '@' ? xpg : cen;
+ cp[0] = '\0';
+ *modifier = ++cp;
+
+ while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+ && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= XPG_MODIFIER | CEN_AUDIENCE;
+ }
+
+ if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+ {
+ syntax = cen;
+
+ if (cp[0] == '+')
+ {
+ /* Next is special application (CEN syntax). */
+ cp[0] = '\0';
+ *special = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPECIAL;
+ }
+
+ if (cp[0] == ',')
+ {
+ /* Next is sponsor (CEN syntax). */
+ cp[0] = '\0';
+ *sponsor = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPONSOR;
+ }
+
+ if (cp[0] == '_')
+ {
+ /* Next is revision (CEN syntax). */
+ cp[0] = '\0';
+ *revision = ++cp;
+
+ mask |= CEN_REVISION;
+ }
+ }
+
+ /* For CEN syntax values it might be important to have the
+ separator character in the file name, not for XPG syntax. */
+ if (syntax == xpg)
+ {
+ if (*territory != NULL && (*territory)[0] == '\0')
+ mask &= ~TERRITORY;
+
+ if (*codeset != NULL && (*codeset)[0] == '\0')
+ mask &= ~XPG_CODESET;
+
+ if (*modifier != NULL && (*modifier)[0] == '\0')
+ mask &= ~XPG_MODIFIER;
+ }
+
+ return mask;
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/finddomain.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/finddomain.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,198 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at gnu.org>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains. */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+ the DOMAINNAME and CATEGORY parameters with respect to the currently
+ established bindings. */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (dirname, locale, domainname, domainbinding)
+ const char *dirname;
+ char *locale;
+ const char *domainname;
+ struct binding *domainbinding;
+{
+ struct loaded_l10nfile *retval;
+ const char *language;
+ const char *modifier;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *alias_value;
+ int mask;
+
+ /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+ language[_territory[.codeset]][@modifier]
+
+ and six parts for the CEN syntax:
+
+ language[_territory][+audience][+special][,[sponsor][_revision]]
+
+ Beside the first part all of them are allowed to be missing. If
+ the full specified locale is not found, the less specific one are
+ looked for. The various parts will be stripped off according to
+ the following order:
+ (1) revision
+ (2) sponsor
+ (3) special
+ (4) codeset
+ (5) normalized codeset
+ (6) territory
+ (7) audience/modifier
+ */
+
+ /* If we have already tested for this locale entry there has to
+ be one data set in the list of loaded domains. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, 0, locale, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, domainname, 0);
+ if (retval != NULL)
+ {
+ /* We know something about this locale. */
+ int cnt;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval, domainbinding);
+
+ if (retval->data != NULL)
+ return retval;
+
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt], domainbinding);
+
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ return cnt >= 0 ? retval : NULL;
+ /* NOTREACHED */
+ }
+
+ /* See whether the locale value is an alias. If yes its value
+ *overwrites* the alias name. No test for the original value is
+ done. */
+ alias_value = _nl_expand_alias (locale);
+ if (alias_value != NULL)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ locale = strdup (alias_value);
+ if (locale == NULL)
+ return NULL;
+#else
+ size_t len = strlen (alias_value) + 1;
+ locale = (char *) malloc (len);
+ if (locale == NULL)
+ return NULL;
+
+ memcpy (locale, alias_value, len);
+#endif
+ }
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = _nl_explode_name (locale, &language, &modifier, &territory,
+ &codeset, &normalized_codeset, &special,
+ &sponsor, &revision);
+
+ /* Create all possible locale entries which might be interested in
+ generalization. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, mask, language, territory,
+ codeset, normalized_codeset, modifier, special,
+ sponsor, revision, domainname, 1);
+ if (retval == NULL)
+ /* This means we are out of core. */
+ return NULL;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval, domainbinding);
+ if (retval->data == NULL)
+ {
+ int cnt;
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt], domainbinding);
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ }
+
+ /* The room for an alias was dynamically allocated. Free it now. */
+ if (alias_value != NULL)
+ free (locale);
+
+ /* The space for normalized_codeset is dynamically allocated. Free it. */
+ if (mask & XPG_NORM_CODESET)
+ free ((void *) normalized_codeset);
+
+ return retval;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+ while (runp != NULL)
+ {
+ struct loaded_l10nfile *here = runp;
+ if (runp->data != NULL)
+ _nl_unload_domain ((struct loaded_domain *) runp->data);
+ runp = runp->next;
+ free ((char *) here->filename);
+ free (here);
+ }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,64 @@
+/* Implementation of gettext(3) function.
+ Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+GETTEXT (msgid)
+ const char *msgid;
+{
+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__gettext, gettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettextP.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gettextP.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,242 @@
+/* Header describing internals of libintl library.
+ Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include <stddef.h> /* Get size_t. */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+# include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+#include "gmo.h" /* Get nls_uint32. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static inline nls_uint32
+SWAP (i)
+ nls_uint32 i;
+{
+ return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* In-memory representation of system dependent string. */
+struct sysdep_string_desc
+{
+ /* Length of addressed string, including the trailing NUL. */
+ size_t length;
+ /* Pointer to addressed string. */
+ const char *pointer;
+};
+
+/* The representation of an opened message catalog. */
+struct loaded_domain
+{
+ /* Pointer to memory containing the .mo file. */
+ const char *data;
+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
+ int use_mmap;
+ /* Size of mmap()ed memory. */
+ size_t mmap_size;
+ /* 1 if the .mo file uses a different endianness than this machine. */
+ int must_swap;
+ /* Pointer to additional malloc()ed memory. */
+ void *malloced;
+
+ /* Number of static strings pairs. */
+ nls_uint32 nstrings;
+ /* Pointer to descriptors of original strings in the file. */
+ const struct string_desc *orig_tab;
+ /* Pointer to descriptors of translated strings in the file. */
+ const struct string_desc *trans_tab;
+
+ /* Number of system dependent strings pairs. */
+ nls_uint32 n_sysdep_strings;
+ /* Pointer to descriptors of original sysdep strings. */
+ const struct sysdep_string_desc *orig_sysdep_tab;
+ /* Pointer to descriptors of translated sysdep strings. */
+ const struct sysdep_string_desc *trans_sysdep_tab;
+
+ /* Size of hash table. */
+ nls_uint32 hash_size;
+ /* Pointer to hash table. */
+ const nls_uint32 *hash_tab;
+ /* 1 if the hash table uses a different endianness than this machine. */
+ int must_swap_hash_tab;
+
+ int codeset_cntr;
+#ifdef _LIBC
+ __gconv_t conv;
+#else
+# if HAVE_ICONV
+ iconv_t conv;
+# endif
+#endif
+ char **conv_tab;
+
+ struct expression *plural;
+ unsigned long int nplurals;
+};
+
+/* We want to allocate a string at the end of the struct. But ISO C
+ doesn't allow zero sized arrays. */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* A set of settings bound to a message domain. Used to store settings
+ from bindtextdomain() and bind_textdomain_codeset(). */
+struct binding
+{
+ struct binding *next;
+ char *dirname;
+ int codeset_cntr; /* Incremented each time codeset changes. */
+ char *codeset;
+ char domainname[ZERO];
+};
+
+/* A counter which is incremented each time some previous translations
+ become invalid.
+ This variable is part of the external ABI of the GNU libintl. */
+extern int _nl_msg_cat_cntr;
+
+#ifndef _LIBC
+const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
+#endif
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+ char *__locale,
+ const char *__domainname,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
+ struct loaded_domain *__domain,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+
+char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+ struct binding *domainbinding,
+ const char *msgid, size_t *lengthp))
+ internal_function;
+
+#ifdef _LIBC
+extern char *__gettext PARAMS ((const char *__msgid));
+extern char *__dgettext PARAMS ((const char *__domainname,
+ const char *__msgid));
+extern char *__dcgettext PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
+ unsigned long int __n));
+extern char *__dngettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int n));
+extern char *__dcngettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category));
+extern char *__dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+extern char *__textdomain PARAMS ((const char *__domainname));
+extern char *__bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
+ const char *__codeset));
+#else
+extern char *libintl_gettext PARAMS ((const char *__msgid));
+extern char *libintl_dgettext PARAMS ((const char *__domainname,
+ const char *__msgid));
+extern char *libintl_dcgettext PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+extern char *libintl_ngettext PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dcngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category));
+extern char *libintl_dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+extern char *libintl_textdomain PARAMS ((const char *__domainname));
+extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
+ const char *__codeset));
+#endif
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h */
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gmo.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/gmo.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,148 @@
+/* Description of GNU message catalog format: general file layout.
+ Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <limits.h>
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format. */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format. */
+#define MO_REVISION_NUMBER 0
+
+/* The following contortions are an attempt to use the C preprocessor
+ to determine an unsigned integral type that is 32 bits wide. An
+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
+ when cross-compiling. */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+ This should be valid for all systems GNU cares about because
+ that doesn't include 16-bit systems, and only modern systems
+ (that certainly have <limits.h>) have 64+-bit integral types. */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+# if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format. */
+struct mo_file_header
+{
+ /* The magic number. */
+ nls_uint32 magic;
+ /* The revision number of the file format. */
+ nls_uint32 revision;
+
+ /* The following are only used in .mo files with major revision 0. */
+
+ /* The number of strings pairs. */
+ nls_uint32 nstrings;
+ /* Offset of table with start offsets of original strings. */
+ nls_uint32 orig_tab_offset;
+ /* Offset of table with start offsets of translated strings. */
+ nls_uint32 trans_tab_offset;
+ /* Size of hash table. */
+ nls_uint32 hash_tab_size;
+ /* Offset of first hash table entry. */
+ nls_uint32 hash_tab_offset;
+
+ /* The following are only used in .mo files with minor revision >= 1. */
+
+ /* The number of system dependent segments. */
+ nls_uint32 n_sysdep_segments;
+ /* Offset of table describing system dependent segments. */
+ nls_uint32 sysdep_segments_offset;
+ /* The number of system dependent strings pairs. */
+ nls_uint32 n_sysdep_strings;
+ /* Offset of table with start offsets of original sysdep strings. */
+ nls_uint32 orig_sysdep_tab_offset;
+ /* Offset of table with start offsets of translated sysdep strings. */
+ nls_uint32 trans_sysdep_tab_offset;
+};
+
+/* Descriptor for static string contained in the binary .mo file. */
+struct string_desc
+{
+ /* Length of addressed string, not including the trailing NUL. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* The following are only used in .mo files with minor revision >= 1. */
+
+/* Descriptor for system dependent string segment. */
+struct sysdep_segment
+{
+ /* Length of addressed string, including the trailing NUL. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* Descriptor for system dependent string. */
+struct sysdep_string
+{
+ /* Offset of static string segments in file. */
+ nls_uint32 offset;
+ /* Alternating sequence of static and system dependent segments.
+ The last segment is a static segment, including the trailing NUL. */
+ struct segment_pair
+ {
+ /* Size of static segment. */
+ nls_uint32 segsize;
+ /* Reference to system dependent string segment, or ~0 at the end. */
+ nls_uint32 sysdepref;
+ } segments[1];
+};
+
+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
+#define SEGMENTS_END ((nls_uint32) ~0)
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h */
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/hash-string.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/hash-string.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,59 @@
+/* Description of GNU message catalog format: string hashing function.
+ Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+#endif
+
+/* We assume to have `unsigned long int' value with at least 32 bits. */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+ [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+ 1986, 1987 Bell Telephone Laboratories, Inc.] */
+static unsigned long int hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long int
+hash_string (str_param)
+ const char *str_param;
+{
+ unsigned long int hval, g;
+ const char *str = str_param;
+
+ /* Compute the hash value for the given string. */
+ hval = 0;
+ while (*str != '\0')
+ {
+ hval <<= 4;
+ hval += (unsigned long int) *str++;
+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (HASHWORDBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval;
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/intl-compat.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/intl-compat.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,131 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+ Library.
+ Copyright (C) 1995, 2000-2002 Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define _INTL_REDIRECT_MACROS
+#include "libgnuintl.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* This file redirects the gettext functions (without prefix) to those
+ defined in the included GNU libintl library (with "libintl_" prefix).
+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+ has the redirections primarily in the <libintl.h> include file. */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef ngettext
+#undef dngettext
+#undef dcngettext
+#undef textdomain
+#undef bindtextdomain
+#undef bind_textdomain_codeset
+
+
+char *
+gettext (msgid)
+ const char *msgid;
+{
+ return libintl_gettext (msgid);
+}
+
+
+char *
+dgettext (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return libintl_dgettext (domainname, msgid);
+}
+
+
+char *
+dcgettext (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return libintl_dcgettext (domainname, msgid, category);
+}
+
+
+char *
+ngettext (msgid1, msgid2, n)
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return libintl_ngettext (msgid1, msgid2, n);
+}
+
+
+char *
+dngettext (domainname, msgid1, msgid2, n)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return libintl_dngettext (domainname, msgid1, msgid2, n);
+}
+
+
+char *
+dcngettext (domainname, msgid1, msgid2, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+ int category;
+{
+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
+}
+
+
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ return libintl_textdomain (domainname);
+}
+
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ return libintl_bindtextdomain (domainname, dirname);
+}
+
+
+char *
+bind_textdomain_codeset (domainname, codeset)
+ const char *domainname;
+ const char *codeset;
+{
+ return libintl_bind_textdomain_codeset (domainname, codeset);
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/l10nflist.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/l10nflist.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,453 @@
+/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# ifndef stpcpy
+# define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+#endif
+
+/* Define function which are usually not available. */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ. */
+static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+ const char *argz;
+ size_t len;
+{
+ size_t count = 0;
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len + 1;
+ len -= part_len + 1;
+ count++;
+ }
+ return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#else
+# ifdef _LIBC
+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+ except the last into the character SEP. */
+static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+ char *argz;
+ size_t len;
+ int sep;
+{
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len;
+ len -= part_len + 1;
+ if (len > 0)
+ *argz++ = sep;
+ }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#else
+# ifdef _LIBC
+# define __argz_stringify(argz, len, sep) \
+ INTUSE(__argz_stringify) (argz, len, sep)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+ const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+ char *argz;
+ size_t argz_len;
+ const char *entry;
+{
+ if (entry)
+ {
+ if (entry < argz + argz_len)
+ entry = strchr (entry, '\0') + 1;
+
+ return entry >= argz + argz_len ? NULL : (char *) entry;
+ }
+ else
+ if (argz_len > 0)
+ return argz;
+ else
+ return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X. */
+static int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+ int x;
+{
+ /* We assume that no more than 16 bits are used. */
+ x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+ x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+ x = ((x >> 4) + x) & 0x0f0f;
+ x = ((x >> 8) + x) & 0xff;
+
+ return x;
+}
+
+
+struct loaded_l10nfile *
+_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+ territory, codeset, normalized_codeset, modifier, special,
+ sponsor, revision, filename, do_allocate)
+ struct loaded_l10nfile **l10nfile_list;
+ const char *dirlist;
+ size_t dirlist_len;
+ int mask;
+ const char *language;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *modifier;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *filename;
+ int do_allocate;
+{
+ char *abs_filename;
+ struct loaded_l10nfile **lastp;
+ struct loaded_l10nfile *retval;
+ char *cp;
+ size_t dirlist_count;
+ size_t entries;
+ int cnt;
+
+ /* If LANGUAGE contains an absolute directory specification, we ignore
+ DIRLIST. */
+ if (IS_ABSOLUTE_PATH (language))
+ dirlist_len = 0;
+
+ /* Allocate room for the full file name. */
+ abs_filename = (char *) malloc (dirlist_len
+ + strlen (language)
+ + ((mask & TERRITORY) != 0
+ ? strlen (territory) + 1 : 0)
+ + ((mask & XPG_CODESET) != 0
+ ? strlen (codeset) + 1 : 0)
+ + ((mask & XPG_NORM_CODESET) != 0
+ ? strlen (normalized_codeset) + 1 : 0)
+ + (((mask & XPG_MODIFIER) != 0
+ || (mask & CEN_AUDIENCE) != 0)
+ ? strlen (modifier) + 1 : 0)
+ + ((mask & CEN_SPECIAL) != 0
+ ? strlen (special) + 1 : 0)
+ + (((mask & CEN_SPONSOR) != 0
+ || (mask & CEN_REVISION) != 0)
+ ? (1 + ((mask & CEN_SPONSOR) != 0
+ ? strlen (sponsor) : 0)
+ + ((mask & CEN_REVISION) != 0
+ ? strlen (revision) + 1 : 0)) : 0)
+ + 1 + strlen (filename) + 1);
+
+ if (abs_filename == NULL)
+ return NULL;
+
+ /* Construct file name. */
+ cp = abs_filename;
+ if (dirlist_len > 0)
+ {
+ memcpy (cp, dirlist, dirlist_len);
+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
+ cp += dirlist_len;
+ cp[-1] = '/';
+ }
+
+ cp = stpcpy (cp, language);
+
+ if ((mask & TERRITORY) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, territory);
+ }
+ if ((mask & XPG_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, codeset);
+ }
+ if ((mask & XPG_NORM_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, normalized_codeset);
+ }
+ if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+ {
+ /* This component can be part of both syntaces but has different
+ leading characters. For CEN we use `+', else `@'. */
+ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+ cp = stpcpy (cp, modifier);
+ }
+ if ((mask & CEN_SPECIAL) != 0)
+ {
+ *cp++ = '+';
+ cp = stpcpy (cp, special);
+ }
+ if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+ {
+ *cp++ = ',';
+ if ((mask & CEN_SPONSOR) != 0)
+ cp = stpcpy (cp, sponsor);
+ if ((mask & CEN_REVISION) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, revision);
+ }
+ }
+
+ *cp++ = '/';
+ stpcpy (cp, filename);
+
+ /* Look in list of already loaded domains whether it is already
+ available. */
+ lastp = l10nfile_list;
+ for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+ if (retval->filename != NULL)
+ {
+ int compare = strcmp (retval->filename, abs_filename);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It's not in the list. */
+ retval = NULL;
+ break;
+ }
+
+ lastp = &retval->next;
+ }
+
+ if (retval != NULL || do_allocate == 0)
+ {
+ free (abs_filename);
+ return retval;
+ }
+
+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
+
+ /* Allocate a new loaded_l10nfile. */
+ retval =
+ (struct loaded_l10nfile *)
+ malloc (sizeof (*retval)
+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
+ * sizeof (struct loaded_l10nfile *)));
+ if (retval == NULL)
+ return NULL;
+
+ retval->filename = abs_filename;
+
+ /* We set retval->data to NULL here; it is filled in later.
+ Setting retval->decided to 1 here means that retval does not
+ correspond to a real file (dirlist_count > 1) or is not worth
+ looking up (if an unnormalized codeset was specified). */
+ retval->decided = (dirlist_count > 1
+ || ((mask & XPG_CODESET) != 0
+ && (mask & XPG_NORM_CODESET) != 0));
+ retval->data = NULL;
+
+ retval->next = *lastp;
+ *lastp = retval;
+
+ entries = 0;
+ /* Recurse to fill the inheritance list of RETVAL.
+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
+ entry does not correspond to a real file; retval->filename contains
+ colons. In this case we loop across all elements of DIRLIST and
+ across all bit patterns dominated by MASK.
+ If the DIRLIST is a single directory or entirely redundant (i.e.
+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
+ MASK, excluding MASK itself.
+ In either case, we loop down from MASK to 0. This has the effect
+ that the extra bits in the locale name are dropped in this order:
+ first the modifier, then the territory, then the codeset, then the
+ normalized_codeset. */
+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
+ if ((cnt & ~mask) == 0
+ && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+ && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+ {
+ if (dirlist_count > 1)
+ {
+ /* Iterate over all elements of the DIRLIST. */
+ char *dir = NULL;
+
+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+ != NULL)
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
+ cnt, language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, 1);
+ }
+ else
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
+ cnt, language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, 1);
+ }
+ retval->successor[entries] = NULL;
+
+ return retval;
+}
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+ const char *codeset;
+ size_t name_len;
+{
+ int len = 0;
+ int only_digit = 1;
+ char *retval;
+ char *wp;
+ size_t cnt;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalnum ((unsigned char) codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha ((unsigned char) codeset[cnt]))
+ only_digit = 0;
+ }
+
+ retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+ if (retval != NULL)
+ {
+ if (only_digit)
+ wp = stpcpy (retval, "iso");
+ else
+ wp = retval;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalpha ((unsigned char) codeset[cnt]))
+ *wp++ = tolower ((unsigned char) codeset[cnt]);
+ else if (isdigit ((unsigned char) codeset[cnt]))
+ *wp++ = codeset[cnt];
+
+ *wp = '\0';
+ }
+
+ return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/libgnuintl.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/libgnuintl.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,296 @@
+/* Message catalogs for internationalization.
+ Copyright (C) 1995-1997, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H 1
+
+#include <locale.h>
+
+/* The LC_MESSAGES locale category is the category used by the functions
+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
+ On systems that don't define it, use an arbitrary value instead.
+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+ then includes <libintl.h> (i.e. this file!) and then only defines
+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
+ in this case. */
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
+# define LC_MESSAGES 1729
+#endif
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+/* Provide information about the supported file formats. Returns the
+ maximum minor revision number supported for a given major revision. */
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+ ((major) == 0 ? 1 : -1)
+
+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
+ precedence over _conio_gettext. */
+#ifdef __DJGPP__
+# undef gettext
+#endif
+
+/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
+ used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */
+#ifndef _INTL_PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define _INTL_PARAMS(args) args
+# else
+# define _INTL_PARAMS(args) ()
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* We redirect the functions to those prefixed with "libintl_". This is
+ necessary, because some systems define gettext/textdomain/... in the C
+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+ If we used the unprefixed names, there would be cases where the
+ definition in the C library would override the one in the libintl.so
+ shared library. Recall that on ELF systems, the symbols are looked
+ up in the following order:
+ 1. in the executable,
+ 2. in the shared libraries specified on the link command line, in order,
+ 3. in the dependencies of the shared libraries specified on the link
+ command line,
+ 4. in the dlopen()ed shared libraries, in the order in which they were
+ dlopen()ed.
+ The definition in the C library would override the one in libintl.so if
+ either
+ * -lc is given on the link command line and -lintl isn't, or
+ * -lc is given on the link command line before -lintl, or
+ * libintl.so is a dependency of a dlopen()ed shared library but not
+ linked to the executable at link time.
+ Since Solaris gettext() behaves differently than GNU gettext(), this
+ would be unacceptable.
+
+ The redirection happens by default through macros in C, so that &gettext
+ is independent of the compilation unit, but through inline functions in
+ C++, in order not to interfere with the name mangling of class fields or
+ class methods called 'gettext'. */
+
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+ If he doesn't, we choose the method. A third possible method is
+ _INTL_REDIRECT_ASM, supported only by GCC. */
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+# if __GNUC__ >= 2 && (defined __STDC__ || defined __cplusplus)
+# define _INTL_REDIRECT_ASM
+# else
+# ifdef __cplusplus
+# define _INTL_REDIRECT_INLINE
+# else
+# define _INTL_REDIRECT_MACROS
+# endif
+# endif
+#endif
+/* Auxiliary macros. */
+#ifdef _INTL_REDIRECT_ASM
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
+# define _INTL_STRINGIFY(prefix) #prefix
+#else
+# define _INTL_ASM(cname)
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_gettext (const char *__msgid);
+static inline char *gettext (const char *__msgid)
+{
+ return libintl_gettext (__msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define gettext libintl_gettext
+#endif
+extern char *gettext _INTL_PARAMS ((const char *__msgid))
+ _INTL_ASM (libintl_gettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+static inline char *dgettext (const char *__domainname, const char *__msgid)
+{
+ return libintl_dgettext (__domainname, __msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dgettext libintl_dgettext
+#endif
+extern char *dgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid))
+ _INTL_ASM (libintl_dgettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+ int __category);
+static inline char *dcgettext (const char *__domainname, const char *__msgid,
+ int __category)
+{
+ return libintl_dcgettext (__domainname, __msgid, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcgettext libintl_dcgettext
+#endif
+extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid,
+ int __category))
+ _INTL_ASM (libintl_dcgettext);
+#endif
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n);
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n)
+{
+ return libintl_ngettext (__msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define ngettext libintl_ngettext
+#endif
+extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n))
+ _INTL_ASM (libintl_ngettext);
+#endif
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
+ const char *__msgid2, unsigned long int __n);
+static inline char *dngettext (const char *__domainname, const char *__msgid1,
+ const char *__msgid2, unsigned long int __n)
+{
+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dngettext libintl_dngettext
+#endif
+extern char *dngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n))
+ _INTL_ASM (libintl_dngettext);
+#endif
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category);
+static inline char *dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category)
+{
+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcngettext libintl_dcngettext
+#endif
+extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category))
+ _INTL_ASM (libintl_dcngettext);
+#endif
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_textdomain (const char *__domainname);
+static inline char *textdomain (const char *__domainname)
+{
+ return libintl_textdomain (__domainname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define textdomain libintl_textdomain
+#endif
+extern char *textdomain _INTL_PARAMS ((const char *__domainname))
+ _INTL_ASM (libintl_textdomain);
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bindtextdomain (const char *__domainname,
+ const char *__dirname);
+static inline char *bindtextdomain (const char *__domainname,
+ const char *__dirname)
+{
+ return libintl_bindtextdomain (__domainname, __dirname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bindtextdomain libintl_bindtextdomain
+#endif
+extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
+ const char *__dirname))
+ _INTL_ASM (libintl_bindtextdomain);
+#endif
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset);
+static inline char *bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset)
+{
+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
+#endif
+extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
+ const char *__codeset))
+ _INTL_ASM (libintl_bind_textdomain_codeset);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadinfo.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadinfo.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,156 @@
+/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1996.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _LOADINFO_H
+#define _LOADINFO_H 1
+
+/* Declarations of locale dependent catalog lookup functions.
+ Implemented in
+
+ localealias.c Possibly replace a locale name by another.
+ explodename.c Split a locale name into its various fields.
+ l10nflist.c Generate a list of filenames of possible message catalogs.
+ finddomain.c Find and open the relevant message catalogs.
+
+ The main function _nl_find_domain() in finddomain.c is declared
+ in gettextP.h.
+ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Separator in PATH like lists of pathnames. */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define PATH_SEPARATOR ';'
+#else
+ /* Unix */
+# define PATH_SEPARATOR ':'
+#endif
+
+/* Encoding of locale name parts. */
+#define CEN_REVISION 1
+#define CEN_SPONSOR 2
+#define CEN_SPECIAL 4
+#define XPG_NORM_CODESET 8
+#define XPG_CODESET 16
+#define TERRITORY 32
+#define CEN_AUDIENCE 64
+#define XPG_MODIFIER 128
+
+#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+ const char *filename;
+ int decided;
+
+ const void *data;
+
+ struct loaded_l10nfile *next;
+ struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+ size_t name_len));
+
+/* Lookup a locale dependent file.
+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+ files of the same kind, sorted in decreasing order of ->filename.
+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+ produced by _nl_explode_name(). FILENAME is the filename suffix.
+ The return value is the lookup result, either found in *L10NFILE_LIST,
+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
+ furthermore its ->successor[] field contains a list of other lookup
+ results from which this lookup result inherits. */
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory,
+ const char *codeset,
+ const char *normalized_codeset,
+ const char *modifier, const char *special,
+ const char *sponsor, const char *revision,
+ const char *filename, int do_allocate));
+
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+ NAME is not a locale alias (but possibly a real locale name).
+ The return value is statically allocated and must not be freed. */
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+/* Split a locale name NAME into its pieces: language, modifier,
+ territory, codeset, special, sponsor, revision.
+ NAME gets destructively modified: NUL bytes are inserted here and
+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
+ gets assigned the expanded *CODESET, if it is different from *CODESET;
+ this one is dynamically allocated and has to be freed by the caller.
+ The return value is a bitmask, where each bit corresponds to one
+ filled-in value:
+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
+ TERRITORY for *TERRITORY,
+ XPG_CODESET for *CODESET,
+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
+ CEN_SPECIAL for *SPECIAL,
+ CEN_SPONSOR for *SPONSOR,
+ CEN_REVISION for *REVISION.
+ */
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+ const char **modifier,
+ const char **territory,
+ const char **codeset,
+ const char **normalized_codeset,
+ const char **special,
+ const char **sponsor,
+ const char **revision));
+
+/* Split a locale name NAME into a leading language part and all the
+ rest. Return a pointer to the first character after the language,
+ i.e. to the first byte of the rest. */
+extern char *_nl_find_language PARAMS ((const char *name));
+
+#endif /* loadinfo.h */
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadmsgcat.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/loadmsgcat.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1316 @@
+/* Load needed message catalogs.
+ Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP 1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#endif
+
+#include "gmo.h"
+#include "gettextP.h"
+#include "hash-string.h"
+#include "plural-exp.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
+ Note that our fallback values need not be literal strings, because we don't
+ use them with preprocessor string concatenation. */
+#if !defined PRId8 || PRI_MACROS_BROKEN
+# undef PRId8
+# define PRId8 "d"
+#endif
+#if !defined PRIi8 || PRI_MACROS_BROKEN
+# undef PRIi8
+# define PRIi8 "i"
+#endif
+#if !defined PRIo8 || PRI_MACROS_BROKEN
+# undef PRIo8
+# define PRIo8 "o"
+#endif
+#if !defined PRIu8 || PRI_MACROS_BROKEN
+# undef PRIu8
+# define PRIu8 "u"
+#endif
+#if !defined PRIx8 || PRI_MACROS_BROKEN
+# undef PRIx8
+# define PRIx8 "x"
+#endif
+#if !defined PRIX8 || PRI_MACROS_BROKEN
+# undef PRIX8
+# define PRIX8 "X"
+#endif
+#if !defined PRId16 || PRI_MACROS_BROKEN
+# undef PRId16
+# define PRId16 "d"
+#endif
+#if !defined PRIi16 || PRI_MACROS_BROKEN
+# undef PRIi16
+# define PRIi16 "i"
+#endif
+#if !defined PRIo16 || PRI_MACROS_BROKEN
+# undef PRIo16
+# define PRIo16 "o"
+#endif
+#if !defined PRIu16 || PRI_MACROS_BROKEN
+# undef PRIu16
+# define PRIu16 "u"
+#endif
+#if !defined PRIx16 || PRI_MACROS_BROKEN
+# undef PRIx16
+# define PRIx16 "x"
+#endif
+#if !defined PRIX16 || PRI_MACROS_BROKEN
+# undef PRIX16
+# define PRIX16 "X"
+#endif
+#if !defined PRId32 || PRI_MACROS_BROKEN
+# undef PRId32
+# define PRId32 "d"
+#endif
+#if !defined PRIi32 || PRI_MACROS_BROKEN
+# undef PRIi32
+# define PRIi32 "i"
+#endif
+#if !defined PRIo32 || PRI_MACROS_BROKEN
+# undef PRIo32
+# define PRIo32 "o"
+#endif
+#if !defined PRIu32 || PRI_MACROS_BROKEN
+# undef PRIu32
+# define PRIu32 "u"
+#endif
+#if !defined PRIx32 || PRI_MACROS_BROKEN
+# undef PRIx32
+# define PRIx32 "x"
+#endif
+#if !defined PRIX32 || PRI_MACROS_BROKEN
+# undef PRIX32
+# define PRIX32 "X"
+#endif
+#if !defined PRId64 || PRI_MACROS_BROKEN
+# undef PRId64
+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
+#endif
+#if !defined PRIi64 || PRI_MACROS_BROKEN
+# undef PRIi64
+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
+#endif
+#if !defined PRIo64 || PRI_MACROS_BROKEN
+# undef PRIo64
+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
+#endif
+#if !defined PRIu64 || PRI_MACROS_BROKEN
+# undef PRIu64
+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
+#endif
+#if !defined PRIx64 || PRI_MACROS_BROKEN
+# undef PRIx64
+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
+#endif
+#if !defined PRIX64 || PRI_MACROS_BROKEN
+# undef PRIX64
+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
+#endif
+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+#endif
+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+#endif
+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+#endif
+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+#endif
+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+#endif
+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+#endif
+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
+# undef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
+# undef PRIiFAST8
+# define PRIiFAST8 "i"
+#endif
+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
+# undef PRIoFAST8
+# define PRIoFAST8 "o"
+#endif
+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
+# undef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
+# undef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
+# undef PRIXFAST8
+# define PRIXFAST8 "X"
+#endif
+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
+# undef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
+# undef PRIiFAST16
+# define PRIiFAST16 "i"
+#endif
+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
+# undef PRIoFAST16
+# define PRIoFAST16 "o"
+#endif
+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
+# undef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
+# undef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
+# undef PRIXFAST16
+# define PRIXFAST16 "X"
+#endif
+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
+# undef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
+# undef PRIiFAST32
+# define PRIiFAST32 "i"
+#endif
+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
+# undef PRIoFAST32
+# define PRIoFAST32 "o"
+#endif
+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
+# undef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
+# undef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
+# undef PRIXFAST32
+# define PRIXFAST32 "X"
+#endif
+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+#endif
+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+#endif
+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+#endif
+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+#endif
+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+#endif
+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+#endif
+#if !defined PRIdMAX || PRI_MACROS_BROKEN
+# undef PRIdMAX
+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
+#endif
+#if !defined PRIiMAX || PRI_MACROS_BROKEN
+# undef PRIiMAX
+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
+#endif
+#if !defined PRIoMAX || PRI_MACROS_BROKEN
+# undef PRIoMAX
+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
+#endif
+#if !defined PRIuMAX || PRI_MACROS_BROKEN
+# undef PRIuMAX
+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
+#endif
+#if !defined PRIxMAX || PRI_MACROS_BROKEN
+# undef PRIxMAX
+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
+#endif
+#if !defined PRIXMAX || PRI_MACROS_BROKEN
+# undef PRIXMAX
+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
+#endif
+#if !defined PRIdPTR || PRI_MACROS_BROKEN
+# undef PRIdPTR
+# define PRIdPTR \
+ (sizeof (void *) == sizeof (long) ? "ld" : \
+ sizeof (void *) == sizeof (int) ? "d" : \
+ "lld")
+#endif
+#if !defined PRIiPTR || PRI_MACROS_BROKEN
+# undef PRIiPTR
+# define PRIiPTR \
+ (sizeof (void *) == sizeof (long) ? "li" : \
+ sizeof (void *) == sizeof (int) ? "i" : \
+ "lli")
+#endif
+#if !defined PRIoPTR || PRI_MACROS_BROKEN
+# undef PRIoPTR
+# define PRIoPTR \
+ (sizeof (void *) == sizeof (long) ? "lo" : \
+ sizeof (void *) == sizeof (int) ? "o" : \
+ "llo")
+#endif
+#if !defined PRIuPTR || PRI_MACROS_BROKEN
+# undef PRIuPTR
+# define PRIuPTR \
+ (sizeof (void *) == sizeof (long) ? "lu" : \
+ sizeof (void *) == sizeof (int) ? "u" : \
+ "llu")
+#endif
+#if !defined PRIxPTR || PRI_MACROS_BROKEN
+# undef PRIxPTR
+# define PRIxPTR \
+ (sizeof (void *) == sizeof (long) ? "lx" : \
+ sizeof (void *) == sizeof (int) ? "x" : \
+ "llx")
+#endif
+#if !defined PRIXPTR || PRI_MACROS_BROKEN
+# undef PRIXPTR
+# define PRIXPTR \
+ (sizeof (void *) == sizeof (long) ? "lX" : \
+ sizeof (void *) == sizeof (int) ? "X" : \
+ "llX")
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions. This is required by the standard
+ because some ISO C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define open __open
+# define close __close
+# define read __read
+# define mmap __mmap
+# define munmap __munmap
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+ O_BINARY is usually declared in <fcntl.h>. */
+#if !defined O_BINARY && defined _O_BINARY
+ /* For MSC-compatible compilers. */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#ifdef __BEOS__
+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+/* On reasonable systems, binary I/O is the default. */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static const char *get_sysdep_segment_value PARAMS ((const char *name));
+
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+ with all translations. This is important if the translations are
+ cached by one of GCC's features. */
+int _nl_msg_cat_cntr;
+
+
+/* Expand a system dependent string segment. Return NULL if unsupported. */
+static const char *
+get_sysdep_segment_value (name)
+ const char *name;
+{
+ /* Test for an ISO C 99 section 7.8.1 format string directive.
+ Syntax:
+ P R I { d | i | o | u | x | X }
+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
+ /* We don't use a table of 14 times 6 'const char *' strings here, because
+ data relocations cost startup time. */
+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
+ {
+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
+ || name[3] == 'x' || name[3] == 'X')
+ {
+ if (name[4] == '8' && name[5] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId8;
+ if (name[3] == 'i')
+ return PRIi8;
+ if (name[3] == 'o')
+ return PRIo8;
+ if (name[3] == 'u')
+ return PRIu8;
+ if (name[3] == 'x')
+ return PRIx8;
+ if (name[3] == 'X')
+ return PRIX8;
+ abort ();
+ }
+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId16;
+ if (name[3] == 'i')
+ return PRIi16;
+ if (name[3] == 'o')
+ return PRIo16;
+ if (name[3] == 'u')
+ return PRIu16;
+ if (name[3] == 'x')
+ return PRIx16;
+ if (name[3] == 'X')
+ return PRIX16;
+ abort ();
+ }
+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId32;
+ if (name[3] == 'i')
+ return PRIi32;
+ if (name[3] == 'o')
+ return PRIo32;
+ if (name[3] == 'u')
+ return PRIu32;
+ if (name[3] == 'x')
+ return PRIx32;
+ if (name[3] == 'X')
+ return PRIX32;
+ abort ();
+ }
+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId64;
+ if (name[3] == 'i')
+ return PRIi64;
+ if (name[3] == 'o')
+ return PRIo64;
+ if (name[3] == 'u')
+ return PRIu64;
+ if (name[3] == 'x')
+ return PRIx64;
+ if (name[3] == 'X')
+ return PRIX64;
+ abort ();
+ }
+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
+ && name[7] == 'S' && name[8] == 'T')
+ {
+ if (name[9] == '8' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST8;
+ if (name[3] == 'i')
+ return PRIiLEAST8;
+ if (name[3] == 'o')
+ return PRIoLEAST8;
+ if (name[3] == 'u')
+ return PRIuLEAST8;
+ if (name[3] == 'x')
+ return PRIxLEAST8;
+ if (name[3] == 'X')
+ return PRIXLEAST8;
+ abort ();
+ }
+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST16;
+ if (name[3] == 'i')
+ return PRIiLEAST16;
+ if (name[3] == 'o')
+ return PRIoLEAST16;
+ if (name[3] == 'u')
+ return PRIuLEAST16;
+ if (name[3] == 'x')
+ return PRIxLEAST16;
+ if (name[3] == 'X')
+ return PRIXLEAST16;
+ abort ();
+ }
+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST32;
+ if (name[3] == 'i')
+ return PRIiLEAST32;
+ if (name[3] == 'o')
+ return PRIoLEAST32;
+ if (name[3] == 'u')
+ return PRIuLEAST32;
+ if (name[3] == 'x')
+ return PRIxLEAST32;
+ if (name[3] == 'X')
+ return PRIXLEAST32;
+ abort ();
+ }
+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST64;
+ if (name[3] == 'i')
+ return PRIiLEAST64;
+ if (name[3] == 'o')
+ return PRIoLEAST64;
+ if (name[3] == 'u')
+ return PRIuLEAST64;
+ if (name[3] == 'x')
+ return PRIxLEAST64;
+ if (name[3] == 'X')
+ return PRIXLEAST64;
+ abort ();
+ }
+ }
+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
+ && name[7] == 'T')
+ {
+ if (name[8] == '8' && name[9] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST8;
+ if (name[3] == 'i')
+ return PRIiFAST8;
+ if (name[3] == 'o')
+ return PRIoFAST8;
+ if (name[3] == 'u')
+ return PRIuFAST8;
+ if (name[3] == 'x')
+ return PRIxFAST8;
+ if (name[3] == 'X')
+ return PRIXFAST8;
+ abort ();
+ }
+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST16;
+ if (name[3] == 'i')
+ return PRIiFAST16;
+ if (name[3] == 'o')
+ return PRIoFAST16;
+ if (name[3] == 'u')
+ return PRIuFAST16;
+ if (name[3] == 'x')
+ return PRIxFAST16;
+ if (name[3] == 'X')
+ return PRIXFAST16;
+ abort ();
+ }
+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST32;
+ if (name[3] == 'i')
+ return PRIiFAST32;
+ if (name[3] == 'o')
+ return PRIoFAST32;
+ if (name[3] == 'u')
+ return PRIuFAST32;
+ if (name[3] == 'x')
+ return PRIxFAST32;
+ if (name[3] == 'X')
+ return PRIXFAST32;
+ abort ();
+ }
+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST64;
+ if (name[3] == 'i')
+ return PRIiFAST64;
+ if (name[3] == 'o')
+ return PRIoFAST64;
+ if (name[3] == 'u')
+ return PRIuFAST64;
+ if (name[3] == 'x')
+ return PRIxFAST64;
+ if (name[3] == 'X')
+ return PRIXFAST64;
+ abort ();
+ }
+ }
+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
+ && name[7] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdMAX;
+ if (name[3] == 'i')
+ return PRIiMAX;
+ if (name[3] == 'o')
+ return PRIoMAX;
+ if (name[3] == 'u')
+ return PRIuMAX;
+ if (name[3] == 'x')
+ return PRIxMAX;
+ if (name[3] == 'X')
+ return PRIXMAX;
+ abort ();
+ }
+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
+ && name[7] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdPTR;
+ if (name[3] == 'i')
+ return PRIiPTR;
+ if (name[3] == 'o')
+ return PRIoPTR;
+ if (name[3] == 'u')
+ return PRIuPTR;
+ if (name[3] == 'x')
+ return PRIxPTR;
+ if (name[3] == 'X')
+ return PRIXPTR;
+ abort ();
+ }
+ }
+ }
+ /* Other system dependent strings are not valid. */
+ return NULL;
+}
+
+/* Initialize the codeset dependent parts of an opened message catalog.
+ Return the header entry. */
+const char *
+internal_function
+_nl_init_domain_conv (domain_file, domain, domainbinding)
+ struct loaded_l10nfile *domain_file;
+ struct loaded_domain *domain;
+ struct binding *domainbinding;
+{
+ /* Find out about the character set the file is encoded with.
+ This can be found (in textual form) in the entry "". If this
+ entry does not exist or if this does not contain the `charset='
+ information, we will assume the charset matches the one the
+ current locale and we don't have to perform any conversion. */
+ char *nullentry;
+ size_t nullentrylen;
+
+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
+ domain->codeset_cntr =
+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
+#ifdef _LIBC
+ domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+ domain->conv = (iconv_t) -1;
+# endif
+#endif
+ domain->conv_tab = NULL;
+
+ /* Get the header entry. */
+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
+
+ if (nullentry != NULL)
+ {
+#if defined _LIBC || HAVE_ICONV
+ const char *charsetstr;
+
+ charsetstr = strstr (nullentry, "charset=");
+ if (charsetstr != NULL)
+ {
+ size_t len;
+ char *charset;
+ const char *outcharset;
+
+ charsetstr += strlen ("charset=");
+ len = strcspn (charsetstr, " \t\n");
+
+ charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+ memcpy (charset, charsetstr, len);
+ charset[len] = '\0';
+# endif
+
+ /* The output charset should normally be determined by the
+ locale. But sometimes the locale is not used or not correctly
+ set up, so we provide a possibility for the user to override
+ this. Moreover, the value specified through
+ bind_textdomain_codeset overrides both. */
+ if (domainbinding != NULL && domainbinding->codeset != NULL)
+ outcharset = domainbinding->codeset;
+ else
+ {
+ outcharset = getenv ("OUTPUT_CHARSET");
+ if (outcharset == NULL || outcharset[0] == '\0')
+ {
+# ifdef _LIBC
+ outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
+# else
+# if HAVE_ICONV
+ extern const char *locale_charset PARAMS ((void));
+ outcharset = locale_charset ();
+# endif
+# endif
+ }
+ }
+
+# ifdef _LIBC
+ /* We always want to use transliteration. */
+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
+ charset = norm_add_slashes (charset, NULL);
+ if (__gconv_open (outcharset, charset, &domain->conv,
+ GCONV_AVOID_NOCONV)
+ != __GCONV_OK)
+ domain->conv = (__gconv_t) -1;
+# else
+# if HAVE_ICONV
+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
+ we want to use transliteration. */
+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+ || _LIBICONV_VERSION >= 0x0105
+ if (strchr (outcharset, '/') == NULL)
+ {
+ char *tmp;
+
+ len = strlen (outcharset);
+ tmp = (char *) alloca (len + 10 + 1);
+ memcpy (tmp, outcharset, len);
+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
+ outcharset = tmp;
+
+ domain->conv = iconv_open (outcharset, charset);
+
+ freea (outcharset);
+ }
+ else
+# endif
+ domain->conv = iconv_open (outcharset, charset);
+# endif
+# endif
+
+ freea (charset);
+ }
+#endif /* _LIBC || HAVE_ICONV */
+ }
+
+ return nullentry;
+}
+
+/* Frees the codeset dependent parts of an opened message catalog. */
+void
+internal_function
+_nl_free_domain_conv (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
+ free (domain->conv_tab);
+
+#ifdef _LIBC
+ if (domain->conv != (__gconv_t) -1)
+ __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+ if (domain->conv != (iconv_t) -1)
+ iconv_close (domain->conv);
+# endif
+#endif
+}
+
+/* Load the message catalogs specified by FILENAME. If it is no valid
+ message catalog do nothing. */
+void
+internal_function
+_nl_load_domain (domain_file, domainbinding)
+ struct loaded_l10nfile *domain_file;
+ struct binding *domainbinding;
+{
+ int fd;
+ size_t size;
+#ifdef _LIBC
+ struct stat64 st;
+#else
+ struct stat st;
+#endif
+ struct mo_file_header *data = (struct mo_file_header *) -1;
+ int use_mmap = 0;
+ struct loaded_domain *domain;
+ int revision;
+ const char *nullentry;
+
+ domain_file->decided = 1;
+ domain_file->data = NULL;
+
+ /* Note that it would be useless to store domainbinding in domain_file
+ because domainbinding might be == NULL now but != NULL later (after
+ a call to bind_textdomain_codeset). */
+
+ /* If the record does not represent a valid locale the FILENAME
+ might be NULL. This can happen when according to the given
+ specification the locale file name is different for XPG and CEN
+ syntax. */
+ if (domain_file->filename == NULL)
+ return;
+
+ /* Try to open the addressed file. */
+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+ if (fd == -1)
+ return;
+
+ /* We must know about the size of the file. */
+ if (
+#ifdef _LIBC
+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
+#else
+ __builtin_expect (fstat (fd, &st) != 0, 0)
+#endif
+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+ {
+ /* Something went wrong. */
+ close (fd);
+ return;
+ }
+
+#ifdef HAVE_MMAP
+ /* Now we are ready to load the file. If mmap() is available we try
+ this first. If not available or it failed we try to load it. */
+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+ MAP_PRIVATE, fd, 0);
+
+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+ {
+ /* mmap() call was successful. */
+ close (fd);
+ use_mmap = 1;
+ }
+#endif
+
+ /* If the data is not yet available (i.e. mmap'ed) we try to load
+ it manually. */
+ if (data == (struct mo_file_header *) -1)
+ {
+ size_t to_read;
+ char *read_ptr;
+
+ data = (struct mo_file_header *) malloc (size);
+ if (data == NULL)
+ return;
+
+ to_read = size;
+ read_ptr = (char *) data;
+ do
+ {
+ long int nb = (long int) read (fd, read_ptr, to_read);
+ if (nb <= 0)
+ {
+#ifdef EINTR
+ if (nb == -1 && errno == EINTR)
+ continue;
+#endif
+ close (fd);
+ return;
+ }
+ read_ptr += nb;
+ to_read -= nb;
+ }
+ while (to_read > 0);
+
+ close (fd);
+ }
+
+ /* Using the magic number we can test whether it really is a message
+ catalog file. */
+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+ 0))
+ {
+ /* The magic number is wrong: not a message catalog file. */
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ return;
+ }
+
+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain == NULL)
+ return;
+ domain_file->data = domain;
+
+ domain->data = (char *) data;
+ domain->use_mmap = use_mmap;
+ domain->mmap_size = size;
+ domain->must_swap = data->magic != _MAGIC;
+ domain->malloced = NULL;
+
+ /* Fill in the information about the available tables. */
+ revision = W (domain->must_swap, data->revision);
+ /* We support only the major revision 0. */
+ switch (revision >> 16)
+ {
+ case 0:
+ domain->nstrings = W (domain->must_swap, data->nstrings);
+ domain->orig_tab = (const struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+ domain->trans_tab = (const struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+ domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+ domain->hash_tab =
+ (domain->hash_size > 2
+ ? (const nls_uint32 *)
+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
+ : NULL);
+ domain->must_swap_hash_tab = domain->must_swap;
+
+ /* Now dispatch on the minor revision. */
+ switch (revision & 0xffff)
+ {
+ case 0:
+ domain->n_sysdep_strings = 0;
+ domain->orig_sysdep_tab = NULL;
+ domain->trans_sysdep_tab = NULL;
+ break;
+ case 1:
+ default:
+ {
+ nls_uint32 n_sysdep_strings;
+
+ if (domain->hash_tab == NULL)
+ /* This is invalid. These minor revisions need a hash table. */
+ goto invalid;
+
+ n_sysdep_strings =
+ W (domain->must_swap, data->n_sysdep_strings);
+ if (n_sysdep_strings > 0)
+ {
+ nls_uint32 n_sysdep_segments;
+ const struct sysdep_segment *sysdep_segments;
+ const char **sysdep_segment_values;
+ const nls_uint32 *orig_sysdep_tab;
+ const nls_uint32 *trans_sysdep_tab;
+ size_t memneed;
+ char *mem;
+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
+ nls_uint32 *inmem_hash_tab;
+ unsigned int i;
+
+ /* Get the values of the system dependent segments. */
+ n_sysdep_segments =
+ W (domain->must_swap, data->n_sysdep_segments);
+ sysdep_segments = (const struct sysdep_segment *)
+ ((char *) data
+ + W (domain->must_swap, data->sysdep_segments_offset));
+ sysdep_segment_values =
+ alloca (n_sysdep_segments * sizeof (const char *));
+ for (i = 0; i < n_sysdep_segments; i++)
+ {
+ const char *name =
+ (char *) data
+ + W (domain->must_swap, sysdep_segments[i].offset);
+ nls_uint32 namelen =
+ W (domain->must_swap, sysdep_segments[i].length);
+
+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
+ {
+ freea (sysdep_segment_values);
+ goto invalid;
+ }
+
+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
+ }
+
+ orig_sysdep_tab = (const nls_uint32 *)
+ ((char *) data
+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
+ trans_sysdep_tab = (const nls_uint32 *)
+ ((char *) data
+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
+
+ /* Compute the amount of additional memory needed for the
+ system dependent strings and the augmented hash table. */
+ memneed = 2 * n_sysdep_strings
+ * sizeof (struct sysdep_string_desc)
+ + domain->hash_size * sizeof (nls_uint32);
+ for (i = 0; i < 2 * n_sysdep_strings; i++)
+ {
+ const struct sysdep_string *sysdep_string =
+ (const struct sysdep_string *)
+ ((char *) data
+ + W (domain->must_swap,
+ i < n_sysdep_strings
+ ? orig_sysdep_tab[i]
+ : trans_sysdep_tab[i - n_sysdep_strings]));
+ size_t need = 0;
+ const struct segment_pair *p = sysdep_string->segments;
+
+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
+ for (p = sysdep_string->segments;; p++)
+ {
+ nls_uint32 sysdepref;
+
+ need += W (domain->must_swap, p->segsize);
+
+ sysdepref = W (domain->must_swap, p->sysdepref);
+ if (sysdepref == SEGMENTS_END)
+ break;
+
+ if (sysdepref >= n_sysdep_segments)
+ {
+ /* Invalid. */
+ freea (sysdep_segment_values);
+ goto invalid;
+ }
+
+ need += strlen (sysdep_segment_values[sysdepref]);
+ }
+
+ memneed += need;
+ }
+
+ /* Allocate additional memory. */
+ mem = (char *) malloc (memneed);
+ if (mem == NULL)
+ goto invalid;
+
+ domain->malloced = mem;
+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
+ mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
+ mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+ inmem_hash_tab = (nls_uint32 *) mem;
+ mem += domain->hash_size * sizeof (nls_uint32);
+
+ /* Compute the system dependent strings. */
+ for (i = 0; i < 2 * n_sysdep_strings; i++)
+ {
+ const struct sysdep_string *sysdep_string =
+ (const struct sysdep_string *)
+ ((char *) data
+ + W (domain->must_swap,
+ i < n_sysdep_strings
+ ? orig_sysdep_tab[i]
+ : trans_sysdep_tab[i - n_sysdep_strings]));
+ const char *static_segments =
+ (char *) data
+ + W (domain->must_swap, sysdep_string->offset);
+ const struct segment_pair *p = sysdep_string->segments;
+
+ /* Concatenate the segments, and fill
+ inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and
+ inmem_trans_sysdep_tab[i-n_sysdep_strings] (for
+ i >= n_sysdep_strings). */
+
+ if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END)
+ {
+ /* Only one static segment. */
+ inmem_orig_sysdep_tab[i].length =
+ W (domain->must_swap, p->segsize);
+ inmem_orig_sysdep_tab[i].pointer = static_segments;
+ }
+ else
+ {
+ inmem_orig_sysdep_tab[i].pointer = mem;
+
+ for (p = sysdep_string->segments;; p++)
+ {
+ nls_uint32 segsize =
+ W (domain->must_swap, p->segsize);
+ nls_uint32 sysdepref =
+ W (domain->must_swap, p->sysdepref);
+ size_t n;
+
+ if (segsize > 0)
+ {
+ memcpy (mem, static_segments, segsize);
+ mem += segsize;
+ static_segments += segsize;
+ }
+
+ if (sysdepref == SEGMENTS_END)
+ break;
+
+ n = strlen (sysdep_segment_values[sysdepref]);
+ memcpy (mem, sysdep_segment_values[sysdepref], n);
+ mem += n;
+ }
+
+ inmem_orig_sysdep_tab[i].length =
+ mem - inmem_orig_sysdep_tab[i].pointer;
+ }
+ }
+
+ /* Compute the augmented hash table. */
+ for (i = 0; i < domain->hash_size; i++)
+ inmem_hash_tab[i] =
+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
+ for (i = 0; i < n_sysdep_strings; i++)
+ {
+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+ for (;;)
+ {
+ if (inmem_hash_tab[idx] == 0)
+ {
+ /* Hash table entry is empty. Use it. */
+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
+ break;
+ }
+
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+ }
+ }
+
+ freea (sysdep_segment_values);
+
+ domain->n_sysdep_strings = n_sysdep_strings;
+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
+
+ domain->hash_tab = inmem_hash_tab;
+ domain->must_swap_hash_tab = 0;
+ }
+ else
+ {
+ domain->n_sysdep_strings = 0;
+ domain->orig_sysdep_tab = NULL;
+ domain->trans_sysdep_tab = NULL;
+ }
+ }
+ break;
+ }
+ break;
+ default:
+ /* This is an invalid revision. */
+ invalid:
+ /* This is an invalid .mo file. */
+ if (domain->malloced)
+ free (domain->malloced);
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ free (domain);
+ domain_file->data = NULL;
+ return;
+ }
+
+ /* Now initialize the character set converter from the character set
+ the file is encoded with (found in the header entry) to the domain's
+ specified character set or the locale's character set. */
+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
+
+ /* Also look for a plural specification. */
+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->plural != &__gettext_germanic_plural)
+ __gettext_free_exp (domain->plural);
+
+ _nl_free_domain_conv (domain);
+
+ if (domain->malloced)
+ free (domain->malloced);
+
+# ifdef _POSIX_MAPPED_FILES
+ if (domain->use_mmap)
+ munmap ((caddr_t) domain->data, domain->mmap_size);
+ else
+# endif /* _POSIX_MAPPED_FILES */
+ free ((void *) domain->data);
+
+ free (domain);
+}
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localcharset.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localcharset.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,369 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+ Copyright (C) 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Written by Bruno Haible <bruno at clisp.org>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
+# define OS2
+#endif
+
+#if !defined WIN32
+# if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+# else
+# if HAVE_SETLOCALE
+# include <locale.h>
+# endif
+# endif
+#elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#ifdef HAVE_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+#ifdef __cplusplus
+/* When compiling with "gcc -x c++", produce a function with C linkage. */
+extern "C" const char * locale_charset (void);
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+ possible multithread problem in the function get_charset_aliases. If we
+ are running in a threaded environment, and if two threads initialize
+ 'charset_aliases' simultaneously, both will produce the same value,
+ and everything will be ok if the two assignments to 'charset_aliases'
+ are atomic. But I don't know what will happen if the two assignments mix. */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+ read, else NULL. Its format is:
+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file. */
+static const char *
+get_charset_aliases ()
+{
+ const char *cp;
+
+ cp = charset_aliases;
+ if (cp == NULL)
+ {
+#if !defined WIN32
+ FILE *fp;
+ const char *dir = LIBDIR;
+ const char *base = "charset.alias";
+ char *file_name;
+
+ /* Concatenate dir and base into freshly allocated file_name. */
+ {
+ size_t dir_len = strlen (dir);
+ size_t base_len = strlen (base);
+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+ if (file_name != NULL)
+ {
+ memcpy (file_name, dir, dir_len);
+ if (add_slash)
+ file_name[dir_len] = DIRECTORY_SEPARATOR;
+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+ }
+ }
+
+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
+ /* Out of memory or file not found, treat it as empty. */
+ cp = "";
+ else
+ {
+ /* Parse the file's contents. */
+ int c;
+ char buf1[50+1];
+ char buf2[50+1];
+ char *res_ptr = NULL;
+ size_t res_size = 0;
+ size_t l1, l2;
+
+ for (;;)
+ {
+ c = getc (fp);
+ if (c == EOF)
+ break;
+ if (c == '\n' || c == ' ' || c == '\t')
+ continue;
+ if (c == '#')
+ {
+ /* Skip comment, to end of line. */
+ do
+ c = getc (fp);
+ while (!(c == EOF || c == '\n'));
+ if (c == EOF)
+ break;
+ continue;
+ }
+ ungetc (c, fp);
+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+ break;
+ l1 = strlen (buf1);
+ l2 = strlen (buf2);
+ if (res_size == 0)
+ {
+ res_size = l1 + 1 + l2 + 1;
+ res_ptr = (char *) malloc (res_size + 1);
+ }
+ else
+ {
+ res_size += l1 + 1 + l2 + 1;
+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
+ }
+ if (res_ptr == NULL)
+ {
+ /* Out of memory. */
+ res_size = 0;
+ break;
+ }
+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
+ }
+ fclose (fp);
+ if (res_size == 0)
+ cp = "";
+ else
+ {
+ *(res_ptr + res_size) = '\0';
+ cp = res_ptr;
+ }
+ }
+
+ if (file_name != NULL)
+ free (file_name);
+
+#else
+
+ /* To avoid the troubles of installing a separate file in the same
+ directory as the DLL and of retrieving the DLL's directory at
+ runtime, simply inline the aliases here. */
+
+# if defined WIN32
+ cp = "CP936" "\0" "GBK" "\0"
+ "CP1361" "\0" "JOHAB" "\0"
+ "CP20127" "\0" "ASCII" "\0"
+ "CP20866" "\0" "KOI8-R" "\0"
+ "CP21866" "\0" "KOI8-RU" "\0"
+ "CP28591" "\0" "ISO-8859-1" "\0"
+ "CP28592" "\0" "ISO-8859-2" "\0"
+ "CP28593" "\0" "ISO-8859-3" "\0"
+ "CP28594" "\0" "ISO-8859-4" "\0"
+ "CP28595" "\0" "ISO-8859-5" "\0"
+ "CP28596" "\0" "ISO-8859-6" "\0"
+ "CP28597" "\0" "ISO-8859-7" "\0"
+ "CP28598" "\0" "ISO-8859-8" "\0"
+ "CP28599" "\0" "ISO-8859-9" "\0"
+ "CP28605" "\0" "ISO-8859-15" "\0";
+# endif
+#endif
+
+ charset_aliases = cp;
+ }
+
+ return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset ()
+{
+ const char *codeset;
+ const char *aliases;
+
+#if !(defined WIN32 || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+ /* Most systems support nl_langinfo (CODESET) nowadays. */
+ codeset = nl_langinfo (CODESET);
+
+# else
+
+ /* On old systems which lack it, use setlocale or getenv. */
+ const char *locale = NULL;
+
+ /* But most old systems don't have a complete set of locales. Some
+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
+ use setlocale here; it would return "C" when it doesn't support the
+ locale name the user has set. */
+# if HAVE_SETLOCALE && 0
+ locale = setlocale (LC_CTYPE, NULL);
+# endif
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ }
+
+ /* On some old systems, one used to set locale = "iso8859_1". On others,
+ you set it to "language_COUNTRY.charset". In any case, we resolve it
+ through the charset.alias file. */
+ codeset = locale;
+
+# endif
+
+#elif defined WIN32
+
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+
+#elif defined OS2
+
+ const char *locale;
+ static char buf[2 + 10 + 1];
+ ULONG cp[3];
+ ULONG cplen;
+
+ /* Allow user to override the codeset, as set in the operating system,
+ with standard language environment variables. */
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+
+ /* Resolve through the charset.alias file. */
+ codeset = locale;
+ }
+ else
+ {
+ /* OS/2 has a function returning the locale's codepage as a number. */
+ if (DosQueryCp (sizeof (cp), cp, &cplen))
+ codeset = "";
+ else
+ {
+ sprintf (buf, "CP%u", cp[0]);
+ codeset = buf;
+ }
+ }
+
+#endif
+
+ if (codeset == NULL)
+ /* The canonical name cannot be determined. */
+ codeset = "";
+
+ /* Resolve alias. */
+ for (aliases = get_charset_aliases ();
+ *aliases != '\0';
+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+ if (strcmp (codeset, aliases) == 0
+ || (aliases[0] == '*' && aliases[1] == '\0'))
+ {
+ codeset = aliases + strlen (aliases) + 1;
+ break;
+ }
+
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
+
+ return codeset;
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/locale.alias
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/locale.alias Wed Dec 27 00:14:01 2006
@@ -0,0 +1,78 @@
+# Locale name alias data base.
+# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+# The format of this file is the same as for the corresponding file of
+# the X Window System, which normally can be found in
+# /usr/lib/X11/locale/locale.alias
+# A single line contains two fields: an alias and a substitution value.
+# All entries are case independent.
+
+# Note: This file is far from being complete. If you have a value for
+# your own site which you think might be useful for others too, share
+# it with the rest of us. Send it using the `glibcbug' script to
+# bugs at gnu.org.
+
+# Packages using this file:
+
+bokmal no_NO.ISO-8859-1
+bokmål no_NO.ISO-8859-1
+catalan ca_ES.ISO-8859-1
+croatian hr_HR.ISO-8859-2
+czech cs_CZ.ISO-8859-2
+danish da_DK.ISO-8859-1
+dansk da_DK.ISO-8859-1
+deutsch de_DE.ISO-8859-1
+dutch nl_NL.ISO-8859-1
+eesti et_EE.ISO-8859-1
+estonian et_EE.ISO-8859-1
+finnish fi_FI.ISO-8859-1
+français fr_FR.ISO-8859-1
+french fr_FR.ISO-8859-1
+galego gl_ES.ISO-8859-1
+galician gl_ES.ISO-8859-1
+german de_DE.ISO-8859-1
+greek el_GR.ISO-8859-7
+hebrew he_IL.ISO-8859-8
+hrvatski hr_HR.ISO-8859-2
+hungarian hu_HU.ISO-8859-2
+icelandic is_IS.ISO-8859-1
+italian it_IT.ISO-8859-1
+japanese ja_JP.eucJP
+japanese.euc ja_JP.eucJP
+ja_JP ja_JP.eucJP
+ja_JP.ujis ja_JP.eucJP
+japanese.sjis ja_JP.SJIS
+korean ko_KR.eucKR
+korean.euc ko_KR.eucKR
+ko_KR ko_KR.eucKR
+lithuanian lt_LT.ISO-8859-13
+nb_NO no_NO.ISO-8859-1
+nb_NO.ISO-8859-1 no_NO.ISO-8859-1
+norwegian no_NO.ISO-8859-1
+nynorsk nn_NO.ISO-8859-1
+polish pl_PL.ISO-8859-2
+portuguese pt_PT.ISO-8859-1
+romanian ro_RO.ISO-8859-2
+russian ru_RU.ISO-8859-5
+slovak sk_SK.ISO-8859-2
+slovene sl_SI.ISO-8859-2
+slovenian sl_SI.ISO-8859-2
+spanish es_ES.ISO-8859-1
+swedish sv_SE.ISO-8859-1
+thai th_TH.TIS-620
+turkish tr_TR.ISO-8859-9
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localealias.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localealias.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,419 @@
+/* Handle aliases for locale names.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+# define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY 1
+# define HAVE___FSETLOCKING 1
+
+/* We need locking here since we can be called from different places. */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Some optimizations for glibc. */
+#ifdef _LIBC
+# define FEOF(fp) feof_unlocked (fp)
+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
+#else
+# define FEOF(fp) feof (fp)
+# define FGETS(buf, n, fp) fgets (buf, n, fp)
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+ const char *alias;
+ const char *value;
+};
+
+
+static char *string_space;
+static size_t string_space_act;
+static size_t string_space_max;
+static struct alias_map *map;
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions. */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+ internal_function;
+static int extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+ const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+ const char *name;
+{
+ static const char *locale_alias_path;
+ struct alias_map *retval;
+ const char *result = NULL;
+ size_t added;
+
+#ifdef _LIBC
+ __libc_lock_lock (lock);
+#endif
+
+ if (locale_alias_path == NULL)
+ locale_alias_path = LOCALE_ALIAS_PATH;
+
+ do
+ {
+ struct alias_map item;
+
+ item.alias = name;
+
+ if (nmap > 0)
+ retval = (struct alias_map *) bsearch (&item, map, nmap,
+ sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *,
+ const void *))
+ ) alias_compare);
+ else
+ retval = NULL;
+
+ /* We really found an alias. Return the value. */
+ if (retval != NULL)
+ {
+ result = retval->value;
+ break;
+ }
+
+ /* Perhaps we can find another alias file. */
+ added = 0;
+ while (added == 0 && locale_alias_path[0] != '\0')
+ {
+ const char *start;
+
+ while (locale_alias_path[0] == PATH_SEPARATOR)
+ ++locale_alias_path;
+ start = locale_alias_path;
+
+ while (locale_alias_path[0] != '\0'
+ && locale_alias_path[0] != PATH_SEPARATOR)
+ ++locale_alias_path;
+
+ if (start < locale_alias_path)
+ added = read_alias_file (start, locale_alias_path - start);
+ }
+ }
+ while (added != 0);
+
+#ifdef _LIBC
+ __libc_lock_unlock (lock);
+#endif
+
+ return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (fname, fname_len)
+ const char *fname;
+ int fname_len;
+{
+ FILE *fp;
+ char *full_fname;
+ size_t added;
+ static const char aliasfile[] = "/locale.alias";
+
+ full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+#ifdef HAVE_MEMPCPY
+ mempcpy (mempcpy (full_fname, fname, fname_len),
+ aliasfile, sizeof aliasfile);
+#else
+ memcpy (full_fname, fname, fname_len);
+ memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+ fp = fopen (full_fname, "r");
+ freea (full_fname);
+ if (fp == NULL)
+ return 0;
+
+#ifdef HAVE___FSETLOCKING
+ /* No threads present. */
+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
+#endif
+
+ added = 0;
+ while (!FEOF (fp))
+ {
+ /* It is a reasonable approach to use a fix buffer here because
+ a) we are only interested in the first two fields
+ b) these fields must be usable as file names and so must not
+ be that long
+ */
+ char buf[BUFSIZ];
+ char *alias;
+ char *value;
+ char *cp;
+
+ if (FGETS (buf, sizeof buf, fp) == NULL)
+ /* EOF reached. */
+ break;
+
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ if (strchr (buf, '\n') == NULL)
+ {
+ char altbuf[BUFSIZ];
+ do
+ if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ while (strchr (altbuf, '\n') == NULL);
+ }
+
+ cp = buf;
+ /* Ignore leading white space. */
+ while (isspace ((unsigned char) cp[0]))
+ ++cp;
+
+ /* A leading '#' signals a comment line. */
+ if (cp[0] != '\0' && cp[0] != '#')
+ {
+ alias = cp++;
+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+ ++cp;
+ /* Terminate alias name. */
+ if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ /* Now look for the beginning of the value. */
+ while (isspace ((unsigned char) cp[0]))
+ ++cp;
+
+ if (cp[0] != '\0')
+ {
+ size_t alias_len;
+ size_t value_len;
+
+ value = cp++;
+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+ ++cp;
+ /* Terminate value. */
+ if (cp[0] == '\n')
+ {
+ /* This has to be done to make the following test
+ for the end of line possible. We are looking for
+ the terminating '\n' which do not overwrite here. */
+ *cp++ = '\0';
+ *cp = '\n';
+ }
+ else if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ if (nmap >= maxmap)
+ if (__builtin_expect (extend_alias_table (), 0))
+ return added;
+
+ alias_len = strlen (alias) + 1;
+ value_len = strlen (value) + 1;
+
+ if (string_space_act + alias_len + value_len > string_space_max)
+ {
+ /* Increase size of memory pool. */
+ size_t new_size = (string_space_max
+ + (alias_len + value_len > 1024
+ ? alias_len + value_len : 1024));
+ char *new_pool = (char *) realloc (string_space, new_size);
+ if (new_pool == NULL)
+ return added;
+
+ if (__builtin_expect (string_space != new_pool, 0))
+ {
+ size_t i;
+
+ for (i = 0; i < nmap; i++)
+ {
+ map[i].alias += new_pool - string_space;
+ map[i].value += new_pool - string_space;
+ }
+ }
+
+ string_space = new_pool;
+ string_space_max = new_size;
+ }
+
+ map[nmap].alias = memcpy (&string_space[string_space_act],
+ alias, alias_len);
+ string_space_act += alias_len;
+
+ map[nmap].value = memcpy (&string_space[string_space_act],
+ value, value_len);
+ string_space_act += value_len;
+
+ ++nmap;
+ ++added;
+ }
+ }
+ }
+
+ /* Should we test for ferror()? I think we have to silently ignore
+ errors. --drepper */
+ fclose (fp);
+
+ if (added > 0)
+ qsort (map, nmap, sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *, const void *))) alias_compare);
+
+ return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+ size_t new_size;
+ struct alias_map *new_map;
+
+ new_size = maxmap == 0 ? 100 : 2 * maxmap;
+ new_map = (struct alias_map *) realloc (map, (new_size
+ * sizeof (struct alias_map)));
+ if (new_map == NULL)
+ /* Simply don't extend: we don't have any more core. */
+ return -1;
+
+ map = new_map;
+ maxmap = new_size;
+ return 0;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ if (string_space != NULL)
+ free (string_space);
+ if (map != NULL)
+ free (map);
+}
+text_set_element (__libc_subfreeres, free_mem);
+#endif
+
+
+static int
+alias_compare (map1, map2)
+ const struct alias_map *map1;
+ const struct alias_map *map2;
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+ return strcasecmp (map1->alias, map2->alias);
+#else
+ const unsigned char *p1 = (const unsigned char *) map1->alias;
+ const unsigned char *p2 = (const unsigned char *) map2->alias;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ /* I know this seems to be odd but the tolower() function in
+ some systems libc cannot handle nonalpha characters. */
+ c1 = isupper (*p1) ? tolower (*p1) : *p1;
+ c2 = isupper (*p2) ? tolower (*p2) : *p2;
+ if (c1 == '\0')
+ break;
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+#endif
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localename.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/localename.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,772 @@
+/* Determine the current selected locale.
+ Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* Written by Ulrich Drepper <drepper at gnu.org>, 1995. */
+/* Win32 code written by Tor Lillqvist <tml at iki.fi>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <locale.h>
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* Mingw headers don't have latest language and sublanguage codes. */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+#endif
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+ "Directs 'setlocale()' to query 'category' and return the current
+ setting of 'local'."
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
+# define HAVE_LOCALE_NULL
+#endif
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+ language[_territory[.codeset]][@modifier]
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+
+const char *
+_nl_locale_name (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *retval;
+
+#ifndef WIN32
+
+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+ On some systems this can be done by the 'setlocale' function itself. */
+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ retval = setlocale (category, NULL);
+# else
+ /* Setting of LC_ALL overwrites all other. */
+ retval = getenv ("LC_ALL");
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval == NULL || retval[0] == '\0')
+ /* We use C as the default domain. POSIX says this is
+ implementation defined. */
+ retval = "C";
+ }
+ }
+# endif
+
+ return retval;
+
+#else /* WIN32 */
+
+ /* Return an XPG style locale name language[_territory][@modifier].
+ Don't even bother determining the codeset; it's not useful in this
+ context, because message catalogs are not specific to a single
+ codeset. */
+
+ LCID lcid;
+ LANGID langid;
+ int primary, sub;
+
+ /* Let the user override the system settings through environment
+ variables, as on POSIX systems. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Use native Win32 API locale ID. */
+ lcid = GetThreadLocale ();
+
+ /* Strip off the sorting rules, keep only the language part. */
+ langid = LANGIDFROMLCID (lcid);
+
+ /* Split into language and territory part. */
+ primary = PRIMARYLANGID (langid);
+ sub = SUBLANGID (langid);
+
+ /* Dispatch on language.
+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
+ For details about languages, see http://www.ethnologue.com/ . */
+ switch (primary)
+ {
+ case LANG_AFRIKAANS: return "af_ZA";
+ case LANG_ALBANIAN: return "sq_AL";
+ case 0x5e: /* AMHARIC */ return "am_ET";
+ case LANG_ARABIC:
+ switch (sub)
+ {
+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+ case SUBLANG_ARABIC_UAE: return "ar_AE";
+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
+ }
+ return "ar";
+ case LANG_ARMENIAN: return "hy_AM";
+ case LANG_ASSAMESE: return "as_IN";
+ case LANG_AZERI:
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
+ case SUBLANG_AZERI_LATIN: return "az_AZ at latin";
+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ at cyrillic";
+ }
+ return "az";
+ case LANG_BASQUE:
+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
+ case LANG_BELARUSIAN: return "be_BY";
+ case LANG_BENGALI: return "bn_IN";
+ case LANG_BULGARIAN: return "bg_BG";
+ case 0x55: /* BURMESE */ return "my_MM";
+ case 0x53: /* CAMBODIAN */ return "km_KH";
+ case LANG_CATALAN: return "ca_ES";
+ case 0x5c: /* CHEROKEE */ return "chr_US";
+ case LANG_CHINESE:
+ switch (sub)
+ {
+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
+ }
+ return "zh";
+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
+ * What used to be called Serbo-Croatian
+ * should really now be two separate
+ * languages because of political reasons.
+ * (Says tml, who knows nothing about Serbian
+ * or Croatian.)
+ * (I can feel those flames coming already.)
+ */
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "hr_HR";
+ case SUBLANG_SERBIAN_LATIN: return "sr_YU";
+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU at cyrillic";
+ }
+ return "hr";
+ case LANG_CZECH: return "cs_CZ";
+ case LANG_DANISH: return "da_DK";
+ case LANG_DIVEHI: return "div_MV";
+ case LANG_DUTCH:
+ switch (sub)
+ {
+ case SUBLANG_DUTCH: return "nl_NL";
+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+ }
+ return "nl";
+ case 0x66: /* EDO */ return "bin_NG";
+ case LANG_ENGLISH:
+ switch (sub)
+ {
+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+ * English was the language spoken in England.
+ * Oh well.
+ */
+ case SUBLANG_ENGLISH_US: return "en_US";
+ case SUBLANG_ENGLISH_UK: return "en_GB";
+ case SUBLANG_ENGLISH_AUS: return "en_AU";
+ case SUBLANG_ENGLISH_CAN: return "en_CA";
+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+ }
+ return "en";
+ case LANG_ESTONIAN: return "et_EE";
+ case LANG_FAEROESE: return "fo_FO";
+ case LANG_FARSI: return "fa_IR";
+ case LANG_FINNISH: return "fi_FI";
+ case LANG_FRENCH:
+ switch (sub)
+ {
+ case SUBLANG_FRENCH: return "fr_FR";
+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
+ }
+ return "fr";
+ case 0x62: /* FRISIAN */ return "fy_NL";
+ case 0x67: /* FULFULDE */ return "ful_NG";
+ case 0x3c: /* GAELIC */
+ switch (sub)
+ {
+ case 0x01: /* SCOTTISH */ return "gd_GB";
+ case 0x02: /* IRISH */ return "ga_IE";
+ }
+ return "C";
+ case LANG_GALICIAN: return "gl_ES";
+ case LANG_GEORGIAN: return "ka_GE";
+ case LANG_GERMAN:
+ switch (sub)
+ {
+ case SUBLANG_GERMAN: return "de_DE";
+ case SUBLANG_GERMAN_SWISS: return "de_CH";
+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+ }
+ return "de";
+ case LANG_GREEK: return "el_GR";
+ case 0x74: /* GUARANI */ return "gn_PY";
+ case LANG_GUJARATI: return "gu_IN";
+ case 0x68: /* HAUSA */ return "ha_NG";
+ case 0x75: /* HAWAIIAN */
+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
+ return "cpe_US";
+ case LANG_HEBREW: return "he_IL";
+ case LANG_HINDI: return "hi_IN";
+ case LANG_HUNGARIAN: return "hu_HU";
+ case 0x69: /* IBIBIO */ return "nic_NG";
+ case LANG_ICELANDIC: return "is_IS";
+ case 0x70: /* IGBO */ return "ibo_NG";
+ case LANG_INDONESIAN: return "id_ID";
+ case 0x5d: /* INUKTITUT */ return "iu_CA";
+ case LANG_ITALIAN:
+ switch (sub)
+ {
+ case SUBLANG_ITALIAN: return "it_IT";
+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
+ }
+ return "it";
+ case LANG_JAPANESE: return "ja_JP";
+ case LANG_KANNADA: return "kn_IN";
+ case 0x71: /* KANURI */ return "kau_NG";
+ case LANG_KASHMIRI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ks_PK";
+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+ }
+ return "ks";
+ case LANG_KAZAK: return "kk_KZ";
+ case LANG_KONKANI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "kok_IN";
+ case LANG_KOREAN: return "ko_KR";
+ case LANG_KYRGYZ: return "ky_KG";
+ case 0x54: /* LAO */ return "lo_LA";
+ case 0x76: /* LATIN */ return "la_VA";
+ case LANG_LATVIAN: return "lv_LV";
+ case LANG_LITHUANIAN: return "lt_LT";
+ case LANG_MACEDONIAN: return "mk_MK";
+ case LANG_MALAY:
+ switch (sub)
+ {
+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+ }
+ return "ms";
+ case LANG_MALAYALAM: return "ml_IN";
+ case 0x3a: /* MALTESE */ return "mt_MT";
+ case LANG_MANIPURI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "mni_IN";
+ case LANG_MARATHI: return "mr_IN";
+ case LANG_MONGOLIAN:
+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
+ case LANG_NEPALI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ne_NP";
+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
+ }
+ return "ne";
+ case LANG_NORWEGIAN:
+ switch (sub)
+ {
+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+ }
+ return "no";
+ case LANG_ORIYA: return "or_IN";
+ case 0x72: /* OROMO */ return "om_ET";
+ case 0x79: /* PAPIAMENTU */ return "pap_AN";
+ case 0x63: /* PASHTO */
+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
+ case LANG_POLISH: return "pl_PL";
+ case LANG_PORTUGUESE:
+ switch (sub)
+ {
+ case SUBLANG_PORTUGUESE: return "pt_PT";
+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+ }
+ return "pt";
+ case LANG_PUNJABI: return "pa_IN";
+ case 0x17: /* RHAETO-ROMANCE */ return "rm_CH";
+ case LANG_ROMANIAN: return "ro_RO";
+ case LANG_RUSSIAN:
+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
+ case 0x3b: /* SAMI */ return "se_NO";
+ case LANG_SANSKRIT: return "sa_IN";
+ case LANG_SINDHI: return "sd";
+ case 0x5b: /* SINHALESE */ return "si_LK";
+ case LANG_SLOVAK: return "sk_SK";
+ case LANG_SLOVENIAN: return "sl_SI";
+ case 0x77: /* SOMALI */ return "so_SO";
+ case LANG_SORBIAN:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "wen_DE";
+ case LANG_SPANISH:
+ switch (sub)
+ {
+ case SUBLANG_SPANISH: return "es_ES";
+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+ case SUBLANG_SPANISH_MODERN:
+ return "es_ES at modern"; /* not seen on Unix */
+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+ case SUBLANG_SPANISH_PERU: return "es_PE";
+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+ case SUBLANG_SPANISH_CHILE: return "es_CL";
+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+ }
+ return "es";
+ case 0x30: /* SUTU */ return "bnt_TZ";
+ case LANG_SWAHILI: return "sw_KE";
+ case LANG_SWEDISH:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "sv_SE";
+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+ }
+ return "sv";
+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
+ case 0x64: /* TAGALOG */ return "tl_PH";
+ case 0x28: /* TAJIK */ return "tg_TJ";
+ case 0x5f: /* TAMAZIGHT */ return "ber_MA";
+ case LANG_TAMIL:
+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
+ case LANG_TATAR: return "tt_RU";
+ case LANG_TELUGU: return "te_IN";
+ case LANG_THAI: return "th_TH";
+ case 0x51: /* TIBETAN */ return "bo_CN";
+ case 0x73: /* TIGRINYA */ return "ti_ET";
+ case 0x31: /* TSONGA */ return "ts_ZA";
+ case LANG_TURKISH: return "tr_TR";
+ case 0x42: /* TURKMEN */ return "tk_TM";
+ case LANG_UKRAINIAN: return "uk_UA";
+ case LANG_URDU:
+ switch (sub)
+ {
+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+ case SUBLANG_URDU_INDIA: return "ur_IN";
+ }
+ return "ur";
+ case LANG_UZBEK:
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Uzbek locales appear on Unix. */
+ case SUBLANG_UZBEK_LATIN: return "uz_UZ at latin";
+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ at cyrillic";
+ }
+ return "uz";
+ case 0x33: /* VENDA */ return "ven_ZA";
+ case LANG_VIETNAMESE: return "vi_VN";
+ case 0x52: /* WELSH */ return "cy_GB";
+ case 0x34: /* XHOSA */ return "xh_ZA";
+ case 0x78: /* YI */ return "sit_CN";
+ case 0x3d: /* YIDDISH */ return "yi_IL";
+ case 0x6a: /* YORUBA */ return "yo_NG";
+ case 0x35: /* ZULU */ return "zu_ZA";
+ default: return "C";
+ }
+
+#endif
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ngettext.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ngettext.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,68 @@
+/* Implementation of ngettext(3) function.
+ Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT INTUSE(__dcngettext)
+#else
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+NGETTEXT (msgid1, msgid2, n)
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__ngettext, ngettext);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,98 @@
+/* OS/2 compatibility functions.
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#define OS2_AWARE
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+
+/* A version of getenv() that works from DLLs */
+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
+
+char *
+_nl_getenv (const char *name)
+{
+ unsigned char *value;
+ if (DosScanEnv (name, &value))
+ return NULL;
+ else
+ return value;
+}
+
+/* A fixed size buffer. */
+char libintl_nl_default_dirname[MAXPATHLEN+1];
+
+char *_nlos2_libdir = NULL;
+char *_nlos2_localealiaspath = NULL;
+char *_nlos2_localedir = NULL;
+
+static __attribute__((constructor)) void
+nlos2_initialize ()
+{
+ char *root = getenv ("UNIXROOT");
+ char *gnulocaledir = getenv ("GNULOCALEDIR");
+
+ _nlos2_libdir = gnulocaledir;
+ if (!_nlos2_libdir)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
+ memcpy (_nlos2_libdir, root, sl);
+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
+ }
+ else
+ _nlos2_libdir = LIBDIR;
+ }
+
+ _nlos2_localealiaspath = gnulocaledir;
+ if (!_nlos2_localealiaspath)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
+ memcpy (_nlos2_localealiaspath, root, sl);
+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
+ }
+ else
+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
+ }
+
+ _nlos2_localedir = gnulocaledir;
+ if (!_nlos2_localedir)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
+ memcpy (_nlos2_localedir, root, sl);
+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
+ }
+ else
+ _nlos2_localedir = LOCALEDIR;
+ }
+
+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/os2compat.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,46 @@
+/* OS/2 compatibility defines.
+ This file is intended to be included from config.h
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* When included from os2compat.h we need all the original definitions */
+#ifndef OS2_AWARE
+
+#undef LIBDIR
+#define LIBDIR _nlos2_libdir
+extern char *_nlos2_libdir;
+
+#undef LOCALEDIR
+#define LOCALEDIR _nlos2_localedir
+extern char *_nlos2_localedir;
+
+#undef LOCALE_ALIAS_PATH
+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
+extern char *_nlos2_localealiaspath;
+
+#endif
+
+#undef HAVE_STRCASECMP
+#define HAVE_STRCASECMP 1
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+
+/* We have our own getenv() which works even if library is compiled as DLL */
+#define getenv _nl_getenv
+
+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
+#define LC_MESSAGES_COMPAT (-1)
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/osdep.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/osdep.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,24 @@
+/* OS dependent parts of libintl.
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#if defined __EMX__
+# include "os2compat.c"
+#else
+/* Avoid AIX compiler warning. */
+typedef int dummy;
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,156 @@
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at cygnus.com>, 2000.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "plural-exp.h"
+
+#if (defined __GNUC__ && !defined __APPLE_CC__) \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+
+/* These structs are the constant expression for the germanic plural
+ form determination. It represents the expression "n != 1". */
+static const struct expression plvar =
+{
+ .nargs = 0,
+ .operation = var,
+};
+static const struct expression plone =
+{
+ .nargs = 0,
+ .operation = num,
+ .val =
+ {
+ .num = 1
+ }
+};
+struct expression GERMANIC_PLURAL =
+{
+ .nargs = 2,
+ .operation = not_equal,
+ .val =
+ {
+ .args =
+ {
+ [0] = (struct expression *) &plvar,
+ [1] = (struct expression *) &plone
+ }
+ }
+};
+
+# define INIT_GERMANIC_PLURAL()
+
+#else
+
+/* For compilers without support for ISO C 99 struct/union initializers:
+ Initialization at run-time. */
+
+static struct expression plvar;
+static struct expression plone;
+struct expression GERMANIC_PLURAL;
+
+static void
+init_germanic_plural ()
+{
+ if (plone.val.num == 0)
+ {
+ plvar.nargs = 0;
+ plvar.operation = var;
+
+ plone.nargs = 0;
+ plone.operation = num;
+ plone.val.num = 1;
+
+ GERMANIC_PLURAL.nargs = 2;
+ GERMANIC_PLURAL.operation = not_equal;
+ GERMANIC_PLURAL.val.args[0] = &plvar;
+ GERMANIC_PLURAL.val.args[1] = &plone;
+ }
+}
+
+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+
+#endif
+
+void
+internal_function
+EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
+ const char *nullentry;
+ struct expression **pluralp;
+ unsigned long int *npluralsp;
+{
+ if (nullentry != NULL)
+ {
+ const char *plural;
+ const char *nplurals;
+
+ plural = strstr (nullentry, "plural=");
+ nplurals = strstr (nullentry, "nplurals=");
+ if (plural == NULL || nplurals == NULL)
+ goto no_plural;
+ else
+ {
+ char *endp;
+ unsigned long int n;
+ struct parse_args args;
+
+ /* First get the number. */
+ nplurals += 9;
+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
+ ++nplurals;
+ if (!(*nplurals >= '0' && *nplurals <= '9'))
+ goto no_plural;
+#if defined HAVE_STRTOUL || defined _LIBC
+ n = strtoul (nplurals, &endp, 10);
+#else
+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
+ n = n * 10 + (*endp - '0');
+#endif
+ if (nplurals == endp)
+ goto no_plural;
+ *npluralsp = n;
+
+ /* Due to the restrictions bison imposes onto the interface of the
+ scanner function we have to put the input string and the result
+ passed up from the parser into the same structure which address
+ is passed down to the parser. */
+ plural += 7;
+ args.cp = plural;
+ if (PLURAL_PARSE (&args) != 0)
+ goto no_plural;
+ *pluralp = args.res;
+ }
+ }
+ else
+ {
+ /* By default we are using the Germanic form: singular form only
+ for `one', the plural form otherwise. Yes, this is also what
+ English is using since English is a Germanic language. */
+ no_plural:
+ INIT_GERMANIC_PLURAL ();
+ *pluralp = &GERMANIC_PLURAL;
+ *npluralsp = 2;
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural-exp.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,126 @@
+/* Expression parsing and evaluation for plural form selection.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at cygnus.com>, 2000.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _PLURAL_EXP_H
+#define _PLURAL_EXP_H
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+
+/* This is the representation of the expressions to determine the
+ plural form. */
+struct expression
+{
+ int nargs; /* Number of arguments. */
+ enum operator
+ {
+ /* Without arguments: */
+ var, /* The variable "n". */
+ num, /* Decimal number. */
+ /* Unary operators: */
+ lnot, /* Logical NOT. */
+ /* Binary operators: */
+ mult, /* Multiplication. */
+ divide, /* Division. */
+ module, /* Modulo operation. */
+ plus, /* Addition. */
+ minus, /* Subtraction. */
+ less_than, /* Comparison. */
+ greater_than, /* Comparison. */
+ less_or_equal, /* Comparison. */
+ greater_or_equal, /* Comparison. */
+ equal, /* Comparison for equality. */
+ not_equal, /* Comparison for inequality. */
+ land, /* Logical AND. */
+ lor, /* Logical OR. */
+ /* Ternary operators: */
+ qmop /* Question mark operator. */
+ } operation;
+ union
+ {
+ unsigned long int num; /* Number value for `num'. */
+ struct expression *args[3]; /* Up to three arguments. */
+ } val;
+};
+
+/* This is the data structure to pass information to the parser and get
+ the result in a thread-safe way. */
+struct parse_args
+{
+ const char *cp;
+ struct expression *res;
+};
+
+
+/* Names for the libintl functions are a problem. This source code is used
+ 1. in the GNU C Library library,
+ 2. in the GNU libintl library,
+ 3. in the GNU gettext tools.
+ The function names in each situation must be different, to allow for
+ binary incompatible changes in 'struct expression'. Furthermore,
+ 1. in the GNU C Library library, the names have a __ prefix,
+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
+ must follow ANSI C and not start with __.
+ So we have to distinguish the three cases. */
+#ifdef _LIBC
+# define FREE_EXPRESSION __gettext_free_exp
+# define PLURAL_PARSE __gettextparse
+# define GERMANIC_PLURAL __gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
+#elif defined (IN_LIBINTL)
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
+#else
+# define FREE_EXPRESSION free_plural_expression
+# define PLURAL_PARSE parse_plural_expression
+# define GERMANIC_PLURAL germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
+#endif
+
+extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
+ internal_function;
+extern int PLURAL_PARSE PARAMS ((void *arg));
+extern struct expression GERMANIC_PLURAL attribute_hidden;
+extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
+ struct expression **pluralp,
+ unsigned long int *npluralsp))
+ internal_function;
+
+#if !defined (_LIBC) && !defined (IN_LIBINTL)
+extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
+ unsigned long int n));
+#endif
+
+#endif /* _PLURAL_EXP_H */
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1322 @@
+
+/* A Bison parser, made from plural.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+#define EQUOP2 257
+#define CMPOP2 258
+#define ADDOP2 259
+#define MULOP2 260
+#define NUMBER 261
+
+#line 1 "plural.y"
+
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at cygnus.com>, 2000.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* The bison generated parser uses alloca. AIX 3 forces us to put this
+ declaration at the beginning of the file. The declaration in bison's
+ skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+ but we want it to be called PLURAL_PARSE. */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+
+#line 49 "plural.y"
+typedef union {
+ unsigned long int num;
+ enum operator op;
+ struct expression *exp;
+} YYSTYPE;
+#line 55 "plural.y"
+
+/* Prototypes for local functions. */
+static struct expression *new_exp PARAMS ((int nargs, enum operator op,
+ struct expression * const *args));
+static inline struct expression *new_exp_0 PARAMS ((enum operator op));
+static inline struct expression *new_exp_1 PARAMS ((enum operator op,
+ struct expression *right));
+static struct expression *new_exp_2 PARAMS ((enum operator op,
+ struct expression *left,
+ struct expression *right));
+static inline struct expression *new_exp_3 PARAMS ((enum operator op,
+ struct expression *bexp,
+ struct expression *tbranch,
+ struct expression *fbranch));
+static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
+static void yyerror PARAMS ((const char *str));
+
+/* Allocation of expressions. */
+
+static struct expression *
+new_exp (nargs, op, args)
+ int nargs;
+ enum operator op;
+ struct expression * const *args;
+{
+ int i;
+ struct expression *newp;
+
+ /* If any of the argument could not be malloc'ed, just return NULL. */
+ for (i = nargs - 1; i >= 0; i--)
+ if (args[i] == NULL)
+ goto fail;
+
+ /* Allocate a new expression. */
+ newp = (struct expression *) malloc (sizeof (*newp));
+ if (newp != NULL)
+ {
+ newp->nargs = nargs;
+ newp->operation = op;
+ for (i = nargs - 1; i >= 0; i--)
+ newp->val.args[i] = args[i];
+ return newp;
+ }
+
+ fail:
+ for (i = nargs - 1; i >= 0; i--)
+ FREE_EXPRESSION (args[i]);
+
+ return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (op)
+ enum operator op;
+{
+ return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (op, right)
+ enum operator op;
+ struct expression *right;
+{
+ struct expression *args[1];
+
+ args[0] = right;
+ return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (op, left, right)
+ enum operator op;
+ struct expression *left;
+ struct expression *right;
+{
+ struct expression *args[2];
+
+ args[0] = left;
+ args[1] = right;
+ return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (op, bexp, tbranch, fbranch)
+ enum operator op;
+ struct expression *bexp;
+ struct expression *tbranch;
+ struct expression *fbranch;
+{
+ struct expression *args[3];
+
+ args[0] = bexp;
+ args[1] = tbranch;
+ args[2] = fbranch;
+ return new_exp (3, op, args);
+}
+
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 27
+#define YYFLAG -32768
+#define YYNTBASE 16
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 10, 2, 2, 2, 2, 5, 2, 14,
+ 15, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 12, 2, 2,
+ 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 6, 7, 8, 9,
+ 11
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 2, 8, 12, 16, 20, 24, 28, 32, 35,
+ 37, 39
+};
+
+static const short yyrhs[] = { 17,
+ 0, 17, 3, 17, 12, 17, 0, 17, 4, 17,
+ 0, 17, 5, 17, 0, 17, 6, 17, 0, 17,
+ 7, 17, 0, 17, 8, 17, 0, 17, 9, 17,
+ 0, 10, 17, 0, 13, 0, 11, 0, 14, 17,
+ 15, 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 174, 182, 186, 190, 194, 198, 202, 206, 210, 214,
+ 218, 223
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'",
+"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'",
+"start","exp", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 16, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17
+};
+
+static const short yyr2[] = { 0,
+ 1, 5, 3, 3, 3, 3, 3, 3, 2, 1,
+ 1, 3
+};
+
+static const short yydefact[] = { 0,
+ 0, 11, 10, 0, 1, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 12, 0, 3, 4, 5, 6,
+ 7, 8, 0, 2, 0, 0, 0
+};
+
+static const short yydefgoto[] = { 25,
+ 5
+};
+
+static const short yypact[] = { -9,
+ -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9,
+ -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26,
+ -3,-32768, -9, 34, 21, 53,-32768
+};
+
+static const short yypgoto[] = {-32768,
+ -1
+};
+
+
+#define YYLAST 53
+
+
+static const short yytable[] = { 6,
+ 1, 2, 7, 3, 4, 14, 16, 17, 18, 19,
+ 20, 21, 22, 8, 9, 10, 11, 12, 13, 14,
+ 26, 24, 12, 13, 14, 15, 8, 9, 10, 11,
+ 12, 13, 14, 13, 14, 23, 8, 9, 10, 11,
+ 12, 13, 14, 10, 11, 12, 13, 14, 11, 12,
+ 13, 14, 27
+};
+
+static const short yycheck[] = { 1,
+ 10, 11, 4, 13, 14, 9, 8, 9, 10, 11,
+ 12, 13, 14, 3, 4, 5, 6, 7, 8, 9,
+ 0, 23, 7, 8, 9, 15, 3, 4, 5, 6,
+ 7, 8, 9, 8, 9, 12, 3, 4, 5, 6,
+ 7, 8, 9, 5, 6, 7, 8, 9, 6, 7,
+ 8, 9, 0
+};
+#define YYPURE 1
+
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/local/share/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible at ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/local/share/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 1:
+#line 175 "plural.y"
+{
+ if (yyvsp[0].exp == NULL)
+ YYABORT;
+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
+ ;
+ break;}
+case 2:
+#line 183 "plural.y"
+{
+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 3:
+#line 187 "plural.y"
+{
+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 4:
+#line 191 "plural.y"
+{
+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 5:
+#line 195 "plural.y"
+{
+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 6:
+#line 199 "plural.y"
+{
+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 7:
+#line 203 "plural.y"
+{
+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 8:
+#line 207 "plural.y"
+{
+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+ ;
+ break;}
+case 9:
+#line 211 "plural.y"
+{
+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
+ ;
+ break;}
+case 10:
+#line 215 "plural.y"
+{
+ yyval.exp = new_exp_0 (var);
+ ;
+ break;}
+case 11:
+#line 219 "plural.y"
+{
+ if ((yyval.exp = new_exp_0 (num)) != NULL)
+ yyval.exp->val.num = yyvsp[0].num;
+ ;
+ break;}
+case 12:
+#line 224 "plural.y"
+{
+ yyval.exp = yyvsp[-1].exp;
+ ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/local/share/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
+}
+#line 229 "plural.y"
+
+
+void
+internal_function
+FREE_EXPRESSION (exp)
+ struct expression *exp;
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->nargs)
+ {
+ case 3:
+ FREE_EXPRESSION (exp->val.args[2]);
+ /* FALLTHROUGH */
+ case 2:
+ FREE_EXPRESSION (exp->val.args[1]);
+ /* FALLTHROUGH */
+ case 1:
+ FREE_EXPRESSION (exp->val.args[0]);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (lval, pexp)
+ YYSTYPE *lval;
+ const char **pexp;
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\0')
+ {
+ *pexp = exp;
+ return YYEOF;
+ }
+
+ if (exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ unsigned long int n = result - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = equal;
+ result = EQUOP2;
+ }
+ else
+ result = YYERRCODE;
+ break;
+
+ case '!':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = not_equal;
+ result = EQUOP2;
+ }
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '<':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = less_or_equal;
+ }
+ else
+ lval->op = less_than;
+ result = CMPOP2;
+ break;
+
+ case '>':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = greater_or_equal;
+ }
+ else
+ lval->op = greater_than;
+ result = CMPOP2;
+ break;
+
+ case '*':
+ lval->op = mult;
+ result = MULOP2;
+ break;
+
+ case '/':
+ lval->op = divide;
+ result = MULOP2;
+ break;
+
+ case '%':
+ lval->op = module;
+ result = MULOP2;
+ break;
+
+ case '+':
+ lval->op = plus;
+ result = ADDOP2;
+ break;
+
+ case '-':
+ lval->op = minus;
+ result = ADDOP2;
+ break;
+
+ case 'n':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case ';':
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (str)
+ const char *str;
+{
+ /* Do nothing. We don't print error messages here. */
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.y
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/plural.y Wed Dec 27 00:14:01 2006
@@ -0,0 +1,409 @@
+%{
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper at cygnus.com>, 2000.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/* The bison generated parser uses alloca. AIX 3 forces us to put this
+ declaration at the beginning of the file. The declaration in bison's
+ skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+ but we want it to be called PLURAL_PARSE. */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+%}
+%pure_parser
+%expect 7
+
+%union {
+ unsigned long int num;
+ enum operator op;
+ struct expression *exp;
+}
+
+%{
+/* Prototypes for local functions. */
+static struct expression *new_exp PARAMS ((int nargs, enum operator op,
+ struct expression * const *args));
+static inline struct expression *new_exp_0 PARAMS ((enum operator op));
+static inline struct expression *new_exp_1 PARAMS ((enum operator op,
+ struct expression *right));
+static struct expression *new_exp_2 PARAMS ((enum operator op,
+ struct expression *left,
+ struct expression *right));
+static inline struct expression *new_exp_3 PARAMS ((enum operator op,
+ struct expression *bexp,
+ struct expression *tbranch,
+ struct expression *fbranch));
+static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
+static void yyerror PARAMS ((const char *str));
+
+/* Allocation of expressions. */
+
+static struct expression *
+new_exp (nargs, op, args)
+ int nargs;
+ enum operator op;
+ struct expression * const *args;
+{
+ int i;
+ struct expression *newp;
+
+ /* If any of the argument could not be malloc'ed, just return NULL. */
+ for (i = nargs - 1; i >= 0; i--)
+ if (args[i] == NULL)
+ goto fail;
+
+ /* Allocate a new expression. */
+ newp = (struct expression *) malloc (sizeof (*newp));
+ if (newp != NULL)
+ {
+ newp->nargs = nargs;
+ newp->operation = op;
+ for (i = nargs - 1; i >= 0; i--)
+ newp->val.args[i] = args[i];
+ return newp;
+ }
+
+ fail:
+ for (i = nargs - 1; i >= 0; i--)
+ FREE_EXPRESSION (args[i]);
+
+ return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (op)
+ enum operator op;
+{
+ return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (op, right)
+ enum operator op;
+ struct expression *right;
+{
+ struct expression *args[1];
+
+ args[0] = right;
+ return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (op, left, right)
+ enum operator op;
+ struct expression *left;
+ struct expression *right;
+{
+ struct expression *args[2];
+
+ args[0] = left;
+ args[1] = right;
+ return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (op, bexp, tbranch, fbranch)
+ enum operator op;
+ struct expression *bexp;
+ struct expression *tbranch;
+ struct expression *fbranch;
+{
+ struct expression *args[3];
+
+ args[0] = bexp;
+ args[1] = tbranch;
+ args[2] = fbranch;
+ return new_exp (3, op, args);
+}
+
+%}
+
+/* This declares that all operators have the same associativity and the
+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
+ There is no unary minus and no bitwise operators.
+ Operators with the same syntactic behaviour have been merged into a single
+ token, to save space in the array generated by bison. */
+%right '?' /* ? */
+%left '|' /* || */
+%left '&' /* && */
+%left EQUOP2 /* == != */
+%left CMPOP2 /* < > <= >= */
+%left ADDOP2 /* + - */
+%left MULOP2 /* * / % */
+%right '!' /* ! */
+
+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
+%token <num> NUMBER
+%type <exp> exp
+
+%%
+
+start: exp
+ {
+ if ($1 == NULL)
+ YYABORT;
+ ((struct parse_args *) arg)->res = $1;
+ }
+ ;
+
+exp: exp '?' exp ':' exp
+ {
+ $$ = new_exp_3 (qmop, $1, $3, $5);
+ }
+ | exp '|' exp
+ {
+ $$ = new_exp_2 (lor, $1, $3);
+ }
+ | exp '&' exp
+ {
+ $$ = new_exp_2 (land, $1, $3);
+ }
+ | exp EQUOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp CMPOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp ADDOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp MULOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | '!' exp
+ {
+ $$ = new_exp_1 (lnot, $2);
+ }
+ | 'n'
+ {
+ $$ = new_exp_0 (var);
+ }
+ | NUMBER
+ {
+ if (($$ = new_exp_0 (num)) != NULL)
+ $$->val.num = $1;
+ }
+ | '(' exp ')'
+ {
+ $$ = $2;
+ }
+ ;
+
+%%
+
+void
+internal_function
+FREE_EXPRESSION (exp)
+ struct expression *exp;
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->nargs)
+ {
+ case 3:
+ FREE_EXPRESSION (exp->val.args[2]);
+ /* FALLTHROUGH */
+ case 2:
+ FREE_EXPRESSION (exp->val.args[1]);
+ /* FALLTHROUGH */
+ case 1:
+ FREE_EXPRESSION (exp->val.args[0]);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (lval, pexp)
+ YYSTYPE *lval;
+ const char **pexp;
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\0')
+ {
+ *pexp = exp;
+ return YYEOF;
+ }
+
+ if (exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ unsigned long int n = result - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = equal;
+ result = EQUOP2;
+ }
+ else
+ result = YYERRCODE;
+ break;
+
+ case '!':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = not_equal;
+ result = EQUOP2;
+ }
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '<':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = less_or_equal;
+ }
+ else
+ lval->op = less_than;
+ result = CMPOP2;
+ break;
+
+ case '>':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = greater_or_equal;
+ }
+ else
+ lval->op = greater_than;
+ result = CMPOP2;
+ break;
+
+ case '*':
+ lval->op = mult;
+ result = MULOP2;
+ break;
+
+ case '/':
+ lval->op = divide;
+ result = MULOP2;
+ break;
+
+ case '%':
+ lval->op = module;
+ result = MULOP2;
+ break;
+
+ case '+':
+ lval->op = plus;
+ result = ADDOP2;
+ break;
+
+ case '-':
+ lval->op = minus;
+ result = ADDOP2;
+ break;
+
+ case 'n':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case ';':
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (str)
+ const char *str;
+{
+ /* Do nothing. We don't print error messages here. */
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-add.sin
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-add.sin Wed Dec 27 00:14:01 2006
@@ -0,0 +1,31 @@
+# Add this package to a list of references stored in a text file.
+#
+# Copyright (C) 2000 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+#
+# Written by Bruno Haible <haible at clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-del.sin
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/ref-del.sin Wed Dec 27 00:14:01 2006
@@ -0,0 +1,26 @@
+# Remove this package from a list of references stored in a text file.
+#
+# Copyright (C) 2000 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+#
+# Written by Bruno Haible <haible at clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/intl/textdomain.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/intl/textdomain.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,142 @@
+/* Implementation of the textdomain(3) function.
+ Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain. */
+extern const char _nl_default_default_domain[] attribute_hidden;
+
+/* Default text domain in which entries for gettext(3) are to be found. */
+extern const char *_nl_current_default_domain attribute_hidden;
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN libintl_textdomain
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+char *
+TEXTDOMAIN (domainname)
+ const char *domainname;
+{
+ char *new_domain;
+ char *old_domain;
+
+ /* A NULL pointer requests the current setting. */
+ if (domainname == NULL)
+ return (char *) _nl_current_default_domain;
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ old_domain = (char *) _nl_current_default_domain;
+
+ /* If domain name is the null string set to default domain "messages". */
+ if (domainname[0] == '\0'
+ || strcmp (domainname, _nl_default_default_domain) == 0)
+ {
+ _nl_current_default_domain = _nl_default_default_domain;
+ new_domain = (char *) _nl_current_default_domain;
+ }
+ else if (strcmp (domainname, old_domain) == 0)
+ /* This can happen and people will use it to signal that some
+ environment variable changed. */
+ new_domain = old_domain;
+ else
+ {
+ /* If the following malloc fails `_nl_current_default_domain'
+ will be NULL. This value will be returned and so signals we
+ are out of core. */
+#if defined _LIBC || defined HAVE_STRDUP
+ new_domain = strdup (domainname);
+#else
+ size_t len = strlen (domainname) + 1;
+ new_domain = (char *) malloc (len);
+ if (new_domain != NULL)
+ memcpy (new_domain, domainname, len);
+#endif
+
+ if (new_domain != NULL)
+ _nl_current_default_domain = new_domain;
+ }
+
+ /* We use this possibility to signal a change of the loaded catalogs
+ since this is most likely the case and there is no other easy we
+ to do it. Do it only when the call was successful. */
+ if (new_domain != NULL)
+ {
+ ++_nl_msg_cat_cntr;
+
+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+ free (old_domain);
+ }
+
+ __libc_rwlock_unlock (_nl_state_lock);
+
+ return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__textdomain, textdomain);
+#endif
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ChangeLog
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ChangeLog Wed Dec 27 00:14:01 2006
@@ -0,0 +1,29 @@
+2003-09-26 gettextize <bug-gnu-gettext at gnu.org>
+
+ * gettext.m4: Upgrade to gettext-0.11.5.
+ * iconv.m4: Upgrade to gettext-0.11.5.
+ * intdiv0.m4: New file, from gettext-0.11.5.
+ * inttypes.m4: New file, from gettext-0.11.5.
+ * inttypes_h.m4: New file, from gettext-0.11.5.
+ * inttypes-pri.m4: New file, from gettext-0.11.5.
+ * lcmessage.m4: Upgrade to gettext-0.11.5.
+ * lib-link.m4: Upgrade to gettext-0.11.5.
+ * stdint_h.m4: New file, from gettext-0.11.5.
+ * uintmax_t.m4: New file, from gettext-0.11.5.
+ * ulonglong.m4: New file, from gettext-0.11.5.
+ * Makefile.am (EXTRA_DIST): Add the new files.
+
+2003-01-08 gettextize <bug-gnu-gettext at gnu.org>
+
+ * codeset.m4: New file, from gettext-0.11.2.
+ * gettext.m4: New file, from gettext-0.11.2.
+ * glibc21.m4: New file, from gettext-0.11.2.
+ * iconv.m4: New file, from gettext-0.11.2.
+ * isc-posix.m4: New file, from gettext-0.11.2.
+ * lcmessage.m4: New file, from gettext-0.11.2.
+ * lib-ld.m4: New file, from gettext-0.11.2.
+ * lib-link.m4: New file, from gettext-0.11.2.
+ * lib-prefix.m4: New file, from gettext-0.11.2.
+ * progtest.m4: New file, from gettext-0.11.2.
+ * Makefile.am: New file.
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,200 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/bewan_adsl_status
+pkglibdir = $(libdir)/bewan_adsl_status
+pkgincludedir = $(includedir)/bewan_adsl_status
+
+top_builddir = ..
+
+ACLOCAL = aclocal-1.4
+AUTOCONF = autoconf
+AUTOMAKE = automake-1.4
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+BUILD_INCLUDED_LIBINTL = no
+CATOBJEXT = .gmo
+CC = gcc
+DATADIRNAME = share
+GENCAT = gencat
+GLIBC21 = yes
+GMSGFMT = /usr/bin/msgfmt
+GTK_CFLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+GTK_CONFIG = /usr/bin/gtk-config
+GTK_LIBS = -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = .mo
+INTLBISON = bison
+INTLLIBS =
+INTLOBJS =
+INTL_LIBTOOL_SUFFIX_PREFIX =
+LIB = @LIB@
+LIBICONV =
+LIBINTL =
+LTLIB = @LTLIB@
+LTLIBICONV =
+LTLIBINTL =
+MAKEINFO = makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+PACKAGE = bewan_adsl_status
+POSUB = po
+RANLIB = ranlib
+USE_INCLUDED_LIBINTL = no
+USE_NLS = yes
+VERSION = 0.1
+
+EXTRA_DIST = intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = m4
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu m4/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.am
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.am Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+EXTRA_DIST = intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/Makefile.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,200 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LTLIB = @LTLIB@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+PACKAGE = @PACKAGE@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+
+EXTRA_DIST = intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = m4
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu m4/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/codeset.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/codeset.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,23 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/gettext.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/gettext.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,587 @@
+# gettext.m4 serial 17 (gettext-0.11.5)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible at clisp.cons.org>, 2000-2002.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ dnl Add a version number to the cache macros.
+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ gt_cv_func_gnugettext_libc=yes,
+ gt_cv_func_gnugettext_libc=no)])
+
+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ gt_cv_func_gnugettext_libintl,
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ gt_cv_func_gnugettext_libintl=yes,
+ gt_cv_func_gnugettext_libintl=no)
+ dnl Now see whether libintl exists and depends on libiconv.
+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext_libintl=yes
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ && test "$PACKAGE" != gettext; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(INTLOBJS)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the po subdirectory,
+dnl except for USE_NLS.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_OUTPUT_COMMANDS([
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test $ac_cv_header_locale_h = yes; then
+ AM_LC_MESSAGES
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/glibc21.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/glibc21.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,32 @@
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/iconv.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/iconv.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,103 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/intdiv0.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/intdiv0.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,72 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes-pri.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes-pri.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,32 @@
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,27 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+ ])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes_h.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/inttypes_h.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,28 @@
+# inttypes_h.m4 serial 4 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/isc-posix.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/isc-posix.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,26 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lcmessage.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lcmessage.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,32 @@
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-ld.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-ld.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,97 @@
+# lib-ld.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-link.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-link.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,554 @@
+# lib-link.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L,
+dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-prefix.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/lib-prefix.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,148 @@
+# lib-prefix.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/progtest.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/progtest.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,59 @@
+# progtest.m4 serial 2 (gettext-0.10.40)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper at cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/stdint_h.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/stdint_h.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,28 @@
+# stdint_h.m4 serial 2 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_stdint_h=yes,
+ jm_ac_cv_header_stdint_h=no)])
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/uintmax_t.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/uintmax_t.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,29 @@
+# uintmax_t.m4 serial 6 (gettext-0.11)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to `unsigned long' or `unsigned long long'
+# if <inttypes.h> does not exist.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <inttypes.h> and <stdint.h> don't define.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ulonglong.m4
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/m4/ulonglong.m4 Wed Dec 27 00:14:01 2006
@@ -0,0 +1,23 @@
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+ [unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+ ac_cv_type_unsigned_long_long=yes,
+ ac_cv_type_unsigned_long_long=no)])
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the unsigned long long type.])
+ fi
+])
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/missing
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/missing Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+link /usr/share/automake-1.4/missing
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/mkinstalldirs
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/mkinstalldirs Wed Dec 27 00:14:01 2006
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/bewan.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/bewan.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,85 @@
+/* XPM */
+static char *bewan[] =
+{
+/* width height ncolors chars_per_pixel */
+"100 42 35 2",
+/* colors */
+"AA c #FFFFFFFFFFFF",
+"BA c #808080808080",
+"CA c #C0C0DCDCC0C0",
+"DA c #A6A6CACAF0F0",
+"EA c #2A2A3F3FAAAA",
+"FA c #55553F3FAAAA",
+"GA c #55555F5FAAAA",
+"HA c #55555F5FFFFF",
+"IA c #55557F7FAAAA",
+"JA c #55557F7FFFFF",
+"KA c #7F7F5F5FAAAA",
+"LA c #7F7F5F5FFFFF",
+"MA c #7F7F7F7FAAAA",
+"NA c #7F7F7F7FFFFF",
+"OA c #7F7F9F9FAAAA",
+"PA c #7F7F9F9FFFFF",
+"AB c #AAAA7F7FAAAA",
+"BB c #AAAA7F7FFFFF",
+"CB c #AAAA9F9FAAAA",
+"DB c #AAAA9F9FFFFF",
+"EB c #AAAABFBFAAAA",
+"FB c #AAAABFBFFFFF",
+"GB c #AAAADFDFFFFF",
+"HB c #D4D49F9FFFFF",
+"IB c #D4D4BFBFAAAA",
+"JB c #D4D4BFBFFFFF",
+"KB c #D4D4DFDFFFFF",
+"LB c #D4D4FFFFFFFF",
+"MB c #FFFFDFDFFFFF",
+"NB c #CCCCCCCCFFFF",
+"OB c #FFFFCCCCFFFF",
+"PB c #CCCCFFFFFFFF",
+"AC c #2A2A0000AAAA",
+"BC c #2A2A1F1FAAAA",
+"CC c #A0A0A0A0A4A4",
+/* pixels */
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAFBAAKBAAKBAAKBAAKBAAKBCACAGAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAFBAAKBAAKBCAFAEAEAGAKBAAKBAAKBEAEAEAEAFAAAKBAAKBAAGAEAEAEAEAEAFAOAFBCAAAKBAAKBAAMAEAEAGAAAKBAAKBAAGAEAEAEAEADBAAKBAAKBOAEAEAEAEAAA",
+"AAEAEAEAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEACCAAAAAAAAAAEAEAEAGAAAAAAAAAAABAEAEAEAMAAAAAAAAAKBEAEAEAEAEADAAAAAAAAAAAAAAAAAAAJBEAEAGAAAAAAAAAAAAAGAEAEAEAEBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAEAEAEAEAEAEAEAEAEAEAEAEAEANAAAAAAAAAAAGAEAEAPAAAAAAAAAAAJBEAEAEAEBAAAAAAAAOAEAEAEAIAAAAAAAAAAAAAAAAAAAAAAACAEAEAGAAAAAAAAAAAAAAANAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEABBKBKBKBKBKBKBKBKBAAAAAAAAAAAAAAOAEAEAEAEAEAEAEAEAEAEAEAEAEAEAGAAAAAAAAAAANAEAEACCAAAAAAAAAAAAFAEAEAKBAAAAAAAAGAEAEAMAAAAAAAAAAAAAAAAAKBKBKBKBKBGAEAGAAAAAAAAAAAAAAAAAIAEAHBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEABAMAMAMAMAEAEAEAFAMAAAAAAAAAAAOAEAEAEAEAGAMACBDADACBMAGAEAEAEAAAAAAAAAAAOAEAEADAAAAAAAAAAAAAGAEAFAAAAAAAAAAAEAEAFAAAAAAAAAAAAAAAOAMAMAMAMAMAGAEAEAGAAAAAAAAAAAAAAAAACABCCAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEAEAEADBAAAAAAAAAAGAEAEAFADAAAAAAAAAAAAAAAAACAKAEAEBAAAAAAAAFBEAEACAAAAAAAAAAAAACCEAGAAAAAAAAADAEAEAOAAAAAAAAAAACCFAEACCAAAAAAAAFBEAEAGAAAAAAAAAAAAAAAAAAACAJBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAFAKBAAAAAAAAAAFAEAEAEAPBAAAAAAAAAAAAAAAAAAAAAAFAMAAAAAAAAAIBEAEAAAAAAAAAAAAAAAKBEACBAAAAAAAADBEAEAKBAAAAAAAADAEAEAEADAAAAAAAAACCEAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEACAAAAAAAAAAACAEAEAEAMAAAAAAAAAAAAAAAAAAAAAAAAAGAFAAAAAAAAAAAEAGAAAAAAAAAAAAAAAAAEADAAAAAAAAABAEAGAAAAAAAAAAAGAEAEAEACBAAAAAAAAFBEAEAGAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBMAKBAAAAAAAAAAAAGAEAEAEAFBAAAAAAAAFBGAGAAAAAAAAAAAGAEACCAAAAAAAAEABAAAAAAAFBAAAAAAAAGAAAAAAAAAAAGAEAABAAAAAAAAAADBCADBCAKBAAAAAAAACCEAEAGAAAAAAAAAAAGAPAKBAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEACCAAAAAAAAAAAAGAEAEAKBAAAAAAAAFAEAFAAAAAAAAAAAEAEAGAAAAAAAAAMACBAAAAAAABAAAAAAAAOAAAAAAAAAMBEAEAGBAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAGAAAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAFADAAAAAAAAAAAKBFAEAJBAAAAAAAAGAEACAAAAAAAAACBEAEAFAAAAAAAAACBNBAAAAAAGANBAAAAAADBAAAAAAAADAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEACAAAAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEAEAEAEAGAAAAAAAAAAACAEAEBAAAAAAAACAKBAAAAAAAAOAFAEAEAEADAAAAAAAKBAAAAAAAAGABAAAAAAAAAAAAAAAAAIAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAFAJBAAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAKBEAEAEAEAEADBAAAAAAAAAAFAGAAAAAAAAAAAAAAAAAAABBEAEAEAEAEACAAAAAAAAAAAAAAAKBEAGAAAAAAAAAAAAAAAKBEAEAEAKBAAAAAAAAMAMAMAMAMANBAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAEABCBCBCEACCAAAAAAAAAAGAEAKBAAAAAAAAAAAAAACBEAEAEAEAEAEALAAAAAAAAAAAAAAADAEAEAAAAAAAAAAAAAAADAEAEAEAKBAAAAAAAAGABCEAEAEACBAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEAJBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAACAJBCAOBCAAAAAAAAAAAAAGAEAGAAAAAAAAAAAAACCDBOACBGAEAEAEAIAAAAAAAAAAAAAAAABEAEANBAAAAAAAAAAAAGAEAEAEAEBAAAAAAAAMAEAEAEAEAFBAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEAEBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAEAEAMAAAAAAAAAAAAAAAAAAAGAEAEAEAFAAAAAAAAAAAAAAAGAEAEACAAAAAAAAAAAAAEAEAEAEAMAAAAAAAAANBEAEAEAEADAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAAAAACAGAEAEAEAEANACAAAAAAAAAAAAAFBEAEAEAEAEAFBAAAAAAAAAADAEAEAEANAAAAAAAAAAACAEAEAEAEAEAAAAAAAAAAAMAEAEAEADAAAAAAAAAEBEAEAGAAAAAAAAAAAGAEAEAEAEADBAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAKBAAAAAAAAAAAAAAAAAAAAAAKBMAEAEAEAEAEAEAEAEAKAKBAAAAAAAAGAEAEAEAEAEABAAAAAAAAAAAOAEAEAEAIAAAAAAAAAAADBEAEAEAEAEAFBAAAAAAAAAAEAEAEADAAAAAAAAADBEAEAGAAAAAAAAAAAGAEAEAEAEACAAAAAAAAAOAEAEAEAEAAA",
+"AAEAEAEAEAGAGAGAGAGAGAGAGAGAGAGAFAEAEAEAEAEAEAEAEAEAEAEAEAGAGAGAGAEAEAEAEAEAEAEAGAGAGAGAGAFAEAEAEAGAGAGAGAGAGAEAEAEAEAEAEAMAAAAAAAAAAAGAEAEAGAGAGAGAGAGAEAEAEAGAGAGAGAGAEAEAEAEAEAFAGAGAGAGAGAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAFAKBAAKBIAFAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAGAOAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAAA",
+"AACBKBAAAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAAKBAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAAAKBAAAAKBAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAAAKBAAKBAAKBAAKBAAAAKBAAAAKBAAAANAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCAA",
+"AACBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAKBCAFBIBNBCACANBAAAAKBCAFBCAAAAAAAAACAFBCCAAAAAAAADBCACAJBCACAFBKBAAKBCADBMAGAEAMACAAAAAAAAAAAKBCAKBEBDBEBAAAAAAKBCACAEBDBCAAAKBCADBCCNBAAAAAACAJBCCDBAAAAAAAAKBCACACAJBCACAFBKBAAAACBAA",
+"AACBAAAAAAAAAACAEABCKBAAAAJBGAGAAAKBOABCEAEAFBAAAAKBEABCEADBAACAEAEAFAAAAAAAMAEAKBAACBMAGAEAEAGAMAKBAAAAKBCBGAGAJBAAJAEABCNAAAAAKBEAACEAEAAACBGAEAEAEAGAAAKBGAEABCEAEAKAAAAAKBFAACBBAAAAKBFAEAKBAAAAPAAA",
+"AAPAAAAAAAAAAAHAEAEABAKBAAAAAAFBAAAAAAFAEAEAMAAAAAAAKBKAEACAAAMAEAEAEAIBAAAAAAMAAAAAAAKBEAEAEACCAAAAAAKBGABCEAKBAAAAGAEAEACAAAAAAAEAEAEACBCBFBKBEAEAEAABCBMAKBMAEAEAEACBAAAACBEAEAIAAAAAAAKBBAAAAAAACBAA",
+"AACBAAAAAAAAAACAKAEAEAEAMACAAAAAAAAAAAGAEAEAFAAAAAAAKBPACAAAAAKBKAEAEAEAGACCAAAAAAAACAGAEAEAGAAAAAAAMAEAEAFADACADBGAMACCKBAAAAAAGAEAEAFADBAAKBGAEAEAEAPACAAANBEAEAEABAAAAAAAAAMAEAEAEAKACAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAADBEAEAEAACCBAAAAAAAAABEAEAEAKBAACBGAKBAAAAAAAAAAJBBAEAEAEANAAAAAAAFAEAEAGAAAAAAADBEAEAEAGBNBNBAAAAAAAAAAAAAADAEAEAEAPAAAAAGAEAEAEADAAAAAAAIAEAEAGAAAAAAAAAAAAAKBGAEAEAEAFBAAAAAAAACBAA",
+"AACBAAAAAAMAGAKBAAAAAANAEAEADBAAAAAAAACCEAEAEADBCCCAMBAAAADBIAKBAAAAAADBEAEACBAAAABBEAEAEAJBCAKBAACCEAEAEAOACAMBCACACAJBAAAACAFAEAEAMAAAAACCEAEAEACAAAAAAACBEAEAEACCDAAACCJAKBAAAAAAMAEAEACAAAAAAAAAPAAA",
+"AAPAAAAAKBGABAGAOADACBBACCAAAAAAAAAAAAGBEAEAEAMAAAAAAAAAAAMABAGAABDADABAMANBAAAAAAOAEAEAGAOAJBAAAAAACBGAFAEAEAFAMACBOBAAAAAAGAGAGAGAAAAAAAMAGAGABAAAAAAAAAOAEAFAGADBAAAAPABAGABADACCMAKAKBAAAAAAAAAACBAA",
+"AACBAAAAAAAAAAAAKBKBKBAAAAAAAAAAAAAAAACBBCFAKBAAAAAAAAAAAAAAAAAALBKBKBKBAAAAAAAAAAAAAAKBAAAAAAAAAAAAAAAAAAKBMBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBPBAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAACAIAGANACACAABCBLBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAA",
+"AACBAAAAAAAAAAAAAAAAAAAAAAJBGAFAGAMAHBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAA",
+"AAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAA",
+"AAGADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOADBOAHAAA",
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/green_led.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/green_led.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,24 @@
+/* XPM */
+static char *green_led[] =
+{
+/* width height ncolors chars_per_pixel */
+"8 11 5 1",
+/* colors */
+"A c #CCCCCCCCCCCC",
+"B c #3333FFFF9999",
+"C c #333399996666",
+"D c #0000BBBB0000",
+"E c #000000000000",
+/* pixels */
+"AEEEEEEA",
+"EBBBBBAE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EBDDDDCE",
+"EACCCCCE",
+"AEEEEEEA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/red_led.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/pixmaps/red_led.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+/* XPM */
+static char *red_led[] =
+{
+/* width height ncolors chars_per_pixel */
+"8 11 6 1",
+/* colors */
+"A c #FFFFFFFFFFFF",
+"B c #AAAA00000000",
+"C c #FFFF00000000",
+"D c #CCCC99996666",
+"E c #DDDD00000000",
+"F c #000000000000",
+/* pixels */
+"AFFFFFFA",
+"FCCCCCDF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FDBBBBBF",
+"AFFFFFFA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/ChangeLog
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/ChangeLog Wed Dec 27 00:14:01 2006
@@ -0,0 +1,11 @@
+2003-01-08 gettextize <bug-gnu-gettext at gnu.org>
+
+ * Makefile.in.in: New file, from gettext-0.11.2.
+ * boldquot.sed: New file, from gettext-0.11.2.
+ * en at boldquot.header: New file, from gettext-0.11.2.
+ * en at quot.header: New file, from gettext-0.11.2.
+ * insert-header.sin: New file, from gettext-0.11.2.
+ * quot.sed: New file, from gettext-0.11.2.
+ * remove-potcdate.sin: New file, from gettext-0.11.2.
+ * Rules-quot: New file, from gettext-0.11.2.
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,390 @@
+# Generated automatically from Makefile.in.in by configure.
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+
+PACKAGE = bewan_adsl_status
+VERSION = 0.1
+
+SHELL = /bin/sh
+
+
+srcdir = .
+top_srcdir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+datadir = ${prefix}/share
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+MKINSTALLDIRS = ./mkinstalldirs
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+GMSGFMT = /usr/bin/msgfmt
+MSGFMT = /usr/bin/msgfmt
+XGETTEXT = /usr/bin/xgettext
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = /usr/bin/msgmerge --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = fr.po it.po
+GMOFILES = fr.gmo it.gmo
+UPDATEPOFILES = fr.po-update it.po-update
+DUMMYPOFILES = fr.nop it.nop
+DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+ ../src/main.c \
+ ../src/interface.c \
+ ../src/callbacks.c \
+ ../src/support.c \
+ ../src/status.c \
+ ../strings.c
+
+CATALOGS = fr.gmo it.gmo
+
+# Makevars gets inserted here. (Don't remove this line!)
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = BeWAN systems
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-yes
+
+all-yes: $(CATALOGS)
+all-no:
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)'
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common); do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ for file in $(DISTFILES.common); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir); \
+ else \
+ cp -p $(srcdir)/$$file $(distdir); \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en at quot.header en at boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en at quot.po-update: en at quot.po-update-en
+en at boldquot.po-update: en at boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en at quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en at quot.header/g' $(srcdir)/insert-header.sin > en at quot.insert-header
+
+en at boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en at boldquot.header/g' $(srcdir)/insert-header.sin > en at boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,317 @@
+# Generated automatically from Makefile.in.in by configure.
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+
+PACKAGE = bewan_adsl_status
+VERSION = 0.1
+
+SHELL = /bin/sh
+
+
+srcdir = .
+top_srcdir = ..
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+datadir = ${prefix}/share
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+MKINSTALLDIRS = ./mkinstalldirs
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+GMSGFMT = /usr/bin/msgfmt
+MSGFMT = /usr/bin/msgfmt
+XGETTEXT = /usr/bin/xgettext
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = /usr/bin/msgmerge --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-yes
+
+all-yes: $(CATALOGS)
+all-no:
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)'
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common); do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-yes
+ if test "$(PACKAGE)" = "gettext"; then \
+ for file in $(DISTFILES.common); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir); \
+ else \
+ cp -p $(srcdir)/$$file $(distdir); \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makefile.in.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,317 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)'
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data- at USE_NLS@
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common); do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data- at USE_NLS@
+ if test "$(PACKAGE)" = "gettext"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data- at USE_NLS@
+ if test "$(PACKAGE)" = "gettext"; then \
+ for file in $(DISTFILES.common); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir); \
+ else \
+ cp -p $(srcdir)/$$file $(distdir); \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = BeWAN systems
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars.template
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Makevars.template Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES Wed Dec 27 00:14:01 2006
@@ -0,0 +1,6 @@
+ ../src/main.c \
+ ../src/interface.c \
+ ../src/callbacks.c \
+ ../src/support.c \
+ ../src/status.c \
+ ../strings.c
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/POTFILES.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,8 @@
+# List of source files containing translatable strings.
+
+src/main.c
+src/interface.c
+src/callbacks.c
+src/support.c
+src/status.c
+strings.c
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/Rules-quot
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/Rules-quot Wed Dec 27 00:14:01 2006
@@ -0,0 +1,42 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en at quot.header en at boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en at quot.po-update: en at quot.po-update-en
+en at boldquot.po-update: en at boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en at quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en at quot.header/g' $(srcdir)/insert-header.sin > en at quot.insert-header
+
+en at boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en at boldquot.header/g' $(srcdir)/insert-header.sin > en at boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/bewan_adsl_status.pot
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/bewan_adsl_status.pot Wed Dec 27 00:14:01 2006
@@ -0,0 +1,526 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR BeWAN systems
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-03-10 15:23+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/interface.c:215 strings.c:7
+msgid "BeWAN ADSL"
+msgstr ""
+
+#: src/interface.c:234 strings.c:8
+msgid "Actual bit rate (Kbps)"
+msgstr ""
+
+#: src/interface.c:252 strings.c:9
+msgid "Far End Fast Channel:"
+msgstr ""
+
+#: src/interface.c:264 strings.c:10
+msgid "Near End Interleaved Channel:"
+msgstr ""
+
+#: src/interface.c:276 strings.c:11
+msgid "Far End Interleaved Channel:"
+msgstr ""
+
+#: src/interface.c:288 strings.c:12
+msgid "Near End Fast Channel:"
+msgstr ""
+
+#: src/interface.c:348 strings.c:13
+msgid "Line State"
+msgstr ""
+
+#: src/interface.c:366 strings.c:14
+msgid "Start"
+msgstr ""
+
+#: src/interface.c:376 strings.c:15
+msgid "Stop"
+msgstr ""
+
+#: src/interface.c:399 src/interface.c:1853 strings.c:16 strings.c:81
+msgid "\n"
+msgstr ""
+
+#: src/interface.c:435 strings.c:18
+msgid "Remote report:"
+msgstr ""
+
+#: src/interface.c:447 strings.c:19
+msgid "Last failure:"
+msgstr ""
+
+#: src/interface.c:459 strings.c:20
+msgid "Time connected:"
+msgstr ""
+
+#: src/interface.c:471 strings.c:21
+msgid "Modem state:"
+msgstr ""
+
+#: src/interface.c:493 strings.c:22
+msgid "State"
+msgstr ""
+
+#: src/interface.c:509 strings.c:23
+msgid "Power"
+msgstr ""
+
+#: src/interface.c:537 strings.c:24
+msgid "SNR"
+msgstr ""
+
+#: src/interface.c:549 strings.c:25
+msgid "Echo+Noise"
+msgstr ""
+
+#: src/interface.c:561 strings.c:26
+msgid "Rx Path"
+msgstr ""
+
+#: src/interface.c:573 strings.c:27
+msgid "Operational Data"
+msgstr ""
+
+#: src/interface.c:591 strings.c:28
+msgid "UpStream"
+msgstr ""
+
+#: src/interface.c:649 strings.c:29
+msgid "Capacity Occupation (%)"
+msgstr ""
+
+#: src/interface.c:661 strings.c:30
+msgid "Noise Margin (dB)"
+msgstr ""
+
+#: src/interface.c:673 strings.c:31
+msgid "Output Power (dBm)"
+msgstr ""
+
+#: src/interface.c:685 strings.c:32
+msgid "DownStream"
+msgstr ""
+
+#: src/interface.c:743 strings.c:33
+msgid "Attenuation (dB)"
+msgstr ""
+
+#: src/interface.c:755 src/interface.c:1781 strings.c:34 strings.c:76
+msgid "Modulation:"
+msgstr ""
+
+#: src/interface.c:778 strings.c:35
+msgid "Line"
+msgstr ""
+
+#: src/interface.c:794 strings.c:36
+msgid "Fast Channel Error Counters"
+msgstr ""
+
+#: src/interface.c:812 src/interface.c:974 strings.c:37 strings.c:43
+msgid "Local"
+msgstr ""
+
+#: src/interface.c:866 src/interface.c:1028 strings.c:38 strings.c:44
+msgid "Distant"
+msgstr ""
+
+#: src/interface.c:920 src/interface.c:1082 strings.c:39 strings.c:45
+msgid "Forward Error Corrections (FEC)"
+msgstr ""
+
+#: src/interface.c:932 src/interface.c:1094 strings.c:40 strings.c:46
+msgid "Cyclic Redundancy Checks (CRC)"
+msgstr ""
+
+#: src/interface.c:944 src/interface.c:1106 strings.c:41 strings.c:47
+msgid "Cyclic Header Error Check (HEC)"
+msgstr ""
+
+#: src/interface.c:956 strings.c:42
+msgid "Interleaved Channel Error Counters"
+msgstr ""
+
+#: src/interface.c:1118 strings.c:48
+msgid "Errors"
+msgstr ""
+
+#: src/interface.c:1134 strings.c:49
+msgid "Near End Defects Detected"
+msgstr ""
+
+#: src/interface.c:1162 src/interface.c:1344 strings.c:50 strings.c:56
+msgid "Loss of Margin (LoM)"
+msgstr ""
+
+#: src/interface.c:1241 src/interface.c:1475 strings.c:51 strings.c:59
+msgid "Loss of Signal (LoS)"
+msgstr ""
+
+#: src/interface.c:1253 src/interface.c:1394 strings.c:52 strings.c:57
+msgid "Loss of Power (LoP)"
+msgstr ""
+
+#: src/interface.c:1265 src/interface.c:1406 strings.c:53 strings.c:58
+msgid "Loss of Frame (LoF)"
+msgstr ""
+
+#: src/interface.c:1277 src/interface.c:1487 strings.c:54 strings.c:60
+msgid "Loss of Cell Delineation (LoCD)"
+msgstr ""
+
+#: src/interface.c:1307 strings.c:55
+msgid "Far End Defects detected"
+msgstr ""
+
+#: src/interface.c:1499 strings.c:61
+msgid "Dying Gasp message received"
+msgstr ""
+
+#: src/interface.c:1511 strings.c:62
+msgid "Defects"
+msgstr ""
+
+#: src/interface.c:1527 strings.c:63
+msgid "ATM maintenance indicators (OAM-F5)"
+msgstr ""
+
+#: src/interface.c:1565 src/interface.c:1805 strings.c:64 strings.c:78
+msgid "VCI:"
+msgstr ""
+
+#: src/interface.c:1577 strings.c:65
+msgid "Reset Counters"
+msgstr ""
+
+#: src/interface.c:1587 strings.c:66
+msgid "Receive counters"
+msgstr ""
+
+#: src/interface.c:1605 strings.c:67
+msgid "Remote Defect Indication cells (RDI):"
+msgstr ""
+
+#: src/interface.c:1617 strings.c:68
+msgid "Alarm Indication Signal cells (AIS):"
+msgstr ""
+
+#: src/interface.c:1629 strings.c:69
+msgid "Far-end loopback cells (LB):"
+msgstr ""
+
+#: src/interface.c:1641 strings.c:70
+msgid "Near-end loopback cells (LB):"
+msgstr ""
+
+#: src/interface.c:1653 strings.c:71
+msgid "Continuity Check cells (CC):"
+msgstr ""
+
+#: src/interface.c:1725 strings.c:72
+msgid "Generate looback cells (OAM-F5 LB cells)"
+msgstr ""
+
+#: src/interface.c:1735 src/interface.c:1793 strings.c:73 strings.c:77
+msgid "VPI:"
+msgstr ""
+
+#: src/interface.c:1747 strings.c:74
+msgid "Test"
+msgstr ""
+
+#: src/interface.c:1763 strings.c:75
+msgid "Installed Profile"
+msgstr ""
+
+#: src/interface.c:1817 strings.c:79
+msgid "Encapsulation:"
+msgstr ""
+
+#: src/interface.c:1829 strings.c:80
+msgid "Protocol:"
+msgstr ""
+
+#: src/interface.c:1901 strings.c:83
+msgid "Config"
+msgstr ""
+
+#: src/interface.c:1917 strings.c:84
+msgid "ADSL Package Information"
+msgstr ""
+
+#: src/interface.c:1935 strings.c:85
+msgid "Package Name:"
+msgstr ""
+
+#: src/interface.c:1947 strings.c:86
+msgid "Package Version:"
+msgstr ""
+
+#: src/interface.c:1959 strings.c:87
+msgid "Firmware Version:"
+msgstr ""
+
+#: src/interface.c:1971 strings.c:88
+msgid "Manufacturer:"
+msgstr ""
+
+#: src/interface.c:1983 strings.c:89
+msgid "Copyright:"
+msgstr ""
+
+#: src/interface.c:2055 strings.c:90
+msgid "Far End Modem Identification"
+msgstr ""
+
+#: src/interface.c:2073 strings.c:91
+msgid "ITU Revision Number:"
+msgstr ""
+
+#: src/interface.c:2085 strings.c:92
+msgid "Vendor Specific Info:"
+msgstr ""
+
+#: src/interface.c:2097 strings.c:93
+msgid "Vendor Country Code:"
+msgstr ""
+
+#: src/interface.c:2142 strings.c:94
+msgid "Vendor Code:"
+msgstr ""
+
+#: src/interface.c:2175 strings.c:95
+msgid "Info"
+msgstr ""
+
+#: src/support.c:121
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr ""
+
+#: src/support.c:130
+#, c-format
+msgid "Error loading pixmap file: %s"
+msgstr ""
+
+#: src/status.c:123
+msgid "IDLE"
+msgstr ""
+
+#: src/status.c:124
+msgid "L3"
+msgstr ""
+
+#: src/status.c:125
+msgid "LISTENING"
+msgstr ""
+
+#: src/status.c:126
+msgid "ACTIVATING"
+msgstr ""
+
+#: src/status.c:127
+msgid "Ghs_HANDSHAKING"
+msgstr ""
+
+#: src/status.c:128
+msgid "ANSI_HANDSHAKING"
+msgstr ""
+
+#: src/status.c:129
+msgid "INITIALIZING"
+msgstr ""
+
+#: src/status.c:130
+msgid "RESTARTING"
+msgstr ""
+
+#: src/status.c:131
+msgid "FAST_RETRAIN"
+msgstr ""
+
+#: src/status.c:132
+msgid "SHOWTIME_L0"
+msgstr ""
+
+#: src/status.c:133
+msgid "SHOWTIME_LQ"
+msgstr ""
+
+#: src/status.c:134
+msgid "SHOWTIME_L1"
+msgstr ""
+
+#: src/status.c:135
+msgid "EXCHANGE"
+msgstr ""
+
+#: src/status.c:136
+msgid "TRUNCATE"
+msgstr ""
+
+#: src/status.c:137
+msgid "ESCAPE"
+msgstr ""
+
+#: src/status.c:138
+msgid "RETRY"
+msgstr ""
+
+#: src/status.c:139
+msgid "DISORDERLY"
+msgstr ""
+
+#: src/status.c:140 src/status.c:160 src/status.c:185 src/status.c:195
+msgid " "
+msgstr ""
+
+#: src/status.c:147
+msgid "Peer ATU Found"
+msgstr ""
+
+#: src/status.c:148
+msgid "Restart Request"
+msgstr ""
+
+#: src/status.c:149
+msgid "Activation Request"
+msgstr ""
+
+#: src/status.c:150
+msgid "Initializing"
+msgstr ""
+
+#: src/status.c:151
+msgid "Showtime"
+msgstr ""
+
+#: src/status.c:152
+msgid "L3 Executed"
+msgstr ""
+
+#: src/status.c:153
+msgid "L3 Rejected"
+msgstr ""
+
+#: src/status.c:154
+msgid "L1 Executed"
+msgstr ""
+
+#: src/status.c:155
+msgid "L1 Rejected"
+msgstr ""
+
+#: src/status.c:156
+msgid "L0 Rejected"
+msgstr ""
+
+#: src/status.c:157
+msgid "Restart Acceptable"
+msgstr ""
+
+#: src/status.c:158
+msgid "Suicide Request"
+msgstr ""
+
+#: src/status.c:159
+msgid "Restart Not Acceptable"
+msgstr ""
+
+#: src/status.c:167
+msgid "Uncompatible Line Conditions"
+msgstr ""
+
+#: src/status.c:168
+msgid "No Lock Possible"
+msgstr ""
+
+#: src/status.c:169
+msgid "Protocol Error"
+msgstr ""
+
+#: src/status.c:170
+msgid "Message Error"
+msgstr ""
+
+#: src/status.c:171
+msgid "Spurious ATU Detected"
+msgstr ""
+
+#: src/status.c:172
+msgid "Requested Bit Rate Too High"
+msgstr ""
+
+#: src/status.c:173
+msgid "Interleaved Profile Required for LITE"
+msgstr ""
+
+#: src/status.c:174
+msgid "Forced Silence"
+msgstr ""
+
+#: src/status.c:175
+msgid "Unselectable Operation Mode"
+msgstr ""
+
+#: src/status.c:176
+msgid "State Refused By Golden"
+msgstr ""
+
+#: src/status.c:177
+msgid "Activation Timeout"
+msgstr ""
+
+#: src/status.c:178
+msgid "Initialization Timeout"
+msgstr ""
+
+#: src/status.c:179
+msgid "Bringing Down Line due to persistent faults"
+msgstr ""
+
+#: src/status.c:180
+msgid "Retry"
+msgstr ""
+
+#: src/status.c:181
+msgid "Unknown"
+msgstr ""
+
+#: src/status.c:182
+msgid "Unknown failure"
+msgstr ""
+
+#: src/status.c:183 src/status.c:1093
+msgid "No hardware detected"
+msgstr ""
+
+#: src/status.c:184
+msgid "USB bandwidth unavailable"
+msgstr ""
+
+#: src/status.c:192
+msgid "ANSI"
+msgstr ""
+
+#: src/status.c:193
+msgid "G.lite"
+msgstr ""
+
+#: src/status.c:194
+msgid "G.dmt"
+msgstr ""
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/boldquot.sed
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/boldquot.sed Wed Dec 27 00:14:01 2006
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/â\1â/g
+s/`\([^`']*\)'/â\1â/g
+s/ '\([^`']*\)' / â\1â /g
+s/ '\([^`']*\)'$/ â\1â/g
+s/^'\([^`']*\)' /â\1â /g
+s/ââ/""/g
+s/â/â[1m/g
+s/â/[0mâ/g
+s/â/â[1m/g
+s/â/[0mâ/g
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at boldquot.header
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at boldquot.header Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at quot.header
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/en at quot.header Wed Dec 27 00:14:01 2006
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/fr.gmo
==============================================================================
Binary file. No diff available.
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/fr.po
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/fr.po Wed Dec 27 00:14:01 2006
@@ -0,0 +1,524 @@
+# bewan_adsl_status (fr).
+# Copyright (C) 2003 BeWAN systems.
+# Frode Isaksen <fisaksen at bewan.com>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"PO-Revision-Date: 2003-04-02 16:31+0200\n"
+"Last-Translator: Frode Isaksen <fisaksen at bewan.com>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+
+#: src/interface.c:215 strings.c:7
+msgid "BeWAN ADSL"
+msgstr "BeWAN ADSL"
+
+#: src/interface.c:234 strings.c:8
+msgid "Actual bit rate (Kbps)"
+msgstr "Débit réel brut (Kbits/seconde)"
+
+#: src/interface.c:252 strings.c:9
+msgid "Far End Fast Channel:"
+msgstr "Chemin rapide local"
+
+#: src/interface.c:264 strings.c:10
+msgid "Near End Interleaved Channel:"
+msgstr "Chemin rapide distant"
+
+#: src/interface.c:276 strings.c:11
+msgid "Far End Interleaved Channel:"
+msgstr "Chemin intercalé local"
+
+#: src/interface.c:288 strings.c:12
+msgid "Near End Fast Channel:"
+msgstr "Chemin intercalé distant"
+
+#: src/interface.c:348 strings.c:13
+msgid "Line State"
+msgstr "État de la ligne"
+
+#: src/interface.c:366 strings.c:14
+msgid "Start"
+msgstr "Démarrer"
+
+#: src/interface.c:376 strings.c:15
+msgid "Stop"
+msgstr "Arréter"
+
+#: src/interface.c:399 src/interface.c:1853 strings.c:16 strings.c:81
+msgid "\n"
+msgstr "\n"
+
+#: src/interface.c:435 strings.c:18
+msgid "Remote report:"
+msgstr "Rapport distant:"
+
+#: src/interface.c:447 strings.c:19
+msgid "Last failure:"
+msgstr "Dernier échec:"
+
+#: src/interface.c:459 strings.c:20
+msgid "Time connected:"
+msgstr "Temps de connexion:"
+
+#: src/interface.c:471 strings.c:21
+msgid "Modem state:"
+msgstr "État du modem:"
+
+#: src/interface.c:493 strings.c:22
+msgid "State"
+msgstr "État"
+
+#: src/interface.c:509 strings.c:23
+msgid "Power"
+msgstr "Énergie"
+
+#: src/interface.c:537 strings.c:24
+msgid "SNR"
+msgstr "SNR"
+
+#: src/interface.c:549 strings.c:25
+msgid "Echo+Noise"
+msgstr "Echo+Noise"
+
+#: src/interface.c:561 strings.c:26
+msgid "Rx Path"
+msgstr "Rx Path"
+
+#: src/interface.c:573 strings.c:27
+msgid "Operational Data"
+msgstr "Données opérationelles"
+
+#: src/interface.c:591 strings.c:28
+msgid "UpStream"
+msgstr "Montant"
+
+#: src/interface.c:649 strings.c:29
+msgid "Capacity Occupation (%)"
+msgstr "Capacité d'occupation (%)"
+
+#: src/interface.c:661 strings.c:30
+msgid "Noise Margin (dB)"
+msgstr "Marge du bruit (dB)"
+
+#: src/interface.c:673 strings.c:31
+msgid "Output Power (dBm)"
+msgstr "Energie sortante (dBm)"
+
+#: src/interface.c:685 strings.c:32
+msgid "DownStream"
+msgstr "Descendant"
+
+#: src/interface.c:743 strings.c:33
+msgid "Attenuation (dB)"
+msgstr "Attenuation (dB)"
+
+#: src/interface.c:755 src/interface.c:1781 strings.c:34 strings.c:76
+msgid "Modulation:"
+msgstr "Modulation:"
+
+#: src/interface.c:778 strings.c:35
+msgid "Line"
+msgstr "Ligne"
+
+#: src/interface.c:794 strings.c:36
+msgid "Fast Channel Error Counters"
+msgstr "Compteurs d'erreurs du chemin rapide"
+
+#: src/interface.c:812 src/interface.c:974 strings.c:37 strings.c:43
+msgid "Local"
+msgstr "Local"
+
+#: src/interface.c:866 src/interface.c:1028 strings.c:38 strings.c:44
+msgid "Distant"
+msgstr "Distant"
+
+#: src/interface.c:920 src/interface.c:1082 strings.c:39 strings.c:45
+msgid "Forward Error Corrections (FEC)"
+msgstr "Contrôle d'erreurs en aval (FEC)"
+
+#: src/interface.c:932 src/interface.c:1094 strings.c:40 strings.c:46
+msgid "Cyclic Redundancy Checks (CRC)"
+msgstr "C. de redondance Cyclique (CRC)"
+
+#: src/interface.c:944 src/interface.c:1106 strings.c:41 strings.c:47
+msgid "Cyclic Header Error Check (HEC)"
+msgstr "Contrôle d'erreurs d'en tète (HEC)"
+
+#: src/interface.c:956 strings.c:42
+msgid "Interleaved Channel Error Counters"
+msgstr "Compteurs d'erreurs du chemin intercalé"
+
+#: src/interface.c:1118 strings.c:48
+msgid "Errors"
+msgstr "Erreurs"
+
+#: src/interface.c:1134 strings.c:49
+msgid "Near End Defects Detected"
+msgstr "Défauts détectés du modem local"
+
+#: src/interface.c:1162 src/interface.c:1344 strings.c:50 strings.c:56
+msgid "Loss of Margin (LoM)"
+msgstr "Perte de marge (LoM)"
+
+#: src/interface.c:1241 src/interface.c:1475 strings.c:51 strings.c:59
+msgid "Loss of Signal (LoS)"
+msgstr "Perte de signal (LoS)"
+
+#: src/interface.c:1253 src/interface.c:1394 strings.c:52 strings.c:57
+msgid "Loss of Power (LoP)"
+msgstr "Perte d'énergie (LoP)"
+
+#: src/interface.c:1265 src/interface.c:1406 strings.c:53 strings.c:58
+msgid "Loss of Frame (LoF)"
+msgstr "Perte de trame (LoF)"
+
+#: src/interface.c:1277 src/interface.c:1487 strings.c:54 strings.c:60
+msgid "Loss of Cell Delineation (LoCD)"
+msgstr "Perte de synchro cellule(LoCD)"
+
+#: src/interface.c:1307 strings.c:55
+msgid "Far End Defects detected"
+msgstr "Défauts détectés du modem distant"
+
+#: src/interface.c:1499 strings.c:61
+msgid "Dying Gasp message received"
+msgstr "Message: Dying Gasp"
+
+#: src/interface.c:1511 strings.c:62
+msgid "Defects"
+msgstr "Défauts"
+
+#: src/interface.c:1527 strings.c:63
+msgid "ATM maintenance indicators (OAM-F5)"
+msgstr "Indicateurs de maintenance ATM (OAM-F5)"
+
+#: src/interface.c:1565 src/interface.c:1805 strings.c:64 strings.c:78
+msgid "VCI:"
+msgstr "VCI:"
+
+#: src/interface.c:1577 strings.c:65
+msgid "Reset Counters"
+msgstr "RAZ compteurs"
+
+#: src/interface.c:1587 strings.c:66
+msgid "Receive counters"
+msgstr "Compteurs de réception"
+
+#: src/interface.c:1605 strings.c:67
+msgid "Remote Defect Indication cells (RDI):"
+msgstr "Cellules d'indication de défaut distant (RDI):"
+
+#: src/interface.c:1617 strings.c:68
+msgid "Alarm Indication Signal cells (AIS):"
+msgstr "Cellules d'indication d'alarme (AIS):"
+
+#: src/interface.c:1629 strings.c:69
+msgid "Far-end loopback cells (LB):"
+msgstr "Cellules de test en bouclage distant (LB):"
+
+#: src/interface.c:1641 strings.c:70
+msgid "Near-end loopback cells (LB):"
+msgstr "Cellules de test en bouclage local (LB):"
+
+#: src/interface.c:1653 strings.c:71
+msgid "Continuity Check cells (CC):"
+msgstr "Cellules de test de continuité (CC):"
+
+#: src/interface.c:1725 strings.c:72
+msgid "Generate looback cells (OAM-F5 LB cells)"
+msgstr "Envoyer de cellules de test en bouclage distant (LB)"
+
+#: src/interface.c:1735 src/interface.c:1793 strings.c:73 strings.c:77
+msgid "VPI:"
+msgstr "VPI:"
+
+#: src/interface.c:1747 strings.c:74
+msgid "Test"
+msgstr "Test"
+
+#: src/interface.c:1763 strings.c:75
+msgid "Installed Profile"
+msgstr "Profile installé"
+
+#: src/interface.c:1817 strings.c:79
+msgid "Encapsulation:"
+msgstr "Encapsulation:"
+
+#: src/interface.c:1829 strings.c:80
+msgid "Protocol:"
+msgstr "Protocole:"
+
+#: src/interface.c:1901 strings.c:83
+msgid "Config"
+msgstr "Config"
+
+#: src/interface.c:1917 strings.c:84
+msgid "ADSL Package Information"
+msgstr "Information sur les pilotes ADSL"
+
+#: src/interface.c:1935 strings.c:85
+msgid "Package Name:"
+msgstr "Nom:"
+
+#: src/interface.c:1947 strings.c:86
+msgid "Package Version:"
+msgstr "Version pilote:"
+
+#: src/interface.c:1959 strings.c:87
+msgid "Firmware Version:"
+msgstr "Version modem:"
+
+#: src/interface.c:1971 strings.c:88
+msgid "Manufacturer:"
+msgstr "Constructeur:"
+
+#: src/interface.c:1983 strings.c:89
+msgid "Copyright:"
+msgstr "Copyright:"
+
+#: src/interface.c:2055 strings.c:90
+msgid "Far End Modem Identification"
+msgstr "Identification du modem distant"
+
+#: src/interface.c:2073 strings.c:91
+msgid "ITU Revision Number:"
+msgstr "Numéro du révision ITU:"
+
+#: src/interface.c:2085 strings.c:92
+msgid "Vendor Specific Info:"
+msgstr "Info spécifique fournisseur:"
+
+#: src/interface.c:2097 strings.c:93
+msgid "Vendor Country Code:"
+msgstr "Code pays du fournisseur:"
+
+#: src/interface.c:2142 strings.c:94
+msgid "Vendor Code:"
+msgstr "Code du fournisseur:"
+
+#: src/interface.c:2175 strings.c:95
+msgid "Info"
+msgstr "Info"
+
+#: src/support.c:121
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Fichier pixmap introuvable: %s"
+
+#: src/support.c:130
+#, c-format
+msgid "Error loading pixmap file: %s"
+msgstr "Erreur de chargement du fichier pixmap: %s"
+
+#: src/status.c:123
+msgid "IDLE"
+msgstr "REPOS"
+
+#: src/status.c:124
+msgid "L3"
+msgstr "L3"
+
+#: src/status.c:125
+msgid "LISTENING"
+msgstr "EN ECOUTE"
+
+#: src/status.c:126
+msgid "ACTIVATING"
+msgstr "ACTIVATION"
+
+#: src/status.c:127
+msgid "Ghs_HANDSHAKING"
+msgstr "NEGOCIATION"
+
+#: src/status.c:128
+msgid "ANSI_HANDSHAKING"
+msgstr "NEGOCIATION"
+
+#: src/status.c:129
+msgid "INITIALIZING"
+msgstr "INITIALISATION"
+
+#: src/status.c:130
+msgid "RESTARTING"
+msgstr "REDEMARRAGE"
+
+#: src/status.c:131
+msgid "FAST_RETRAIN"
+msgstr "RECYCLE_RAPIDE"
+
+#: src/status.c:132
+msgid "SHOWTIME_L0"
+msgstr "CONNECTE_L0"
+
+#: src/status.c:133
+msgid "SHOWTIME_LQ"
+msgstr "CONNECTE_L0"
+
+#: src/status.c:134
+msgid "SHOWTIME_L1"
+msgstr "CONNECTE_L1"
+
+#: src/status.c:135
+msgid "EXCHANGE"
+msgstr "ECHANGE"
+
+#: src/status.c:136
+msgid "TRUNCATE"
+msgstr "TRONCATURE"
+
+#: src/status.c:137
+msgid "ESCAPE"
+msgstr "ECHAPPEMENT"
+
+#: src/status.c:138
+msgid "RETRY"
+msgstr "REESSAYE"
+
+#: src/status.c:139
+msgid "DISORDERLY"
+msgstr "EN DESORDRE"
+
+#: src/status.c:140 src/status.c:160 src/status.c:185 src/status.c:195
+msgid " "
+msgstr " "
+
+#: src/status.c:147
+msgid "Peer ATU Found"
+msgstr "Modem distant détecté"
+
+#: src/status.c:148
+msgid "Restart Request"
+msgstr "Redémarrage requis"
+
+#: src/status.c:149
+msgid "Activation Request"
+msgstr "Activation requise"
+
+#: src/status.c:150
+msgid "Initializing"
+msgstr "Initialisation"
+
+#: src/status.c:151
+msgid "Showtime"
+msgstr "Connecté"
+
+#: src/status.c:152
+msgid "L3 Executed"
+msgstr "L3 Executé"
+
+#: src/status.c:153
+msgid "L3 Rejected"
+msgstr "L3 Rejeté"
+
+#: src/status.c:154
+msgid "L1 Executed"
+msgstr "L1 Executé"
+
+#: src/status.c:155
+msgid "L1 Rejected"
+msgstr "L1 Rejeté"
+
+#: src/status.c:156
+msgid "L0 Rejected"
+msgstr "L0 Rejeté"
+
+#: src/status.c:157
+msgid "Restart Acceptable"
+msgstr "Redémerrage accepté"
+
+#: src/status.c:158
+msgid "Suicide Request"
+msgstr "Demande Suicide"
+
+#: src/status.c:159
+msgid "Restart Not Acceptable"
+msgstr "Redémarrage non accepté"
+
+#: src/status.c:167
+msgid "Uncompatible Line Conditions"
+msgstr "Conditions de ligne incompatibles"
+
+#: src/status.c:168
+msgid "No Lock Possible"
+msgstr "Aucun blocage possible"
+
+#: src/status.c:169
+msgid "Protocol Error"
+msgstr "Erreur de protocole"
+
+#: src/status.c:170
+msgid "Message Error"
+msgstr "Réception d'un message invalide"
+
+#: src/status.c:171
+msgid "Spurious ATU Detected"
+msgstr "Modem distant non valide"
+
+#: src/status.c:172
+msgid "Requested Bit Rate Too High"
+msgstr "Le débit demandé est trop élevé"
+
+#: src/status.c:173
+msgid "Interleaved Profile Required for LITE"
+msgstr "Un profil intercalé est requis par la norme LITE"
+
+#: src/status.c:174
+msgid "Forced Silence"
+msgstr "Forçage de silence"
+
+#: src/status.c:175
+msgid "Unselectable Operation Mode"
+msgstr "Mode d'opération non sélectionnable"
+
+#: src/status.c:176
+msgid "State Refused By Golden"
+msgstr "État refusé par Golden"
+
+#: src/status.c:177
+msgid "Activation Timeout"
+msgstr "Délai d'activation dépassé"
+
+#: src/status.c:178
+msgid "Initialization Timeout"
+msgstr "Délai d'initialisation dépassé"
+
+#: src/status.c:179
+msgid "Bringing Down Line due to persistent faults"
+msgstr "Défauts de ligne persistants"
+
+#: src/status.c:180
+msgid "Retry"
+msgstr "Réessaye"
+
+#: src/status.c:181
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: src/status.c:182
+msgid "Unknown failure"
+msgstr "Echec inconnu"
+
+#: src/status.c:183 src/status.c:1093
+msgid "No hardware detected"
+msgstr "Aucun matériel détecté"
+
+#: src/status.c:184
+msgid "USB bandwidth unavailable"
+msgstr "Bande passante USB non disponible"
+
+#: src/status.c:192
+msgid "ANSI"
+msgstr "ANSI"
+
+#: src/status.c:193
+msgid "G.lite"
+msgstr "G.lite"
+
+#: src/status.c:194
+msgid "G.dmt"
+msgstr "G.dmt"
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/insert-header.sin
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/insert-header.sin Wed Dec 27 00:14:01 2006
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/it.gmo
==============================================================================
Binary file. No diff available.
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/it.po
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/it.po Wed Dec 27 00:14:01 2006
@@ -0,0 +1,526 @@
+# bewan_adsl_status (it)
+#
+# This file is distributed under GPL license.
+# Stefano Palmeri <rospolosco at tiscali.it>, 2004.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"POT-Creation-Date: 2003-03-10 15:23+0100\n"
+"PO-Revision-Date: 2003-03-10 15:23+0100\n"
+"Last-Translator: Stefano Palmeri <rospolosco at tiscali.it>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/interface.c:215 strings.c:7
+msgid "BeWAN ADSL"
+msgstr "BeWAN ADSL"
+
+#: src/interface.c:234 strings.c:8
+msgid "Actual bit rate (Kbps)"
+msgstr "Bit rate attuale (Kbps)"
+
+#: src/interface.c:252 strings.c:9
+msgid "Far End Fast Channel:"
+msgstr "Canale Veloce Centrale:"
+
+#: src/interface.c:264 strings.c:10
+msgid "Near End Interleaved Channel:"
+msgstr "Canale Intercalato Modem:"
+
+#: src/interface.c:276 strings.c:11
+msgid "Far End Interleaved Channel:"
+msgstr "Canale Intercalato Centrale:"
+
+#: src/interface.c:288 strings.c:12
+msgid "Near End Fast Channel:"
+msgstr "Canale Veloce Modem:"
+
+#: src/interface.c:348 strings.c:13
+msgid "Line State"
+msgstr "Stato della Linea"
+
+#: src/interface.c:366 strings.c:14
+msgid "Start"
+msgstr "Avvio"
+
+#: src/interface.c:376 strings.c:15
+msgid "Stop"
+msgstr "Stop"
+
+#: src/interface.c:399 src/interface.c:1853 strings.c:16 strings.c:81
+msgid "\n"
+msgstr ""
+
+#: src/interface.c:435 strings.c:18
+msgid "Remote report:"
+msgstr "Evento remoto:"
+
+#: src/interface.c:447 strings.c:19
+msgid "Last failure:"
+msgstr "Ultimo problema:"
+
+#: src/interface.c:459 strings.c:20
+msgid "Time connected:"
+msgstr "Tempo di connessione:"
+
+#: src/interface.c:471 strings.c:21
+msgid "Modem state:"
+msgstr "Stato del modem:"
+
+#: src/interface.c:493 strings.c:22
+msgid "State"
+msgstr "Stato"
+
+#: src/interface.c:509 strings.c:23
+msgid "Power"
+msgstr "Potenza"
+
+#: src/interface.c:537 strings.c:24
+msgid "SNR"
+msgstr ""
+
+#: src/interface.c:549 strings.c:25
+msgid "Echo+Noise"
+msgstr "Eco + Rumore"
+
+#: src/interface.c:561 strings.c:26
+msgid "Rx Path"
+msgstr "Percorso Rx"
+
+#: src/interface.c:573 strings.c:27
+msgid "Operational Data"
+msgstr "Informazioni Operative"
+
+#: src/interface.c:591 strings.c:28
+msgid "UpStream"
+msgstr ""
+
+#: src/interface.c:649 strings.c:29
+msgid "Capacity Occupation (%)"
+msgstr "Capacità Occupazione (%)"
+
+#: src/interface.c:661 strings.c:30
+msgid "Noise Margin (dB)"
+msgstr "Margine di Rumore (dB)"
+
+#: src/interface.c:673 strings.c:31
+msgid "Output Power (dBm)"
+msgstr "Potenza in Uscita (dBm)"
+
+#: src/interface.c:685 strings.c:32
+msgid "DownStream"
+msgstr ""
+
+#: src/interface.c:743 strings.c:33
+msgid "Attenuation (dB)"
+msgstr "Attenuazione (dB)"
+
+#: src/interface.c:755 src/interface.c:1781 strings.c:34 strings.c:76
+msgid "Modulation:"
+msgstr "Modulazione:"
+
+#: src/interface.c:778 strings.c:35
+msgid "Line"
+msgstr "Linea"
+
+#: src/interface.c:794 strings.c:36
+msgid "Fast Channel Error Counters"
+msgstr "Contatori Errori Canale Veloce"
+
+#: src/interface.c:812 src/interface.c:974 strings.c:37 strings.c:43
+msgid "Local"
+msgstr "Modem"
+
+#: src/interface.c:866 src/interface.c:1028 strings.c:38 strings.c:44
+msgid "Distant"
+msgstr "Centrale"
+
+#: src/interface.c:920 src/interface.c:1082 strings.c:39 strings.c:45
+msgid "Forward Error Corrections (FEC)"
+msgstr "Correzioni Errori in Anticipo (FEC)"
+
+#: src/interface.c:932 src/interface.c:1094 strings.c:40 strings.c:46
+msgid "Cyclic Redundancy Checks (CRC)"
+msgstr "Controlli Ridondanza Ciclica (CRC)"
+
+#: src/interface.c:944 src/interface.c:1106 strings.c:41 strings.c:47
+msgid "Cyclic Header Error Check (HEC)"
+msgstr "Controllo Ciclico Errori Header (HEC)"
+
+#: src/interface.c:956 strings.c:42
+msgid "Interleaved Channel Error Counters"
+msgstr "Contatori Errori Canale Intercalato"
+
+#: src/interface.c:1118 strings.c:48
+msgid "Errors"
+msgstr "Errori"
+
+#: src/interface.c:1134 strings.c:49
+msgid "Near End Defects Detected"
+msgstr "Problemi Rilevati dal Modem"
+
+#: src/interface.c:1162 src/interface.c:1344 strings.c:50 strings.c:56
+msgid "Loss of Margin (LoM)"
+msgstr "Perdita di Margine (LoM)"
+
+#: src/interface.c:1241 src/interface.c:1475 strings.c:51 strings.c:59
+msgid "Loss of Signal (LoS)"
+msgstr "Perdita di Segnale (LoS)"
+
+#: src/interface.c:1253 src/interface.c:1394 strings.c:52 strings.c:57
+msgid "Loss of Power (LoP)"
+msgstr "Perdita di Potenza (LoP)"
+
+#: src/interface.c:1265 src/interface.c:1406 strings.c:53 strings.c:58
+msgid "Loss of Frame (LoF)"
+msgstr "Perdita di Trama (LoF)"
+
+#: src/interface.c:1277 src/interface.c:1487 strings.c:54 strings.c:60
+msgid "Loss of Cell Delineation (LoCD)"
+msgstr "Perdita Allineamento Celle (LoCD)"
+
+#: src/interface.c:1307 strings.c:55
+msgid "Far End Defects detected"
+msgstr "Problemi Rilevati dalla Centrale"
+
+#: src/interface.c:1499 strings.c:61
+msgid "Dying Gasp message received"
+msgstr "Ricevuto Messaggio Dying Gasp"
+
+#: src/interface.c:1511 strings.c:62
+msgid "Defects"
+msgstr "Problemi"
+
+#: src/interface.c:1527 strings.c:63
+msgid "ATM maintenance indicators (OAM-F5)"
+msgstr "Indicatori Manutenzione ATM (OAM-F5)"
+
+#: src/interface.c:1565 src/interface.c:1805 strings.c:64 strings.c:78
+msgid "VCI:"
+msgstr ""
+
+#: src/interface.c:1577 strings.c:65
+msgid "Reset Counters"
+msgstr "Azzera Contatori"
+
+#: src/interface.c:1587 strings.c:66
+msgid "Receive counters"
+msgstr "Contatori Ricevuti"
+
+#: src/interface.c:1605 strings.c:67
+msgid "Remote Defect Indication cells (RDI):"
+msgstr "Celle d'Indicazione Problemi Remoti (RDI):"
+
+#: src/interface.c:1617 strings.c:68
+msgid "Alarm Indication Signal cells (AIS):"
+msgstr "Celle d'Indicazione d'Allarme (AIS):"
+
+#: src/interface.c:1629 strings.c:69
+msgid "Far-end loopback cells (LB):"
+msgstr "Celle Loopback Centrale (LB):"
+
+#: src/interface.c:1641 strings.c:70
+msgid "Near-end loopback cells (LB):"
+msgstr "Celle Loopback Modem (LB):"
+
+#: src/interface.c:1653 strings.c:71
+msgid "Continuity Check cells (CC):"
+msgstr "Celle di Controllo di Continuità (CC):"
+
+#: src/interface.c:1725 strings.c:72
+msgid "Generate looback cells (OAM-F5 LB cells)"
+msgstr "Genera Celle Loopback (Celle OAM-F5 LB)"
+
+#: src/interface.c:1735 src/interface.c:1793 strings.c:73 strings.c:77
+msgid "VPI:"
+msgstr ""
+
+#: src/interface.c:1747 strings.c:74
+msgid "Test"
+msgstr ""
+
+#: src/interface.c:1763 strings.c:75
+msgid "Installed Profile"
+msgstr "Profilo Installato"
+
+#: src/interface.c:1817 strings.c:79
+msgid "Encapsulation:"
+msgstr "Incapsulamento:"
+
+#: src/interface.c:1829 strings.c:80
+msgid "Protocol:"
+msgstr "Protocollo:"
+
+#: src/interface.c:1901 strings.c:83
+msgid "Config"
+msgstr "Impostazioni"
+
+#: src/interface.c:1917 strings.c:84
+msgid "ADSL Package Information"
+msgstr "Informazioni Pacchetto ADSL"
+
+#: src/interface.c:1935 strings.c:85
+msgid "Package Name:"
+msgstr "Nome Pacchetto:"
+
+#: src/interface.c:1947 strings.c:86
+msgid "Package Version:"
+msgstr "Versione Driver:"
+
+#: src/interface.c:1959 strings.c:87
+msgid "Firmware Version:"
+msgstr "Versione Firmware:"
+
+#: src/interface.c:1971 strings.c:88
+msgid "Manufacturer:"
+msgstr "Produttore:"
+
+#: src/interface.c:1983 strings.c:89
+msgid "Copyright:"
+msgstr ""
+
+#: src/interface.c:2055 strings.c:90
+msgid "Far End Modem Identification"
+msgstr "Identificazione Modem Centrale"
+
+#: src/interface.c:2073 strings.c:91
+msgid "ITU Revision Number:"
+msgstr "Numero Revisione ITU:"
+
+#: src/interface.c:2085 strings.c:92
+msgid "Vendor Specific Info:"
+msgstr "Informazioni Specifiche Venditore:"
+
+#: src/interface.c:2097 strings.c:93
+msgid "Vendor Country Code:"
+msgstr "Codice Nazione Venditore:"
+
+#: src/interface.c:2142 strings.c:94
+msgid "Vendor Code:"
+msgstr "Codice Venditore:"
+
+#: src/interface.c:2175 strings.c:95
+msgid "Info"
+msgstr "Informazioni"
+
+#: src/support.c:121
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Non è possibile trovare il file pixmap: %s"
+
+#: src/support.c:130
+#, c-format
+msgid "Error loading pixmap file: %s"
+msgstr "Errore nel caricamento del file pixmap: %s"
+
+#: src/status.c:123
+msgid "IDLE"
+msgstr "INATTIVO"
+
+#: src/status.c:124
+msgid "L3"
+msgstr "L3"
+
+#: src/status.c:125
+msgid "LISTENING"
+msgstr "IN ASCOLTO"
+
+#: src/status.c:126
+msgid "ACTIVATING"
+msgstr "ATTIVAZIONE"
+
+#: src/status.c:127
+msgid "Ghs_HANDSHAKING"
+msgstr "NEGOZIAZIONE_Ghs"
+
+#: src/status.c:128
+msgid "ANSI_HANDSHAKING"
+msgstr "NEGOZIAZIONE_ANSI"
+
+#: src/status.c:129
+msgid "INITIALIZING"
+msgstr "INIZIALIZZAZIONE"
+
+#: src/status.c:130
+msgid "RESTARTING"
+msgstr "RIAVVIO"
+
+#: src/status.c:131
+msgid "FAST_RETRAIN"
+msgstr ""
+
+#: src/status.c:132
+msgid "SHOWTIME_L0"
+msgstr "CONNESSO_LO"
+
+#: src/status.c:133
+msgid "SHOWTIME_LQ"
+msgstr "CONNESSO_LQ"
+
+#: src/status.c:134
+msgid "SHOWTIME_L1"
+msgstr "CONNESSO_L1"
+
+#: src/status.c:135
+msgid "EXCHANGE"
+msgstr "SCAMBIO"
+
+#: src/status.c:136
+msgid "TRUNCATE"
+msgstr "INTERROTTO"
+
+#: src/status.c:137
+msgid "ESCAPE"
+msgstr "FUGA"
+
+#: src/status.c:138
+msgid "RETRY"
+msgstr "RIPROVA"
+
+#: src/status.c:139
+msgid "DISORDERLY"
+msgstr "IN DISORDINE"
+
+#: src/status.c:140 src/status.c:160 src/status.c:185 src/status.c:195
+msgid " "
+msgstr ""
+
+#: src/status.c:147
+msgid "Peer ATU Found"
+msgstr "Modem Centrale trovato"
+
+#: src/status.c:148
+msgid "Restart Request"
+msgstr "Richiesta di riavvio"
+
+#: src/status.c:149
+msgid "Activation Request"
+msgstr "Richiesta di attivazione"
+
+#: src/status.c:150
+msgid "Initializing"
+msgstr "Inizializzazione"
+
+#: src/status.c:151
+msgid "Showtime"
+msgstr "Connesso"
+
+#: src/status.c:152
+msgid "L3 Executed"
+msgstr "L3 Eseguito"
+
+#: src/status.c:153
+msgid "L3 Rejected"
+msgstr "L3 Rifiutato"
+
+#: src/status.c:154
+msgid "L1 Executed"
+msgstr "L1 Eseguito"
+
+#: src/status.c:155
+msgid "L1 Rejected"
+msgstr "L1 Rifiutato"
+
+#: src/status.c:156
+msgid "L0 Rejected"
+msgstr "L0 Rifiutato"
+
+#: src/status.c:157
+msgid "Restart Acceptable"
+msgstr "Riavvio accettabile"
+
+#: src/status.c:158
+msgid "Suicide Request"
+msgstr "Richiesta suicida"
+
+#: src/status.c:159
+msgid "Restart Not Acceptable"
+msgstr "Riavvio non accettabile"
+
+#: src/status.c:167
+msgid "Uncompatible Line Conditions"
+msgstr "Condizioni incompatibili linea"
+
+#: src/status.c:168
+msgid "No Lock Possible"
+msgstr "Nessun blocco possibile"
+
+#: src/status.c:169
+msgid "Protocol Error"
+msgstr "Errore di protocollo"
+
+#: src/status.c:170
+msgid "Message Error"
+msgstr "Messaggio non valido"
+
+#: src/status.c:171
+msgid "Spurious ATU Detected"
+msgstr "Modem Centrale non valido"
+
+#: src/status.c:172
+msgid "Requested Bit Rate Too High"
+msgstr "Bit Rate richiesto troppo alto"
+
+#: src/status.c:173
+msgid "Interleaved Profile Required for LITE"
+msgstr "E' richiesto profilo interleaved per LITE"
+
+#: src/status.c:174
+msgid "Forced Silence"
+msgstr "Silenzio forzato"
+
+#: src/status.c:175
+msgid "Unselectable Operation Mode"
+msgstr "Modo di Operatività non selezionabile"
+
+#: src/status.c:176
+msgid "State Refused By Golden"
+msgstr "Stato rifiutato da Golden"
+
+#: src/status.c:177
+msgid "Activation Timeout"
+msgstr "Timeout per l'attivazione"
+
+#: src/status.c:178
+msgid "Initialization Timeout"
+msgstr "Timeout per l'inizializzazione"
+
+#: src/status.c:179
+msgid "Bringing Down Line due to persistent faults"
+msgstr "Difetti persistenti della linea"
+
+#: src/status.c:180
+msgid "Retry"
+msgstr "Riprova"
+
+#: src/status.c:181
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+#: src/status.c:182
+msgid "Unknown failure"
+msgstr "Problema sconosciuto"
+
+#: src/status.c:183 src/status.c:1093
+msgid "No hardware detected"
+msgstr "Hardware non trovato"
+
+#: src/status.c:184
+msgid "USB bandwidth unavailable"
+msgstr "Banda passante USB non disponibile"
+
+#: src/status.c:192
+msgid "ANSI"
+msgstr "ANSI"
+
+#: src/status.c:193
+msgid "G.lite"
+msgstr "G.lite"
+
+#: src/status.c:194
+msgid "G.dmt"
+msgstr "G.dmt"
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/quot.sed
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/quot.sed Wed Dec 27 00:14:01 2006
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/â\1â/g
+s/`\([^`']*\)'/â\1â/g
+s/ '\([^`']*\)' / â\1â /g
+s/ '\([^`']*\)'$/ â\1â/g
+s/^'\([^`']*\)' /â\1â /g
+s/ââ/""/g
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/po/remove-potcdate.sin
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/po/remove-potcdate.sin Wed Dec 27 00:14:01 2006
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/red_led.xpm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/red_led.xpm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+/* XPM */
+static char *red_led[] =
+{
+/* width height ncolors chars_per_pixel */
+"8 11 6 1",
+/* colors */
+"A c #FFFFFFFFFFFF",
+"B c #AAAA00000000",
+"C c #FFFF00000000",
+"D c #CCCC99996666",
+"E c #DDDD00000000",
+"F c #000000000000",
+/* pixels */
+"AFFFFFFA",
+"FCCCCCDF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FCEEEEBF",
+"FDBBBBBF",
+"AFFFFFFA",
+};
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/callbacks.P
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/callbacks.P Wed Dec 27 00:14:01 2006
@@ -0,0 +1,247 @@
+callbacks.o: callbacks.c ../config.h /usr/include/gtk-1.2/gtk/gtk.h \
+ /usr/include/gtk-1.2/gdk/gdk.h /usr/include/gtk-1.2/gdk/gdktypes.h \
+ /usr/include/glib-1.2/glib.h /usr/lib/glib/include/glibconfig.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h \
+ /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ /usr/include/gtk-1.2/gdk/gdkcursors.h /usr/include/gtk-1.2/gdk/gdkrgb.h \
+ /usr/include/gtk-1.2/gtk/gtkaccelgroup.h \
+ /usr/include/gtk-1.2/gtk/gtkobject.h /usr/include/gtk-1.2/gtk/gtkarg.h \
+ /usr/include/gtk-1.2/gtk/gtktypeutils.h \
+ /usr/include/gtk-1.2/gtk/gtktypebuiltins.h \
+ /usr/include/gtk-1.2/gtk/gtkenums.h /usr/include/gtk-1.2/gtk/gtkdebug.h \
+ /usr/include/gtk-1.2/gtk/gtkaccellabel.h \
+ /usr/include/gtk-1.2/gtk/gtklabel.h /usr/include/gtk-1.2/gtk/gtkmisc.h \
+ /usr/include/gtk-1.2/gtk/gtkwidget.h \
+ /usr/include/gtk-1.2/gtk/gtkadjustment.h \
+ /usr/include/gtk-1.2/gtk/gtkdata.h /usr/include/gtk-1.2/gtk/gtkstyle.h \
+ /usr/include/gtk-1.2/gtk/gtkalignment.h \
+ /usr/include/gtk-1.2/gtk/gtkbin.h \
+ /usr/include/gtk-1.2/gtk/gtkcontainer.h \
+ /usr/include/gtk-1.2/gtk/gtkaspectframe.h \
+ /usr/include/gtk-1.2/gtk/gtkframe.h /usr/include/gtk-1.2/gtk/gtkarrow.h \
+ /usr/include/gtk-1.2/gtk/gtkbindings.h \
+ /usr/include/gtk-1.2/gtk/gtkbox.h /usr/include/gtk-1.2/gtk/gtkbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcalendar.h \
+ /usr/include/gtk-1.2/gtk/gtksignal.h \
+ /usr/include/gtk-1.2/gtk/gtkmarshal.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckbutton.h \
+ /usr/include/gtk-1.2/gtk/gtktogglebutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkitem.h /usr/include/gtk-1.2/gtk/gtkclist.h \
+ /usr/include/gtk-1.2/gtk/gtkhscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkrange.h \
+ /usr/include/gtk-1.2/gtk/gtkvscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkcolorsel.h \
+ /usr/include/gtk-1.2/gtk/gtkwindow.h /usr/include/gtk-1.2/gtk/gtkvbox.h \
+ /usr/include/gtk-1.2/gtk/gtkpreview.h \
+ /usr/include/gtk-1.2/gtk/gtkentry.h \
+ /usr/include/gtk-1.2/gtk/gtkeditable.h \
+ /usr/include/gtk-1.2/gtk/gtkhbox.h /usr/include/gtk-1.2/gtk/gtkmain.h \
+ /usr/include/gtk-1.2/gtk/gtkscale.h \
+ /usr/include/gtk-1.2/gtk/gtkhscale.h \
+ /usr/include/gtk-1.2/gtk/gtktable.h \
+ /usr/include/gtk-1.2/gtk/gtkeventbox.h \
+ /usr/include/gtk-1.2/gtk/gtkcombo.h \
+ /usr/include/gtk-1.2/gtk/gtkcompat.h \
+ /usr/include/gtk-1.2/gtk/gtkctree.h /usr/include/gtk-1.2/gtk/gtkcurve.h \
+ /usr/include/gtk-1.2/gtk/gtkdrawingarea.h \
+ /usr/include/gtk-1.2/gtk/gtkdialog.h /usr/include/gtk-1.2/gtk/gtkdnd.h \
+ /usr/include/gtk-1.2/gtk/gtkselection.h \
+ /usr/include/gtk-1.2/gtk/gtkfeatures.h \
+ /usr/include/gtk-1.2/gtk/gtkfilesel.h \
+ /usr/include/gtk-1.2/gtk/gtkfixed.h \
+ /usr/include/gtk-1.2/gtk/gtkfontsel.h \
+ /usr/include/gtk-1.2/gtk/gtknotebook.h \
+ /usr/include/gtk-1.2/gtk/gtkgamma.h /usr/include/gtk-1.2/gtk/gtkgc.h \
+ /usr/include/gtk-1.2/gtk/gtkhandlebox.h \
+ /usr/include/gtk-1.2/gtk/gtkhbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkhpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkhruler.h \
+ /usr/include/gtk-1.2/gtk/gtkruler.h \
+ /usr/include/gtk-1.2/gtk/gtkhseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkimage.h \
+ /usr/include/gtk-1.2/gtk/gtkinputdialog.h \
+ /usr/include/gtk-1.2/gtk/gtkitemfactory.h \
+ /usr/include/gtk-1.2/gtk/gtkmenufactory.h \
+ /usr/include/gtk-1.2/gtk/gtklayout.h /usr/include/gtk-1.2/gtk/gtklist.h \
+ /usr/include/gtk-1.2/gtk/gtklistitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkmenushell.h \
+ /usr/include/gtk-1.2/gtk/gtkmenubar.h \
+ /usr/include/gtk-1.2/gtk/gtkoptionmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkpacker.h \
+ /usr/include/gtk-1.2/gtk/gtkpixmap.h /usr/include/gtk-1.2/gtk/gtkplug.h \
+ /usr/include/gtk-1.2/gtk/gtkprogress.h \
+ /usr/include/gtk-1.2/gtk/gtkprogressbar.h \
+ /usr/include/gtk-1.2/gtk/gtkradiobutton.h \
+ /usr/include/gtk-1.2/gtk/gtkradiomenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkrc.h \
+ /usr/include/gtk-1.2/gtk/gtkscrolledwindow.h \
+ /usr/include/gtk-1.2/gtk/gtkviewport.h \
+ /usr/include/gtk-1.2/gtk/gtksocket.h \
+ /usr/include/gtk-1.2/gtk/gtkspinbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkstatusbar.h \
+ /usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtktext.h /usr/include/gtk-1.2/gtk/gtkthemes.h \
+ /usr/include/gtk-1.2/gtk/gtktipsquery.h \
+ /usr/include/gtk-1.2/gtk/gtktoolbar.h \
+ /usr/include/gtk-1.2/gtk/gtktooltips.h \
+ /usr/include/gtk-1.2/gtk/gtktree.h \
+ /usr/include/gtk-1.2/gtk/gtktreeitem.h \
+ /usr/include/gtk-1.2/gtk/gtkvbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkvpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkvruler.h \
+ /usr/include/gtk-1.2/gtk/gtkvscale.h \
+ /usr/include/gtk-1.2/gtk/gtkvseparator.h callbacks.h interface.h \
+ support.h /usr/include/libintl.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h \
+ /usr/include/locale.h /usr/include/bits/locale.h status.h
+callbacks.c :
+../config.h :
+/usr/include/gtk-1.2/gtk/gtk.h :
+/usr/include/gtk-1.2/gdk/gdk.h :
+/usr/include/gtk-1.2/gdk/gdktypes.h :
+/usr/include/glib-1.2/glib.h :
+/usr/lib/glib/include/glibconfig.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h :
+/usr/include/limits.h :
+/usr/include/features.h :
+/usr/include/sys/cdefs.h :
+/usr/include/gnu/stubs.h :
+/usr/include/bits/posix1_lim.h :
+/usr/include/bits/local_lim.h :
+/usr/include/linux/limits.h :
+/usr/include/bits/posix2_lim.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h :
+/usr/include/gtk-1.2/gdk/gdkcursors.h :
+/usr/include/gtk-1.2/gdk/gdkrgb.h :
+/usr/include/gtk-1.2/gtk/gtkaccelgroup.h :
+/usr/include/gtk-1.2/gtk/gtkobject.h :
+/usr/include/gtk-1.2/gtk/gtkarg.h :
+/usr/include/gtk-1.2/gtk/gtktypeutils.h :
+/usr/include/gtk-1.2/gtk/gtktypebuiltins.h :
+/usr/include/gtk-1.2/gtk/gtkenums.h :
+/usr/include/gtk-1.2/gtk/gtkdebug.h :
+/usr/include/gtk-1.2/gtk/gtkaccellabel.h :
+/usr/include/gtk-1.2/gtk/gtklabel.h :
+/usr/include/gtk-1.2/gtk/gtkmisc.h :
+/usr/include/gtk-1.2/gtk/gtkwidget.h :
+/usr/include/gtk-1.2/gtk/gtkadjustment.h :
+/usr/include/gtk-1.2/gtk/gtkdata.h :
+/usr/include/gtk-1.2/gtk/gtkstyle.h :
+/usr/include/gtk-1.2/gtk/gtkalignment.h :
+/usr/include/gtk-1.2/gtk/gtkbin.h :
+/usr/include/gtk-1.2/gtk/gtkcontainer.h :
+/usr/include/gtk-1.2/gtk/gtkaspectframe.h :
+/usr/include/gtk-1.2/gtk/gtkframe.h :
+/usr/include/gtk-1.2/gtk/gtkarrow.h :
+/usr/include/gtk-1.2/gtk/gtkbindings.h :
+/usr/include/gtk-1.2/gtk/gtkbox.h :
+/usr/include/gtk-1.2/gtk/gtkbbox.h :
+/usr/include/gtk-1.2/gtk/gtkbutton.h :
+/usr/include/gtk-1.2/gtk/gtkcalendar.h :
+/usr/include/gtk-1.2/gtk/gtksignal.h :
+/usr/include/gtk-1.2/gtk/gtkmarshal.h :
+/usr/include/gtk-1.2/gtk/gtkcheckbutton.h :
+/usr/include/gtk-1.2/gtk/gtktogglebutton.h :
+/usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkitem.h :
+/usr/include/gtk-1.2/gtk/gtkclist.h :
+/usr/include/gtk-1.2/gtk/gtkhscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkrange.h :
+/usr/include/gtk-1.2/gtk/gtkvscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkcolorsel.h :
+/usr/include/gtk-1.2/gtk/gtkwindow.h :
+/usr/include/gtk-1.2/gtk/gtkvbox.h :
+/usr/include/gtk-1.2/gtk/gtkpreview.h :
+/usr/include/gtk-1.2/gtk/gtkentry.h :
+/usr/include/gtk-1.2/gtk/gtkeditable.h :
+/usr/include/gtk-1.2/gtk/gtkhbox.h :
+/usr/include/gtk-1.2/gtk/gtkmain.h :
+/usr/include/gtk-1.2/gtk/gtkscale.h :
+/usr/include/gtk-1.2/gtk/gtkhscale.h :
+/usr/include/gtk-1.2/gtk/gtktable.h :
+/usr/include/gtk-1.2/gtk/gtkeventbox.h :
+/usr/include/gtk-1.2/gtk/gtkcombo.h :
+/usr/include/gtk-1.2/gtk/gtkcompat.h :
+/usr/include/gtk-1.2/gtk/gtkctree.h :
+/usr/include/gtk-1.2/gtk/gtkcurve.h :
+/usr/include/gtk-1.2/gtk/gtkdrawingarea.h :
+/usr/include/gtk-1.2/gtk/gtkdialog.h :
+/usr/include/gtk-1.2/gtk/gtkdnd.h :
+/usr/include/gtk-1.2/gtk/gtkselection.h :
+/usr/include/gtk-1.2/gtk/gtkfeatures.h :
+/usr/include/gtk-1.2/gtk/gtkfilesel.h :
+/usr/include/gtk-1.2/gtk/gtkfixed.h :
+/usr/include/gtk-1.2/gtk/gtkfontsel.h :
+/usr/include/gtk-1.2/gtk/gtknotebook.h :
+/usr/include/gtk-1.2/gtk/gtkgamma.h :
+/usr/include/gtk-1.2/gtk/gtkgc.h :
+/usr/include/gtk-1.2/gtk/gtkhandlebox.h :
+/usr/include/gtk-1.2/gtk/gtkhbbox.h :
+/usr/include/gtk-1.2/gtk/gtkhpaned.h :
+/usr/include/gtk-1.2/gtk/gtkpaned.h :
+/usr/include/gtk-1.2/gtk/gtkhruler.h :
+/usr/include/gtk-1.2/gtk/gtkruler.h :
+/usr/include/gtk-1.2/gtk/gtkhseparator.h :
+/usr/include/gtk-1.2/gtk/gtkseparator.h :
+/usr/include/gtk-1.2/gtk/gtkimage.h :
+/usr/include/gtk-1.2/gtk/gtkinputdialog.h :
+/usr/include/gtk-1.2/gtk/gtkitemfactory.h :
+/usr/include/gtk-1.2/gtk/gtkmenufactory.h :
+/usr/include/gtk-1.2/gtk/gtklayout.h :
+/usr/include/gtk-1.2/gtk/gtklist.h :
+/usr/include/gtk-1.2/gtk/gtklistitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenu.h :
+/usr/include/gtk-1.2/gtk/gtkmenushell.h :
+/usr/include/gtk-1.2/gtk/gtkmenubar.h :
+/usr/include/gtk-1.2/gtk/gtkoptionmenu.h :
+/usr/include/gtk-1.2/gtk/gtkpacker.h :
+/usr/include/gtk-1.2/gtk/gtkpixmap.h :
+/usr/include/gtk-1.2/gtk/gtkplug.h :
+/usr/include/gtk-1.2/gtk/gtkprogress.h :
+/usr/include/gtk-1.2/gtk/gtkprogressbar.h :
+/usr/include/gtk-1.2/gtk/gtkradiobutton.h :
+/usr/include/gtk-1.2/gtk/gtkradiomenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkrc.h :
+/usr/include/gtk-1.2/gtk/gtkscrolledwindow.h :
+/usr/include/gtk-1.2/gtk/gtkviewport.h :
+/usr/include/gtk-1.2/gtk/gtksocket.h :
+/usr/include/gtk-1.2/gtk/gtkspinbutton.h :
+/usr/include/gtk-1.2/gtk/gtkstatusbar.h :
+/usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtktext.h :
+/usr/include/gtk-1.2/gtk/gtkthemes.h :
+/usr/include/gtk-1.2/gtk/gtktipsquery.h :
+/usr/include/gtk-1.2/gtk/gtktoolbar.h :
+/usr/include/gtk-1.2/gtk/gtktooltips.h :
+/usr/include/gtk-1.2/gtk/gtktree.h :
+/usr/include/gtk-1.2/gtk/gtktreeitem.h :
+/usr/include/gtk-1.2/gtk/gtkvbbox.h :
+/usr/include/gtk-1.2/gtk/gtkvpaned.h :
+/usr/include/gtk-1.2/gtk/gtkvruler.h :
+/usr/include/gtk-1.2/gtk/gtkvscale.h :
+/usr/include/gtk-1.2/gtk/gtkvseparator.h :
+callbacks.h :
+interface.h :
+support.h :
+/usr/include/libintl.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h :
+/usr/include/locale.h :
+/usr/include/bits/locale.h :
+status.h :
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/interface.P
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/interface.P Wed Dec 27 00:14:01 2006
@@ -0,0 +1,283 @@
+interface.o: interface.c ../config.h /usr/include/sys/types.h \
+ /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/gnu/stubs.h /usr/include/bits/types.h \
+ /usr/include/bits/wordsize.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h \
+ /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/sigset.h \
+ /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+ /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/unistd.h \
+ /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+ /usr/include/getopt.h /usr/include/string.h /usr/include/bits/string.h \
+ /usr/include/bits/string2.h /usr/include/stdlib.h \
+ /usr/include/gtk-1.2/gdk/gdkkeysyms.h /usr/include/gtk-1.2/gtk/gtk.h \
+ /usr/include/gtk-1.2/gdk/gdk.h /usr/include/gtk-1.2/gdk/gdktypes.h \
+ /usr/include/glib-1.2/glib.h /usr/lib/glib/include/glibconfig.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h \
+ /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ /usr/include/gtk-1.2/gdk/gdkcursors.h /usr/include/gtk-1.2/gdk/gdkrgb.h \
+ /usr/include/gtk-1.2/gtk/gtkaccelgroup.h \
+ /usr/include/gtk-1.2/gtk/gtkobject.h /usr/include/gtk-1.2/gtk/gtkarg.h \
+ /usr/include/gtk-1.2/gtk/gtktypeutils.h \
+ /usr/include/gtk-1.2/gtk/gtktypebuiltins.h \
+ /usr/include/gtk-1.2/gtk/gtkenums.h /usr/include/gtk-1.2/gtk/gtkdebug.h \
+ /usr/include/gtk-1.2/gtk/gtkaccellabel.h \
+ /usr/include/gtk-1.2/gtk/gtklabel.h /usr/include/gtk-1.2/gtk/gtkmisc.h \
+ /usr/include/gtk-1.2/gtk/gtkwidget.h \
+ /usr/include/gtk-1.2/gtk/gtkadjustment.h \
+ /usr/include/gtk-1.2/gtk/gtkdata.h /usr/include/gtk-1.2/gtk/gtkstyle.h \
+ /usr/include/gtk-1.2/gtk/gtkalignment.h \
+ /usr/include/gtk-1.2/gtk/gtkbin.h \
+ /usr/include/gtk-1.2/gtk/gtkcontainer.h \
+ /usr/include/gtk-1.2/gtk/gtkaspectframe.h \
+ /usr/include/gtk-1.2/gtk/gtkframe.h /usr/include/gtk-1.2/gtk/gtkarrow.h \
+ /usr/include/gtk-1.2/gtk/gtkbindings.h \
+ /usr/include/gtk-1.2/gtk/gtkbox.h /usr/include/gtk-1.2/gtk/gtkbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcalendar.h \
+ /usr/include/gtk-1.2/gtk/gtksignal.h \
+ /usr/include/gtk-1.2/gtk/gtkmarshal.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckbutton.h \
+ /usr/include/gtk-1.2/gtk/gtktogglebutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkitem.h /usr/include/gtk-1.2/gtk/gtkclist.h \
+ /usr/include/gtk-1.2/gtk/gtkhscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkrange.h \
+ /usr/include/gtk-1.2/gtk/gtkvscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkcolorsel.h \
+ /usr/include/gtk-1.2/gtk/gtkwindow.h /usr/include/gtk-1.2/gtk/gtkvbox.h \
+ /usr/include/gtk-1.2/gtk/gtkpreview.h \
+ /usr/include/gtk-1.2/gtk/gtkentry.h \
+ /usr/include/gtk-1.2/gtk/gtkeditable.h \
+ /usr/include/gtk-1.2/gtk/gtkhbox.h /usr/include/gtk-1.2/gtk/gtkmain.h \
+ /usr/include/gtk-1.2/gtk/gtkscale.h \
+ /usr/include/gtk-1.2/gtk/gtkhscale.h \
+ /usr/include/gtk-1.2/gtk/gtktable.h \
+ /usr/include/gtk-1.2/gtk/gtkeventbox.h \
+ /usr/include/gtk-1.2/gtk/gtkcombo.h \
+ /usr/include/gtk-1.2/gtk/gtkcompat.h \
+ /usr/include/gtk-1.2/gtk/gtkctree.h /usr/include/gtk-1.2/gtk/gtkcurve.h \
+ /usr/include/gtk-1.2/gtk/gtkdrawingarea.h \
+ /usr/include/gtk-1.2/gtk/gtkdialog.h /usr/include/gtk-1.2/gtk/gtkdnd.h \
+ /usr/include/gtk-1.2/gtk/gtkselection.h \
+ /usr/include/gtk-1.2/gtk/gtkfeatures.h \
+ /usr/include/gtk-1.2/gtk/gtkfilesel.h \
+ /usr/include/gtk-1.2/gtk/gtkfixed.h \
+ /usr/include/gtk-1.2/gtk/gtkfontsel.h \
+ /usr/include/gtk-1.2/gtk/gtknotebook.h \
+ /usr/include/gtk-1.2/gtk/gtkgamma.h /usr/include/gtk-1.2/gtk/gtkgc.h \
+ /usr/include/gtk-1.2/gtk/gtkhandlebox.h \
+ /usr/include/gtk-1.2/gtk/gtkhbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkhpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkhruler.h \
+ /usr/include/gtk-1.2/gtk/gtkruler.h \
+ /usr/include/gtk-1.2/gtk/gtkhseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkimage.h \
+ /usr/include/gtk-1.2/gtk/gtkinputdialog.h \
+ /usr/include/gtk-1.2/gtk/gtkitemfactory.h \
+ /usr/include/gtk-1.2/gtk/gtkmenufactory.h \
+ /usr/include/gtk-1.2/gtk/gtklayout.h /usr/include/gtk-1.2/gtk/gtklist.h \
+ /usr/include/gtk-1.2/gtk/gtklistitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkmenushell.h \
+ /usr/include/gtk-1.2/gtk/gtkmenubar.h \
+ /usr/include/gtk-1.2/gtk/gtkoptionmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkpacker.h \
+ /usr/include/gtk-1.2/gtk/gtkpixmap.h /usr/include/gtk-1.2/gtk/gtkplug.h \
+ /usr/include/gtk-1.2/gtk/gtkprogress.h \
+ /usr/include/gtk-1.2/gtk/gtkprogressbar.h \
+ /usr/include/gtk-1.2/gtk/gtkradiobutton.h \
+ /usr/include/gtk-1.2/gtk/gtkradiomenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkrc.h \
+ /usr/include/gtk-1.2/gtk/gtkscrolledwindow.h \
+ /usr/include/gtk-1.2/gtk/gtkviewport.h \
+ /usr/include/gtk-1.2/gtk/gtksocket.h \
+ /usr/include/gtk-1.2/gtk/gtkspinbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkstatusbar.h \
+ /usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtktext.h /usr/include/gtk-1.2/gtk/gtkthemes.h \
+ /usr/include/gtk-1.2/gtk/gtktipsquery.h \
+ /usr/include/gtk-1.2/gtk/gtktoolbar.h \
+ /usr/include/gtk-1.2/gtk/gtktooltips.h \
+ /usr/include/gtk-1.2/gtk/gtktree.h \
+ /usr/include/gtk-1.2/gtk/gtktreeitem.h \
+ /usr/include/gtk-1.2/gtk/gtkvbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkvpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkvruler.h \
+ /usr/include/gtk-1.2/gtk/gtkvscale.h \
+ /usr/include/gtk-1.2/gtk/gtkvseparator.h callbacks.h interface.h \
+ support.h /usr/include/libintl.h /usr/include/locale.h \
+ /usr/include/bits/locale.h
+interface.c :
+../config.h :
+/usr/include/sys/types.h :
+/usr/include/features.h :
+/usr/include/sys/cdefs.h :
+/usr/include/gnu/stubs.h :
+/usr/include/bits/types.h :
+/usr/include/bits/wordsize.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h :
+/usr/include/bits/typesizes.h :
+/usr/include/time.h :
+/usr/include/endian.h :
+/usr/include/bits/endian.h :
+/usr/include/sys/select.h :
+/usr/include/bits/select.h :
+/usr/include/bits/sigset.h :
+/usr/include/bits/time.h :
+/usr/include/sys/sysmacros.h :
+/usr/include/bits/pthreadtypes.h :
+/usr/include/bits/sched.h :
+/usr/include/sys/stat.h :
+/usr/include/bits/stat.h :
+/usr/include/unistd.h :
+/usr/include/bits/posix_opt.h :
+/usr/include/bits/confname.h :
+/usr/include/getopt.h :
+/usr/include/string.h :
+/usr/include/bits/string.h :
+/usr/include/bits/string2.h :
+/usr/include/stdlib.h :
+/usr/include/gtk-1.2/gdk/gdkkeysyms.h :
+/usr/include/gtk-1.2/gtk/gtk.h :
+/usr/include/gtk-1.2/gdk/gdk.h :
+/usr/include/gtk-1.2/gdk/gdktypes.h :
+/usr/include/glib-1.2/glib.h :
+/usr/lib/glib/include/glibconfig.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h :
+/usr/include/limits.h :
+/usr/include/bits/posix1_lim.h :
+/usr/include/bits/local_lim.h :
+/usr/include/linux/limits.h :
+/usr/include/bits/posix2_lim.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h :
+/usr/include/gtk-1.2/gdk/gdkcursors.h :
+/usr/include/gtk-1.2/gdk/gdkrgb.h :
+/usr/include/gtk-1.2/gtk/gtkaccelgroup.h :
+/usr/include/gtk-1.2/gtk/gtkobject.h :
+/usr/include/gtk-1.2/gtk/gtkarg.h :
+/usr/include/gtk-1.2/gtk/gtktypeutils.h :
+/usr/include/gtk-1.2/gtk/gtktypebuiltins.h :
+/usr/include/gtk-1.2/gtk/gtkenums.h :
+/usr/include/gtk-1.2/gtk/gtkdebug.h :
+/usr/include/gtk-1.2/gtk/gtkaccellabel.h :
+/usr/include/gtk-1.2/gtk/gtklabel.h :
+/usr/include/gtk-1.2/gtk/gtkmisc.h :
+/usr/include/gtk-1.2/gtk/gtkwidget.h :
+/usr/include/gtk-1.2/gtk/gtkadjustment.h :
+/usr/include/gtk-1.2/gtk/gtkdata.h :
+/usr/include/gtk-1.2/gtk/gtkstyle.h :
+/usr/include/gtk-1.2/gtk/gtkalignment.h :
+/usr/include/gtk-1.2/gtk/gtkbin.h :
+/usr/include/gtk-1.2/gtk/gtkcontainer.h :
+/usr/include/gtk-1.2/gtk/gtkaspectframe.h :
+/usr/include/gtk-1.2/gtk/gtkframe.h :
+/usr/include/gtk-1.2/gtk/gtkarrow.h :
+/usr/include/gtk-1.2/gtk/gtkbindings.h :
+/usr/include/gtk-1.2/gtk/gtkbox.h :
+/usr/include/gtk-1.2/gtk/gtkbbox.h :
+/usr/include/gtk-1.2/gtk/gtkbutton.h :
+/usr/include/gtk-1.2/gtk/gtkcalendar.h :
+/usr/include/gtk-1.2/gtk/gtksignal.h :
+/usr/include/gtk-1.2/gtk/gtkmarshal.h :
+/usr/include/gtk-1.2/gtk/gtkcheckbutton.h :
+/usr/include/gtk-1.2/gtk/gtktogglebutton.h :
+/usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkitem.h :
+/usr/include/gtk-1.2/gtk/gtkclist.h :
+/usr/include/gtk-1.2/gtk/gtkhscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkrange.h :
+/usr/include/gtk-1.2/gtk/gtkvscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkcolorsel.h :
+/usr/include/gtk-1.2/gtk/gtkwindow.h :
+/usr/include/gtk-1.2/gtk/gtkvbox.h :
+/usr/include/gtk-1.2/gtk/gtkpreview.h :
+/usr/include/gtk-1.2/gtk/gtkentry.h :
+/usr/include/gtk-1.2/gtk/gtkeditable.h :
+/usr/include/gtk-1.2/gtk/gtkhbox.h :
+/usr/include/gtk-1.2/gtk/gtkmain.h :
+/usr/include/gtk-1.2/gtk/gtkscale.h :
+/usr/include/gtk-1.2/gtk/gtkhscale.h :
+/usr/include/gtk-1.2/gtk/gtktable.h :
+/usr/include/gtk-1.2/gtk/gtkeventbox.h :
+/usr/include/gtk-1.2/gtk/gtkcombo.h :
+/usr/include/gtk-1.2/gtk/gtkcompat.h :
+/usr/include/gtk-1.2/gtk/gtkctree.h :
+/usr/include/gtk-1.2/gtk/gtkcurve.h :
+/usr/include/gtk-1.2/gtk/gtkdrawingarea.h :
+/usr/include/gtk-1.2/gtk/gtkdialog.h :
+/usr/include/gtk-1.2/gtk/gtkdnd.h :
+/usr/include/gtk-1.2/gtk/gtkselection.h :
+/usr/include/gtk-1.2/gtk/gtkfeatures.h :
+/usr/include/gtk-1.2/gtk/gtkfilesel.h :
+/usr/include/gtk-1.2/gtk/gtkfixed.h :
+/usr/include/gtk-1.2/gtk/gtkfontsel.h :
+/usr/include/gtk-1.2/gtk/gtknotebook.h :
+/usr/include/gtk-1.2/gtk/gtkgamma.h :
+/usr/include/gtk-1.2/gtk/gtkgc.h :
+/usr/include/gtk-1.2/gtk/gtkhandlebox.h :
+/usr/include/gtk-1.2/gtk/gtkhbbox.h :
+/usr/include/gtk-1.2/gtk/gtkhpaned.h :
+/usr/include/gtk-1.2/gtk/gtkpaned.h :
+/usr/include/gtk-1.2/gtk/gtkhruler.h :
+/usr/include/gtk-1.2/gtk/gtkruler.h :
+/usr/include/gtk-1.2/gtk/gtkhseparator.h :
+/usr/include/gtk-1.2/gtk/gtkseparator.h :
+/usr/include/gtk-1.2/gtk/gtkimage.h :
+/usr/include/gtk-1.2/gtk/gtkinputdialog.h :
+/usr/include/gtk-1.2/gtk/gtkitemfactory.h :
+/usr/include/gtk-1.2/gtk/gtkmenufactory.h :
+/usr/include/gtk-1.2/gtk/gtklayout.h :
+/usr/include/gtk-1.2/gtk/gtklist.h :
+/usr/include/gtk-1.2/gtk/gtklistitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenu.h :
+/usr/include/gtk-1.2/gtk/gtkmenushell.h :
+/usr/include/gtk-1.2/gtk/gtkmenubar.h :
+/usr/include/gtk-1.2/gtk/gtkoptionmenu.h :
+/usr/include/gtk-1.2/gtk/gtkpacker.h :
+/usr/include/gtk-1.2/gtk/gtkpixmap.h :
+/usr/include/gtk-1.2/gtk/gtkplug.h :
+/usr/include/gtk-1.2/gtk/gtkprogress.h :
+/usr/include/gtk-1.2/gtk/gtkprogressbar.h :
+/usr/include/gtk-1.2/gtk/gtkradiobutton.h :
+/usr/include/gtk-1.2/gtk/gtkradiomenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkrc.h :
+/usr/include/gtk-1.2/gtk/gtkscrolledwindow.h :
+/usr/include/gtk-1.2/gtk/gtkviewport.h :
+/usr/include/gtk-1.2/gtk/gtksocket.h :
+/usr/include/gtk-1.2/gtk/gtkspinbutton.h :
+/usr/include/gtk-1.2/gtk/gtkstatusbar.h :
+/usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtktext.h :
+/usr/include/gtk-1.2/gtk/gtkthemes.h :
+/usr/include/gtk-1.2/gtk/gtktipsquery.h :
+/usr/include/gtk-1.2/gtk/gtktoolbar.h :
+/usr/include/gtk-1.2/gtk/gtktooltips.h :
+/usr/include/gtk-1.2/gtk/gtktree.h :
+/usr/include/gtk-1.2/gtk/gtktreeitem.h :
+/usr/include/gtk-1.2/gtk/gtkvbbox.h :
+/usr/include/gtk-1.2/gtk/gtkvpaned.h :
+/usr/include/gtk-1.2/gtk/gtkvruler.h :
+/usr/include/gtk-1.2/gtk/gtkvscale.h :
+/usr/include/gtk-1.2/gtk/gtkvseparator.h :
+callbacks.h :
+interface.h :
+support.h :
+/usr/include/libintl.h :
+/usr/include/locale.h :
+/usr/include/bits/locale.h :
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/main.P
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/main.P Wed Dec 27 00:14:01 2006
@@ -0,0 +1,246 @@
+main.o: main.c ../config.h /usr/include/gtk-1.2/gtk/gtk.h \
+ /usr/include/gtk-1.2/gdk/gdk.h /usr/include/gtk-1.2/gdk/gdktypes.h \
+ /usr/include/glib-1.2/glib.h /usr/lib/glib/include/glibconfig.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h \
+ /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ /usr/include/gtk-1.2/gdk/gdkcursors.h /usr/include/gtk-1.2/gdk/gdkrgb.h \
+ /usr/include/gtk-1.2/gtk/gtkaccelgroup.h \
+ /usr/include/gtk-1.2/gtk/gtkobject.h /usr/include/gtk-1.2/gtk/gtkarg.h \
+ /usr/include/gtk-1.2/gtk/gtktypeutils.h \
+ /usr/include/gtk-1.2/gtk/gtktypebuiltins.h \
+ /usr/include/gtk-1.2/gtk/gtkenums.h /usr/include/gtk-1.2/gtk/gtkdebug.h \
+ /usr/include/gtk-1.2/gtk/gtkaccellabel.h \
+ /usr/include/gtk-1.2/gtk/gtklabel.h /usr/include/gtk-1.2/gtk/gtkmisc.h \
+ /usr/include/gtk-1.2/gtk/gtkwidget.h \
+ /usr/include/gtk-1.2/gtk/gtkadjustment.h \
+ /usr/include/gtk-1.2/gtk/gtkdata.h /usr/include/gtk-1.2/gtk/gtkstyle.h \
+ /usr/include/gtk-1.2/gtk/gtkalignment.h \
+ /usr/include/gtk-1.2/gtk/gtkbin.h \
+ /usr/include/gtk-1.2/gtk/gtkcontainer.h \
+ /usr/include/gtk-1.2/gtk/gtkaspectframe.h \
+ /usr/include/gtk-1.2/gtk/gtkframe.h /usr/include/gtk-1.2/gtk/gtkarrow.h \
+ /usr/include/gtk-1.2/gtk/gtkbindings.h \
+ /usr/include/gtk-1.2/gtk/gtkbox.h /usr/include/gtk-1.2/gtk/gtkbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcalendar.h \
+ /usr/include/gtk-1.2/gtk/gtksignal.h \
+ /usr/include/gtk-1.2/gtk/gtkmarshal.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckbutton.h \
+ /usr/include/gtk-1.2/gtk/gtktogglebutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkitem.h /usr/include/gtk-1.2/gtk/gtkclist.h \
+ /usr/include/gtk-1.2/gtk/gtkhscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkrange.h \
+ /usr/include/gtk-1.2/gtk/gtkvscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkcolorsel.h \
+ /usr/include/gtk-1.2/gtk/gtkwindow.h /usr/include/gtk-1.2/gtk/gtkvbox.h \
+ /usr/include/gtk-1.2/gtk/gtkpreview.h \
+ /usr/include/gtk-1.2/gtk/gtkentry.h \
+ /usr/include/gtk-1.2/gtk/gtkeditable.h \
+ /usr/include/gtk-1.2/gtk/gtkhbox.h /usr/include/gtk-1.2/gtk/gtkmain.h \
+ /usr/include/gtk-1.2/gtk/gtkscale.h \
+ /usr/include/gtk-1.2/gtk/gtkhscale.h \
+ /usr/include/gtk-1.2/gtk/gtktable.h \
+ /usr/include/gtk-1.2/gtk/gtkeventbox.h \
+ /usr/include/gtk-1.2/gtk/gtkcombo.h \
+ /usr/include/gtk-1.2/gtk/gtkcompat.h \
+ /usr/include/gtk-1.2/gtk/gtkctree.h /usr/include/gtk-1.2/gtk/gtkcurve.h \
+ /usr/include/gtk-1.2/gtk/gtkdrawingarea.h \
+ /usr/include/gtk-1.2/gtk/gtkdialog.h /usr/include/gtk-1.2/gtk/gtkdnd.h \
+ /usr/include/gtk-1.2/gtk/gtkselection.h \
+ /usr/include/gtk-1.2/gtk/gtkfeatures.h \
+ /usr/include/gtk-1.2/gtk/gtkfilesel.h \
+ /usr/include/gtk-1.2/gtk/gtkfixed.h \
+ /usr/include/gtk-1.2/gtk/gtkfontsel.h \
+ /usr/include/gtk-1.2/gtk/gtknotebook.h \
+ /usr/include/gtk-1.2/gtk/gtkgamma.h /usr/include/gtk-1.2/gtk/gtkgc.h \
+ /usr/include/gtk-1.2/gtk/gtkhandlebox.h \
+ /usr/include/gtk-1.2/gtk/gtkhbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkhpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkhruler.h \
+ /usr/include/gtk-1.2/gtk/gtkruler.h \
+ /usr/include/gtk-1.2/gtk/gtkhseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkimage.h \
+ /usr/include/gtk-1.2/gtk/gtkinputdialog.h \
+ /usr/include/gtk-1.2/gtk/gtkitemfactory.h \
+ /usr/include/gtk-1.2/gtk/gtkmenufactory.h \
+ /usr/include/gtk-1.2/gtk/gtklayout.h /usr/include/gtk-1.2/gtk/gtklist.h \
+ /usr/include/gtk-1.2/gtk/gtklistitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkmenushell.h \
+ /usr/include/gtk-1.2/gtk/gtkmenubar.h \
+ /usr/include/gtk-1.2/gtk/gtkoptionmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkpacker.h \
+ /usr/include/gtk-1.2/gtk/gtkpixmap.h /usr/include/gtk-1.2/gtk/gtkplug.h \
+ /usr/include/gtk-1.2/gtk/gtkprogress.h \
+ /usr/include/gtk-1.2/gtk/gtkprogressbar.h \
+ /usr/include/gtk-1.2/gtk/gtkradiobutton.h \
+ /usr/include/gtk-1.2/gtk/gtkradiomenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkrc.h \
+ /usr/include/gtk-1.2/gtk/gtkscrolledwindow.h \
+ /usr/include/gtk-1.2/gtk/gtkviewport.h \
+ /usr/include/gtk-1.2/gtk/gtksocket.h \
+ /usr/include/gtk-1.2/gtk/gtkspinbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkstatusbar.h \
+ /usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtktext.h /usr/include/gtk-1.2/gtk/gtkthemes.h \
+ /usr/include/gtk-1.2/gtk/gtktipsquery.h \
+ /usr/include/gtk-1.2/gtk/gtktoolbar.h \
+ /usr/include/gtk-1.2/gtk/gtktooltips.h \
+ /usr/include/gtk-1.2/gtk/gtktree.h \
+ /usr/include/gtk-1.2/gtk/gtktreeitem.h \
+ /usr/include/gtk-1.2/gtk/gtkvbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkvpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkvruler.h \
+ /usr/include/gtk-1.2/gtk/gtkvscale.h \
+ /usr/include/gtk-1.2/gtk/gtkvseparator.h interface.h support.h \
+ /usr/include/libintl.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h \
+ /usr/include/locale.h /usr/include/bits/locale.h status.h
+main.c :
+../config.h :
+/usr/include/gtk-1.2/gtk/gtk.h :
+/usr/include/gtk-1.2/gdk/gdk.h :
+/usr/include/gtk-1.2/gdk/gdktypes.h :
+/usr/include/glib-1.2/glib.h :
+/usr/lib/glib/include/glibconfig.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h :
+/usr/include/limits.h :
+/usr/include/features.h :
+/usr/include/sys/cdefs.h :
+/usr/include/gnu/stubs.h :
+/usr/include/bits/posix1_lim.h :
+/usr/include/bits/local_lim.h :
+/usr/include/linux/limits.h :
+/usr/include/bits/posix2_lim.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h :
+/usr/include/gtk-1.2/gdk/gdkcursors.h :
+/usr/include/gtk-1.2/gdk/gdkrgb.h :
+/usr/include/gtk-1.2/gtk/gtkaccelgroup.h :
+/usr/include/gtk-1.2/gtk/gtkobject.h :
+/usr/include/gtk-1.2/gtk/gtkarg.h :
+/usr/include/gtk-1.2/gtk/gtktypeutils.h :
+/usr/include/gtk-1.2/gtk/gtktypebuiltins.h :
+/usr/include/gtk-1.2/gtk/gtkenums.h :
+/usr/include/gtk-1.2/gtk/gtkdebug.h :
+/usr/include/gtk-1.2/gtk/gtkaccellabel.h :
+/usr/include/gtk-1.2/gtk/gtklabel.h :
+/usr/include/gtk-1.2/gtk/gtkmisc.h :
+/usr/include/gtk-1.2/gtk/gtkwidget.h :
+/usr/include/gtk-1.2/gtk/gtkadjustment.h :
+/usr/include/gtk-1.2/gtk/gtkdata.h :
+/usr/include/gtk-1.2/gtk/gtkstyle.h :
+/usr/include/gtk-1.2/gtk/gtkalignment.h :
+/usr/include/gtk-1.2/gtk/gtkbin.h :
+/usr/include/gtk-1.2/gtk/gtkcontainer.h :
+/usr/include/gtk-1.2/gtk/gtkaspectframe.h :
+/usr/include/gtk-1.2/gtk/gtkframe.h :
+/usr/include/gtk-1.2/gtk/gtkarrow.h :
+/usr/include/gtk-1.2/gtk/gtkbindings.h :
+/usr/include/gtk-1.2/gtk/gtkbox.h :
+/usr/include/gtk-1.2/gtk/gtkbbox.h :
+/usr/include/gtk-1.2/gtk/gtkbutton.h :
+/usr/include/gtk-1.2/gtk/gtkcalendar.h :
+/usr/include/gtk-1.2/gtk/gtksignal.h :
+/usr/include/gtk-1.2/gtk/gtkmarshal.h :
+/usr/include/gtk-1.2/gtk/gtkcheckbutton.h :
+/usr/include/gtk-1.2/gtk/gtktogglebutton.h :
+/usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkitem.h :
+/usr/include/gtk-1.2/gtk/gtkclist.h :
+/usr/include/gtk-1.2/gtk/gtkhscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkrange.h :
+/usr/include/gtk-1.2/gtk/gtkvscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkcolorsel.h :
+/usr/include/gtk-1.2/gtk/gtkwindow.h :
+/usr/include/gtk-1.2/gtk/gtkvbox.h :
+/usr/include/gtk-1.2/gtk/gtkpreview.h :
+/usr/include/gtk-1.2/gtk/gtkentry.h :
+/usr/include/gtk-1.2/gtk/gtkeditable.h :
+/usr/include/gtk-1.2/gtk/gtkhbox.h :
+/usr/include/gtk-1.2/gtk/gtkmain.h :
+/usr/include/gtk-1.2/gtk/gtkscale.h :
+/usr/include/gtk-1.2/gtk/gtkhscale.h :
+/usr/include/gtk-1.2/gtk/gtktable.h :
+/usr/include/gtk-1.2/gtk/gtkeventbox.h :
+/usr/include/gtk-1.2/gtk/gtkcombo.h :
+/usr/include/gtk-1.2/gtk/gtkcompat.h :
+/usr/include/gtk-1.2/gtk/gtkctree.h :
+/usr/include/gtk-1.2/gtk/gtkcurve.h :
+/usr/include/gtk-1.2/gtk/gtkdrawingarea.h :
+/usr/include/gtk-1.2/gtk/gtkdialog.h :
+/usr/include/gtk-1.2/gtk/gtkdnd.h :
+/usr/include/gtk-1.2/gtk/gtkselection.h :
+/usr/include/gtk-1.2/gtk/gtkfeatures.h :
+/usr/include/gtk-1.2/gtk/gtkfilesel.h :
+/usr/include/gtk-1.2/gtk/gtkfixed.h :
+/usr/include/gtk-1.2/gtk/gtkfontsel.h :
+/usr/include/gtk-1.2/gtk/gtknotebook.h :
+/usr/include/gtk-1.2/gtk/gtkgamma.h :
+/usr/include/gtk-1.2/gtk/gtkgc.h :
+/usr/include/gtk-1.2/gtk/gtkhandlebox.h :
+/usr/include/gtk-1.2/gtk/gtkhbbox.h :
+/usr/include/gtk-1.2/gtk/gtkhpaned.h :
+/usr/include/gtk-1.2/gtk/gtkpaned.h :
+/usr/include/gtk-1.2/gtk/gtkhruler.h :
+/usr/include/gtk-1.2/gtk/gtkruler.h :
+/usr/include/gtk-1.2/gtk/gtkhseparator.h :
+/usr/include/gtk-1.2/gtk/gtkseparator.h :
+/usr/include/gtk-1.2/gtk/gtkimage.h :
+/usr/include/gtk-1.2/gtk/gtkinputdialog.h :
+/usr/include/gtk-1.2/gtk/gtkitemfactory.h :
+/usr/include/gtk-1.2/gtk/gtkmenufactory.h :
+/usr/include/gtk-1.2/gtk/gtklayout.h :
+/usr/include/gtk-1.2/gtk/gtklist.h :
+/usr/include/gtk-1.2/gtk/gtklistitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenu.h :
+/usr/include/gtk-1.2/gtk/gtkmenushell.h :
+/usr/include/gtk-1.2/gtk/gtkmenubar.h :
+/usr/include/gtk-1.2/gtk/gtkoptionmenu.h :
+/usr/include/gtk-1.2/gtk/gtkpacker.h :
+/usr/include/gtk-1.2/gtk/gtkpixmap.h :
+/usr/include/gtk-1.2/gtk/gtkplug.h :
+/usr/include/gtk-1.2/gtk/gtkprogress.h :
+/usr/include/gtk-1.2/gtk/gtkprogressbar.h :
+/usr/include/gtk-1.2/gtk/gtkradiobutton.h :
+/usr/include/gtk-1.2/gtk/gtkradiomenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkrc.h :
+/usr/include/gtk-1.2/gtk/gtkscrolledwindow.h :
+/usr/include/gtk-1.2/gtk/gtkviewport.h :
+/usr/include/gtk-1.2/gtk/gtksocket.h :
+/usr/include/gtk-1.2/gtk/gtkspinbutton.h :
+/usr/include/gtk-1.2/gtk/gtkstatusbar.h :
+/usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtktext.h :
+/usr/include/gtk-1.2/gtk/gtkthemes.h :
+/usr/include/gtk-1.2/gtk/gtktipsquery.h :
+/usr/include/gtk-1.2/gtk/gtktoolbar.h :
+/usr/include/gtk-1.2/gtk/gtktooltips.h :
+/usr/include/gtk-1.2/gtk/gtktree.h :
+/usr/include/gtk-1.2/gtk/gtktreeitem.h :
+/usr/include/gtk-1.2/gtk/gtkvbbox.h :
+/usr/include/gtk-1.2/gtk/gtkvpaned.h :
+/usr/include/gtk-1.2/gtk/gtkvruler.h :
+/usr/include/gtk-1.2/gtk/gtkvscale.h :
+/usr/include/gtk-1.2/gtk/gtkvseparator.h :
+interface.h :
+support.h :
+/usr/include/libintl.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h :
+/usr/include/locale.h :
+/usr/include/bits/locale.h :
+status.h :
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/status.P
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/status.P Wed Dec 27 00:14:01 2006
@@ -0,0 +1,380 @@
+status.o: status.c ../config.h /usr/include/gtk-1.2/gtk/gtk.h \
+ /usr/include/gtk-1.2/gdk/gdk.h /usr/include/gtk-1.2/gdk/gdktypes.h \
+ /usr/include/glib-1.2/glib.h /usr/lib/glib/include/glibconfig.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h \
+ /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ /usr/include/gtk-1.2/gdk/gdkcursors.h /usr/include/gtk-1.2/gdk/gdkrgb.h \
+ /usr/include/gtk-1.2/gtk/gtkaccelgroup.h \
+ /usr/include/gtk-1.2/gtk/gtkobject.h /usr/include/gtk-1.2/gtk/gtkarg.h \
+ /usr/include/gtk-1.2/gtk/gtktypeutils.h \
+ /usr/include/gtk-1.2/gtk/gtktypebuiltins.h \
+ /usr/include/gtk-1.2/gtk/gtkenums.h /usr/include/gtk-1.2/gtk/gtkdebug.h \
+ /usr/include/gtk-1.2/gtk/gtkaccellabel.h \
+ /usr/include/gtk-1.2/gtk/gtklabel.h /usr/include/gtk-1.2/gtk/gtkmisc.h \
+ /usr/include/gtk-1.2/gtk/gtkwidget.h \
+ /usr/include/gtk-1.2/gtk/gtkadjustment.h \
+ /usr/include/gtk-1.2/gtk/gtkdata.h /usr/include/gtk-1.2/gtk/gtkstyle.h \
+ /usr/include/gtk-1.2/gtk/gtkalignment.h \
+ /usr/include/gtk-1.2/gtk/gtkbin.h \
+ /usr/include/gtk-1.2/gtk/gtkcontainer.h \
+ /usr/include/gtk-1.2/gtk/gtkaspectframe.h \
+ /usr/include/gtk-1.2/gtk/gtkframe.h /usr/include/gtk-1.2/gtk/gtkarrow.h \
+ /usr/include/gtk-1.2/gtk/gtkbindings.h \
+ /usr/include/gtk-1.2/gtk/gtkbox.h /usr/include/gtk-1.2/gtk/gtkbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcalendar.h \
+ /usr/include/gtk-1.2/gtk/gtksignal.h \
+ /usr/include/gtk-1.2/gtk/gtkmarshal.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckbutton.h \
+ /usr/include/gtk-1.2/gtk/gtktogglebutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkitem.h /usr/include/gtk-1.2/gtk/gtkclist.h \
+ /usr/include/gtk-1.2/gtk/gtkhscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkrange.h \
+ /usr/include/gtk-1.2/gtk/gtkvscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkcolorsel.h \
+ /usr/include/gtk-1.2/gtk/gtkwindow.h /usr/include/gtk-1.2/gtk/gtkvbox.h \
+ /usr/include/gtk-1.2/gtk/gtkpreview.h \
+ /usr/include/gtk-1.2/gtk/gtkentry.h \
+ /usr/include/gtk-1.2/gtk/gtkeditable.h \
+ /usr/include/gtk-1.2/gtk/gtkhbox.h /usr/include/gtk-1.2/gtk/gtkmain.h \
+ /usr/include/gtk-1.2/gtk/gtkscale.h \
+ /usr/include/gtk-1.2/gtk/gtkhscale.h \
+ /usr/include/gtk-1.2/gtk/gtktable.h \
+ /usr/include/gtk-1.2/gtk/gtkeventbox.h \
+ /usr/include/gtk-1.2/gtk/gtkcombo.h \
+ /usr/include/gtk-1.2/gtk/gtkcompat.h \
+ /usr/include/gtk-1.2/gtk/gtkctree.h /usr/include/gtk-1.2/gtk/gtkcurve.h \
+ /usr/include/gtk-1.2/gtk/gtkdrawingarea.h \
+ /usr/include/gtk-1.2/gtk/gtkdialog.h /usr/include/gtk-1.2/gtk/gtkdnd.h \
+ /usr/include/gtk-1.2/gtk/gtkselection.h \
+ /usr/include/gtk-1.2/gtk/gtkfeatures.h \
+ /usr/include/gtk-1.2/gtk/gtkfilesel.h \
+ /usr/include/gtk-1.2/gtk/gtkfixed.h \
+ /usr/include/gtk-1.2/gtk/gtkfontsel.h \
+ /usr/include/gtk-1.2/gtk/gtknotebook.h \
+ /usr/include/gtk-1.2/gtk/gtkgamma.h /usr/include/gtk-1.2/gtk/gtkgc.h \
+ /usr/include/gtk-1.2/gtk/gtkhandlebox.h \
+ /usr/include/gtk-1.2/gtk/gtkhbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkhpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkhruler.h \
+ /usr/include/gtk-1.2/gtk/gtkruler.h \
+ /usr/include/gtk-1.2/gtk/gtkhseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkimage.h \
+ /usr/include/gtk-1.2/gtk/gtkinputdialog.h \
+ /usr/include/gtk-1.2/gtk/gtkitemfactory.h \
+ /usr/include/gtk-1.2/gtk/gtkmenufactory.h \
+ /usr/include/gtk-1.2/gtk/gtklayout.h /usr/include/gtk-1.2/gtk/gtklist.h \
+ /usr/include/gtk-1.2/gtk/gtklistitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkmenushell.h \
+ /usr/include/gtk-1.2/gtk/gtkmenubar.h \
+ /usr/include/gtk-1.2/gtk/gtkoptionmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkpacker.h \
+ /usr/include/gtk-1.2/gtk/gtkpixmap.h /usr/include/gtk-1.2/gtk/gtkplug.h \
+ /usr/include/gtk-1.2/gtk/gtkprogress.h \
+ /usr/include/gtk-1.2/gtk/gtkprogressbar.h \
+ /usr/include/gtk-1.2/gtk/gtkradiobutton.h \
+ /usr/include/gtk-1.2/gtk/gtkradiomenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkrc.h \
+ /usr/include/gtk-1.2/gtk/gtkscrolledwindow.h \
+ /usr/include/gtk-1.2/gtk/gtkviewport.h \
+ /usr/include/gtk-1.2/gtk/gtksocket.h \
+ /usr/include/gtk-1.2/gtk/gtkspinbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkstatusbar.h \
+ /usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtktext.h /usr/include/gtk-1.2/gtk/gtkthemes.h \
+ /usr/include/gtk-1.2/gtk/gtktipsquery.h \
+ /usr/include/gtk-1.2/gtk/gtktoolbar.h \
+ /usr/include/gtk-1.2/gtk/gtktooltips.h \
+ /usr/include/gtk-1.2/gtk/gtktree.h \
+ /usr/include/gtk-1.2/gtk/gtktreeitem.h \
+ /usr/include/gtk-1.2/gtk/gtkvbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkvpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkvruler.h \
+ /usr/include/gtk-1.2/gtk/gtkvscale.h \
+ /usr/include/gtk-1.2/gtk/gtkvseparator.h /usr/include/stdio.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h \
+ /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+ /usr/include/bits/typesizes.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+ /usr/include/gconv.h /usr/include/bits/stdio_lim.h \
+ /usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \
+ /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/types.h \
+ /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+ /usr/include/sys/select.h /usr/include/bits/select.h \
+ /usr/include/bits/sigset.h /usr/include/bits/time.h \
+ /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+ /usr/include/bits/sched.h /usr/include/stdint.h /usr/include/stdlib.h \
+ /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+ /usr/include/bits/string2.h /usr/include/math.h \
+ /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
+ /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+ /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+ /usr/include/bits/confname.h /usr/include/getopt.h \
+ /usr/include/signal.h /usr/include/bits/signum.h \
+ /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
+ /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
+ /usr/include/asm-i386/sigcontext.h /usr/include/bits/sigstack.h \
+ /usr/include/bits/sigthread.h /usr/include/errno.h \
+ /usr/include/bits/errno.h /usr/include/linux/errno.h \
+ /usr/include/asm/errno.h /usr/include/asm-i386/errno.h \
+ /usr/include/sys/ioctl.h /usr/include/bits/ioctls.h \
+ /usr/include/asm/ioctls.h /usr/include/asm-i386/ioctls.h \
+ /usr/include/asm/ioctl.h /usr/include/asm-i386/ioctl.h \
+ /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \
+ /usr/include/sys/socket.h /usr/include/sys/uio.h \
+ /usr/include/bits/uio.h /usr/include/bits/socket.h \
+ /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
+ /usr/include/asm-i386/socket.h /usr/include/asm/sockios.h \
+ /usr/include/asm-i386/sockios.h /usr/include/netinet/in.h \
+ /usr/include/bits/in.h /usr/include/bits/byteswap.h \
+ /usr/include/arpa/inet.h /usr/include/net/if.h \
+ /usr/include/linux/atmdev.h /usr/include/linux/atmapi.h \
+ /usr/include/linux/atm.h /usr/include/linux/types.h \
+ /usr/include/linux/posix_types.h /usr/include/linux/stddef.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/asm/posix_types.h \
+ /usr/include/asm/posix_types.h /usr/include/asm-i386/posix_types.h \
+ /usr/include/asm/types.h /usr/include/asm-i386/types.h \
+ /usr/include/linux/atmsap.h /usr/include/linux/atmioc.h ../../amu/amu.h \
+ ../../include/types.h ../../amu/amas.h ../../include/unicorn.h \
+ support.h /usr/include/libintl.h /usr/include/locale.h \
+ /usr/include/bits/locale.h
+status.c :
+../config.h :
+/usr/include/gtk-1.2/gtk/gtk.h :
+/usr/include/gtk-1.2/gdk/gdk.h :
+/usr/include/gtk-1.2/gdk/gdktypes.h :
+/usr/include/glib-1.2/glib.h :
+/usr/lib/glib/include/glibconfig.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h :
+/usr/include/limits.h :
+/usr/include/features.h :
+/usr/include/sys/cdefs.h :
+/usr/include/gnu/stubs.h :
+/usr/include/bits/posix1_lim.h :
+/usr/include/bits/local_lim.h :
+/usr/include/linux/limits.h :
+/usr/include/bits/posix2_lim.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h :
+/usr/include/gtk-1.2/gdk/gdkcursors.h :
+/usr/include/gtk-1.2/gdk/gdkrgb.h :
+/usr/include/gtk-1.2/gtk/gtkaccelgroup.h :
+/usr/include/gtk-1.2/gtk/gtkobject.h :
+/usr/include/gtk-1.2/gtk/gtkarg.h :
+/usr/include/gtk-1.2/gtk/gtktypeutils.h :
+/usr/include/gtk-1.2/gtk/gtktypebuiltins.h :
+/usr/include/gtk-1.2/gtk/gtkenums.h :
+/usr/include/gtk-1.2/gtk/gtkdebug.h :
+/usr/include/gtk-1.2/gtk/gtkaccellabel.h :
+/usr/include/gtk-1.2/gtk/gtklabel.h :
+/usr/include/gtk-1.2/gtk/gtkmisc.h :
+/usr/include/gtk-1.2/gtk/gtkwidget.h :
+/usr/include/gtk-1.2/gtk/gtkadjustment.h :
+/usr/include/gtk-1.2/gtk/gtkdata.h :
+/usr/include/gtk-1.2/gtk/gtkstyle.h :
+/usr/include/gtk-1.2/gtk/gtkalignment.h :
+/usr/include/gtk-1.2/gtk/gtkbin.h :
+/usr/include/gtk-1.2/gtk/gtkcontainer.h :
+/usr/include/gtk-1.2/gtk/gtkaspectframe.h :
+/usr/include/gtk-1.2/gtk/gtkframe.h :
+/usr/include/gtk-1.2/gtk/gtkarrow.h :
+/usr/include/gtk-1.2/gtk/gtkbindings.h :
+/usr/include/gtk-1.2/gtk/gtkbox.h :
+/usr/include/gtk-1.2/gtk/gtkbbox.h :
+/usr/include/gtk-1.2/gtk/gtkbutton.h :
+/usr/include/gtk-1.2/gtk/gtkcalendar.h :
+/usr/include/gtk-1.2/gtk/gtksignal.h :
+/usr/include/gtk-1.2/gtk/gtkmarshal.h :
+/usr/include/gtk-1.2/gtk/gtkcheckbutton.h :
+/usr/include/gtk-1.2/gtk/gtktogglebutton.h :
+/usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkitem.h :
+/usr/include/gtk-1.2/gtk/gtkclist.h :
+/usr/include/gtk-1.2/gtk/gtkhscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkrange.h :
+/usr/include/gtk-1.2/gtk/gtkvscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkcolorsel.h :
+/usr/include/gtk-1.2/gtk/gtkwindow.h :
+/usr/include/gtk-1.2/gtk/gtkvbox.h :
+/usr/include/gtk-1.2/gtk/gtkpreview.h :
+/usr/include/gtk-1.2/gtk/gtkentry.h :
+/usr/include/gtk-1.2/gtk/gtkeditable.h :
+/usr/include/gtk-1.2/gtk/gtkhbox.h :
+/usr/include/gtk-1.2/gtk/gtkmain.h :
+/usr/include/gtk-1.2/gtk/gtkscale.h :
+/usr/include/gtk-1.2/gtk/gtkhscale.h :
+/usr/include/gtk-1.2/gtk/gtktable.h :
+/usr/include/gtk-1.2/gtk/gtkeventbox.h :
+/usr/include/gtk-1.2/gtk/gtkcombo.h :
+/usr/include/gtk-1.2/gtk/gtkcompat.h :
+/usr/include/gtk-1.2/gtk/gtkctree.h :
+/usr/include/gtk-1.2/gtk/gtkcurve.h :
+/usr/include/gtk-1.2/gtk/gtkdrawingarea.h :
+/usr/include/gtk-1.2/gtk/gtkdialog.h :
+/usr/include/gtk-1.2/gtk/gtkdnd.h :
+/usr/include/gtk-1.2/gtk/gtkselection.h :
+/usr/include/gtk-1.2/gtk/gtkfeatures.h :
+/usr/include/gtk-1.2/gtk/gtkfilesel.h :
+/usr/include/gtk-1.2/gtk/gtkfixed.h :
+/usr/include/gtk-1.2/gtk/gtkfontsel.h :
+/usr/include/gtk-1.2/gtk/gtknotebook.h :
+/usr/include/gtk-1.2/gtk/gtkgamma.h :
+/usr/include/gtk-1.2/gtk/gtkgc.h :
+/usr/include/gtk-1.2/gtk/gtkhandlebox.h :
+/usr/include/gtk-1.2/gtk/gtkhbbox.h :
+/usr/include/gtk-1.2/gtk/gtkhpaned.h :
+/usr/include/gtk-1.2/gtk/gtkpaned.h :
+/usr/include/gtk-1.2/gtk/gtkhruler.h :
+/usr/include/gtk-1.2/gtk/gtkruler.h :
+/usr/include/gtk-1.2/gtk/gtkhseparator.h :
+/usr/include/gtk-1.2/gtk/gtkseparator.h :
+/usr/include/gtk-1.2/gtk/gtkimage.h :
+/usr/include/gtk-1.2/gtk/gtkinputdialog.h :
+/usr/include/gtk-1.2/gtk/gtkitemfactory.h :
+/usr/include/gtk-1.2/gtk/gtkmenufactory.h :
+/usr/include/gtk-1.2/gtk/gtklayout.h :
+/usr/include/gtk-1.2/gtk/gtklist.h :
+/usr/include/gtk-1.2/gtk/gtklistitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenu.h :
+/usr/include/gtk-1.2/gtk/gtkmenushell.h :
+/usr/include/gtk-1.2/gtk/gtkmenubar.h :
+/usr/include/gtk-1.2/gtk/gtkoptionmenu.h :
+/usr/include/gtk-1.2/gtk/gtkpacker.h :
+/usr/include/gtk-1.2/gtk/gtkpixmap.h :
+/usr/include/gtk-1.2/gtk/gtkplug.h :
+/usr/include/gtk-1.2/gtk/gtkprogress.h :
+/usr/include/gtk-1.2/gtk/gtkprogressbar.h :
+/usr/include/gtk-1.2/gtk/gtkradiobutton.h :
+/usr/include/gtk-1.2/gtk/gtkradiomenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkrc.h :
+/usr/include/gtk-1.2/gtk/gtkscrolledwindow.h :
+/usr/include/gtk-1.2/gtk/gtkviewport.h :
+/usr/include/gtk-1.2/gtk/gtksocket.h :
+/usr/include/gtk-1.2/gtk/gtkspinbutton.h :
+/usr/include/gtk-1.2/gtk/gtkstatusbar.h :
+/usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtktext.h :
+/usr/include/gtk-1.2/gtk/gtkthemes.h :
+/usr/include/gtk-1.2/gtk/gtktipsquery.h :
+/usr/include/gtk-1.2/gtk/gtktoolbar.h :
+/usr/include/gtk-1.2/gtk/gtktooltips.h :
+/usr/include/gtk-1.2/gtk/gtktree.h :
+/usr/include/gtk-1.2/gtk/gtktreeitem.h :
+/usr/include/gtk-1.2/gtk/gtkvbbox.h :
+/usr/include/gtk-1.2/gtk/gtkvpaned.h :
+/usr/include/gtk-1.2/gtk/gtkvruler.h :
+/usr/include/gtk-1.2/gtk/gtkvscale.h :
+/usr/include/gtk-1.2/gtk/gtkvseparator.h :
+/usr/include/stdio.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h :
+/usr/include/bits/types.h :
+/usr/include/bits/wordsize.h :
+/usr/include/bits/typesizes.h :
+/usr/include/libio.h :
+/usr/include/_G_config.h :
+/usr/include/wchar.h :
+/usr/include/bits/wchar.h :
+/usr/include/gconv.h :
+/usr/include/bits/stdio_lim.h :
+/usr/include/bits/sys_errlist.h :
+/usr/include/bits/stdio.h :
+/usr/include/fcntl.h :
+/usr/include/bits/fcntl.h :
+/usr/include/sys/types.h :
+/usr/include/time.h :
+/usr/include/endian.h :
+/usr/include/bits/endian.h :
+/usr/include/sys/select.h :
+/usr/include/bits/select.h :
+/usr/include/bits/sigset.h :
+/usr/include/bits/time.h :
+/usr/include/sys/sysmacros.h :
+/usr/include/bits/pthreadtypes.h :
+/usr/include/bits/sched.h :
+/usr/include/stdint.h :
+/usr/include/stdlib.h :
+/usr/include/alloca.h :
+/usr/include/string.h :
+/usr/include/bits/string.h :
+/usr/include/bits/string2.h :
+/usr/include/math.h :
+/usr/include/bits/huge_val.h :
+/usr/include/bits/mathdef.h :
+/usr/include/bits/mathcalls.h :
+/usr/include/bits/mathinline.h :
+/usr/include/unistd.h :
+/usr/include/bits/posix_opt.h :
+/usr/include/bits/confname.h :
+/usr/include/getopt.h :
+/usr/include/signal.h :
+/usr/include/bits/signum.h :
+/usr/include/bits/siginfo.h :
+/usr/include/bits/sigaction.h :
+/usr/include/bits/sigcontext.h :
+/usr/include/asm/sigcontext.h :
+/usr/include/asm-i386/sigcontext.h :
+/usr/include/bits/sigstack.h :
+/usr/include/bits/sigthread.h :
+/usr/include/errno.h :
+/usr/include/bits/errno.h :
+/usr/include/linux/errno.h :
+/usr/include/asm/errno.h :
+/usr/include/asm-i386/errno.h :
+/usr/include/sys/ioctl.h :
+/usr/include/bits/ioctls.h :
+/usr/include/asm/ioctls.h :
+/usr/include/asm-i386/ioctls.h :
+/usr/include/asm/ioctl.h :
+/usr/include/asm-i386/ioctl.h :
+/usr/include/bits/ioctl-types.h :
+/usr/include/sys/ttydefaults.h :
+/usr/include/sys/socket.h :
+/usr/include/sys/uio.h :
+/usr/include/bits/uio.h :
+/usr/include/bits/socket.h :
+/usr/include/bits/sockaddr.h :
+/usr/include/asm/socket.h :
+/usr/include/asm-i386/socket.h :
+/usr/include/asm/sockios.h :
+/usr/include/asm-i386/sockios.h :
+/usr/include/netinet/in.h :
+/usr/include/bits/in.h :
+/usr/include/bits/byteswap.h :
+/usr/include/arpa/inet.h :
+/usr/include/net/if.h :
+/usr/include/linux/atmdev.h :
+/usr/include/linux/atmapi.h :
+/usr/include/linux/atm.h :
+/usr/include/linux/types.h :
+/usr/include/linux/posix_types.h :
+/usr/include/linux/stddef.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/asm/posix_types.h :
+/usr/include/asm/posix_types.h :
+/usr/include/asm-i386/posix_types.h :
+/usr/include/asm/types.h :
+/usr/include/asm-i386/types.h :
+/usr/include/linux/atmsap.h :
+/usr/include/linux/atmioc.h :
+../../amu/amu.h :
+../../include/types.h :
+../../amu/amas.h :
+../../include/unicorn.h :
+support.h :
+/usr/include/libintl.h :
+/usr/include/locale.h :
+/usr/include/bits/locale.h :
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/support.P
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/.deps/support.P Wed Dec 27 00:14:01 2006
@@ -0,0 +1,279 @@
+support.o: support.c ../config.h /usr/include/sys/types.h \
+ /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/gnu/stubs.h /usr/include/bits/types.h \
+ /usr/include/bits/wordsize.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h \
+ /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/sigset.h \
+ /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+ /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/unistd.h \
+ /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+ /usr/include/getopt.h /usr/include/string.h /usr/include/bits/string.h \
+ /usr/include/bits/string2.h /usr/include/stdlib.h \
+ /usr/include/gtk-1.2/gtk/gtk.h /usr/include/gtk-1.2/gdk/gdk.h \
+ /usr/include/gtk-1.2/gdk/gdktypes.h /usr/include/glib-1.2/glib.h \
+ /usr/lib/glib/include/glibconfig.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h \
+ /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ /usr/include/gtk-1.2/gdk/gdkcursors.h /usr/include/gtk-1.2/gdk/gdkrgb.h \
+ /usr/include/gtk-1.2/gtk/gtkaccelgroup.h \
+ /usr/include/gtk-1.2/gtk/gtkobject.h /usr/include/gtk-1.2/gtk/gtkarg.h \
+ /usr/include/gtk-1.2/gtk/gtktypeutils.h \
+ /usr/include/gtk-1.2/gtk/gtktypebuiltins.h \
+ /usr/include/gtk-1.2/gtk/gtkenums.h /usr/include/gtk-1.2/gtk/gtkdebug.h \
+ /usr/include/gtk-1.2/gtk/gtkaccellabel.h \
+ /usr/include/gtk-1.2/gtk/gtklabel.h /usr/include/gtk-1.2/gtk/gtkmisc.h \
+ /usr/include/gtk-1.2/gtk/gtkwidget.h \
+ /usr/include/gtk-1.2/gtk/gtkadjustment.h \
+ /usr/include/gtk-1.2/gtk/gtkdata.h /usr/include/gtk-1.2/gtk/gtkstyle.h \
+ /usr/include/gtk-1.2/gtk/gtkalignment.h \
+ /usr/include/gtk-1.2/gtk/gtkbin.h \
+ /usr/include/gtk-1.2/gtk/gtkcontainer.h \
+ /usr/include/gtk-1.2/gtk/gtkaspectframe.h \
+ /usr/include/gtk-1.2/gtk/gtkframe.h /usr/include/gtk-1.2/gtk/gtkarrow.h \
+ /usr/include/gtk-1.2/gtk/gtkbindings.h \
+ /usr/include/gtk-1.2/gtk/gtkbox.h /usr/include/gtk-1.2/gtk/gtkbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcalendar.h \
+ /usr/include/gtk-1.2/gtk/gtksignal.h \
+ /usr/include/gtk-1.2/gtk/gtkmarshal.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckbutton.h \
+ /usr/include/gtk-1.2/gtk/gtktogglebutton.h \
+ /usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkitem.h /usr/include/gtk-1.2/gtk/gtkclist.h \
+ /usr/include/gtk-1.2/gtk/gtkhscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkrange.h \
+ /usr/include/gtk-1.2/gtk/gtkvscrollbar.h \
+ /usr/include/gtk-1.2/gtk/gtkcolorsel.h \
+ /usr/include/gtk-1.2/gtk/gtkwindow.h /usr/include/gtk-1.2/gtk/gtkvbox.h \
+ /usr/include/gtk-1.2/gtk/gtkpreview.h \
+ /usr/include/gtk-1.2/gtk/gtkentry.h \
+ /usr/include/gtk-1.2/gtk/gtkeditable.h \
+ /usr/include/gtk-1.2/gtk/gtkhbox.h /usr/include/gtk-1.2/gtk/gtkmain.h \
+ /usr/include/gtk-1.2/gtk/gtkscale.h \
+ /usr/include/gtk-1.2/gtk/gtkhscale.h \
+ /usr/include/gtk-1.2/gtk/gtktable.h \
+ /usr/include/gtk-1.2/gtk/gtkeventbox.h \
+ /usr/include/gtk-1.2/gtk/gtkcombo.h \
+ /usr/include/gtk-1.2/gtk/gtkcompat.h \
+ /usr/include/gtk-1.2/gtk/gtkctree.h /usr/include/gtk-1.2/gtk/gtkcurve.h \
+ /usr/include/gtk-1.2/gtk/gtkdrawingarea.h \
+ /usr/include/gtk-1.2/gtk/gtkdialog.h /usr/include/gtk-1.2/gtk/gtkdnd.h \
+ /usr/include/gtk-1.2/gtk/gtkselection.h \
+ /usr/include/gtk-1.2/gtk/gtkfeatures.h \
+ /usr/include/gtk-1.2/gtk/gtkfilesel.h \
+ /usr/include/gtk-1.2/gtk/gtkfixed.h \
+ /usr/include/gtk-1.2/gtk/gtkfontsel.h \
+ /usr/include/gtk-1.2/gtk/gtknotebook.h \
+ /usr/include/gtk-1.2/gtk/gtkgamma.h /usr/include/gtk-1.2/gtk/gtkgc.h \
+ /usr/include/gtk-1.2/gtk/gtkhandlebox.h \
+ /usr/include/gtk-1.2/gtk/gtkhbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkhpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkhruler.h \
+ /usr/include/gtk-1.2/gtk/gtkruler.h \
+ /usr/include/gtk-1.2/gtk/gtkhseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkseparator.h \
+ /usr/include/gtk-1.2/gtk/gtkimage.h \
+ /usr/include/gtk-1.2/gtk/gtkinputdialog.h \
+ /usr/include/gtk-1.2/gtk/gtkitemfactory.h \
+ /usr/include/gtk-1.2/gtk/gtkmenufactory.h \
+ /usr/include/gtk-1.2/gtk/gtklayout.h /usr/include/gtk-1.2/gtk/gtklist.h \
+ /usr/include/gtk-1.2/gtk/gtklistitem.h \
+ /usr/include/gtk-1.2/gtk/gtkmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkmenushell.h \
+ /usr/include/gtk-1.2/gtk/gtkmenubar.h \
+ /usr/include/gtk-1.2/gtk/gtkoptionmenu.h \
+ /usr/include/gtk-1.2/gtk/gtkpacker.h \
+ /usr/include/gtk-1.2/gtk/gtkpixmap.h /usr/include/gtk-1.2/gtk/gtkplug.h \
+ /usr/include/gtk-1.2/gtk/gtkprogress.h \
+ /usr/include/gtk-1.2/gtk/gtkprogressbar.h \
+ /usr/include/gtk-1.2/gtk/gtkradiobutton.h \
+ /usr/include/gtk-1.2/gtk/gtkradiomenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtkrc.h \
+ /usr/include/gtk-1.2/gtk/gtkscrolledwindow.h \
+ /usr/include/gtk-1.2/gtk/gtkviewport.h \
+ /usr/include/gtk-1.2/gtk/gtksocket.h \
+ /usr/include/gtk-1.2/gtk/gtkspinbutton.h \
+ /usr/include/gtk-1.2/gtk/gtkstatusbar.h \
+ /usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h \
+ /usr/include/gtk-1.2/gtk/gtktext.h /usr/include/gtk-1.2/gtk/gtkthemes.h \
+ /usr/include/gtk-1.2/gtk/gtktipsquery.h \
+ /usr/include/gtk-1.2/gtk/gtktoolbar.h \
+ /usr/include/gtk-1.2/gtk/gtktooltips.h \
+ /usr/include/gtk-1.2/gtk/gtktree.h \
+ /usr/include/gtk-1.2/gtk/gtktreeitem.h \
+ /usr/include/gtk-1.2/gtk/gtkvbbox.h \
+ /usr/include/gtk-1.2/gtk/gtkvpaned.h \
+ /usr/include/gtk-1.2/gtk/gtkvruler.h \
+ /usr/include/gtk-1.2/gtk/gtkvscale.h \
+ /usr/include/gtk-1.2/gtk/gtkvseparator.h support.h \
+ /usr/include/libintl.h /usr/include/locale.h /usr/include/bits/locale.h
+support.c :
+../config.h :
+/usr/include/sys/types.h :
+/usr/include/features.h :
+/usr/include/sys/cdefs.h :
+/usr/include/gnu/stubs.h :
+/usr/include/bits/types.h :
+/usr/include/bits/wordsize.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stddef.h :
+/usr/include/bits/typesizes.h :
+/usr/include/time.h :
+/usr/include/endian.h :
+/usr/include/bits/endian.h :
+/usr/include/sys/select.h :
+/usr/include/bits/select.h :
+/usr/include/bits/sigset.h :
+/usr/include/bits/time.h :
+/usr/include/sys/sysmacros.h :
+/usr/include/bits/pthreadtypes.h :
+/usr/include/bits/sched.h :
+/usr/include/sys/stat.h :
+/usr/include/bits/stat.h :
+/usr/include/unistd.h :
+/usr/include/bits/posix_opt.h :
+/usr/include/bits/confname.h :
+/usr/include/getopt.h :
+/usr/include/string.h :
+/usr/include/bits/string.h :
+/usr/include/bits/string2.h :
+/usr/include/stdlib.h :
+/usr/include/gtk-1.2/gtk/gtk.h :
+/usr/include/gtk-1.2/gdk/gdk.h :
+/usr/include/gtk-1.2/gdk/gdktypes.h :
+/usr/include/glib-1.2/glib.h :
+/usr/lib/glib/include/glibconfig.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h :
+/usr/include/limits.h :
+/usr/include/bits/posix1_lim.h :
+/usr/include/bits/local_lim.h :
+/usr/include/linux/limits.h :
+/usr/include/bits/posix2_lim.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/float.h :
+/usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h :
+/usr/include/gtk-1.2/gdk/gdkcursors.h :
+/usr/include/gtk-1.2/gdk/gdkrgb.h :
+/usr/include/gtk-1.2/gtk/gtkaccelgroup.h :
+/usr/include/gtk-1.2/gtk/gtkobject.h :
+/usr/include/gtk-1.2/gtk/gtkarg.h :
+/usr/include/gtk-1.2/gtk/gtktypeutils.h :
+/usr/include/gtk-1.2/gtk/gtktypebuiltins.h :
+/usr/include/gtk-1.2/gtk/gtkenums.h :
+/usr/include/gtk-1.2/gtk/gtkdebug.h :
+/usr/include/gtk-1.2/gtk/gtkaccellabel.h :
+/usr/include/gtk-1.2/gtk/gtklabel.h :
+/usr/include/gtk-1.2/gtk/gtkmisc.h :
+/usr/include/gtk-1.2/gtk/gtkwidget.h :
+/usr/include/gtk-1.2/gtk/gtkadjustment.h :
+/usr/include/gtk-1.2/gtk/gtkdata.h :
+/usr/include/gtk-1.2/gtk/gtkstyle.h :
+/usr/include/gtk-1.2/gtk/gtkalignment.h :
+/usr/include/gtk-1.2/gtk/gtkbin.h :
+/usr/include/gtk-1.2/gtk/gtkcontainer.h :
+/usr/include/gtk-1.2/gtk/gtkaspectframe.h :
+/usr/include/gtk-1.2/gtk/gtkframe.h :
+/usr/include/gtk-1.2/gtk/gtkarrow.h :
+/usr/include/gtk-1.2/gtk/gtkbindings.h :
+/usr/include/gtk-1.2/gtk/gtkbox.h :
+/usr/include/gtk-1.2/gtk/gtkbbox.h :
+/usr/include/gtk-1.2/gtk/gtkbutton.h :
+/usr/include/gtk-1.2/gtk/gtkcalendar.h :
+/usr/include/gtk-1.2/gtk/gtksignal.h :
+/usr/include/gtk-1.2/gtk/gtkmarshal.h :
+/usr/include/gtk-1.2/gtk/gtkcheckbutton.h :
+/usr/include/gtk-1.2/gtk/gtktogglebutton.h :
+/usr/include/gtk-1.2/gtk/gtkcheckmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkitem.h :
+/usr/include/gtk-1.2/gtk/gtkclist.h :
+/usr/include/gtk-1.2/gtk/gtkhscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkrange.h :
+/usr/include/gtk-1.2/gtk/gtkvscrollbar.h :
+/usr/include/gtk-1.2/gtk/gtkcolorsel.h :
+/usr/include/gtk-1.2/gtk/gtkwindow.h :
+/usr/include/gtk-1.2/gtk/gtkvbox.h :
+/usr/include/gtk-1.2/gtk/gtkpreview.h :
+/usr/include/gtk-1.2/gtk/gtkentry.h :
+/usr/include/gtk-1.2/gtk/gtkeditable.h :
+/usr/include/gtk-1.2/gtk/gtkhbox.h :
+/usr/include/gtk-1.2/gtk/gtkmain.h :
+/usr/include/gtk-1.2/gtk/gtkscale.h :
+/usr/include/gtk-1.2/gtk/gtkhscale.h :
+/usr/include/gtk-1.2/gtk/gtktable.h :
+/usr/include/gtk-1.2/gtk/gtkeventbox.h :
+/usr/include/gtk-1.2/gtk/gtkcombo.h :
+/usr/include/gtk-1.2/gtk/gtkcompat.h :
+/usr/include/gtk-1.2/gtk/gtkctree.h :
+/usr/include/gtk-1.2/gtk/gtkcurve.h :
+/usr/include/gtk-1.2/gtk/gtkdrawingarea.h :
+/usr/include/gtk-1.2/gtk/gtkdialog.h :
+/usr/include/gtk-1.2/gtk/gtkdnd.h :
+/usr/include/gtk-1.2/gtk/gtkselection.h :
+/usr/include/gtk-1.2/gtk/gtkfeatures.h :
+/usr/include/gtk-1.2/gtk/gtkfilesel.h :
+/usr/include/gtk-1.2/gtk/gtkfixed.h :
+/usr/include/gtk-1.2/gtk/gtkfontsel.h :
+/usr/include/gtk-1.2/gtk/gtknotebook.h :
+/usr/include/gtk-1.2/gtk/gtkgamma.h :
+/usr/include/gtk-1.2/gtk/gtkgc.h :
+/usr/include/gtk-1.2/gtk/gtkhandlebox.h :
+/usr/include/gtk-1.2/gtk/gtkhbbox.h :
+/usr/include/gtk-1.2/gtk/gtkhpaned.h :
+/usr/include/gtk-1.2/gtk/gtkpaned.h :
+/usr/include/gtk-1.2/gtk/gtkhruler.h :
+/usr/include/gtk-1.2/gtk/gtkruler.h :
+/usr/include/gtk-1.2/gtk/gtkhseparator.h :
+/usr/include/gtk-1.2/gtk/gtkseparator.h :
+/usr/include/gtk-1.2/gtk/gtkimage.h :
+/usr/include/gtk-1.2/gtk/gtkinputdialog.h :
+/usr/include/gtk-1.2/gtk/gtkitemfactory.h :
+/usr/include/gtk-1.2/gtk/gtkmenufactory.h :
+/usr/include/gtk-1.2/gtk/gtklayout.h :
+/usr/include/gtk-1.2/gtk/gtklist.h :
+/usr/include/gtk-1.2/gtk/gtklistitem.h :
+/usr/include/gtk-1.2/gtk/gtkmenu.h :
+/usr/include/gtk-1.2/gtk/gtkmenushell.h :
+/usr/include/gtk-1.2/gtk/gtkmenubar.h :
+/usr/include/gtk-1.2/gtk/gtkoptionmenu.h :
+/usr/include/gtk-1.2/gtk/gtkpacker.h :
+/usr/include/gtk-1.2/gtk/gtkpixmap.h :
+/usr/include/gtk-1.2/gtk/gtkplug.h :
+/usr/include/gtk-1.2/gtk/gtkprogress.h :
+/usr/include/gtk-1.2/gtk/gtkprogressbar.h :
+/usr/include/gtk-1.2/gtk/gtkradiobutton.h :
+/usr/include/gtk-1.2/gtk/gtkradiomenuitem.h :
+/usr/include/gtk-1.2/gtk/gtkrc.h :
+/usr/include/gtk-1.2/gtk/gtkscrolledwindow.h :
+/usr/include/gtk-1.2/gtk/gtkviewport.h :
+/usr/include/gtk-1.2/gtk/gtksocket.h :
+/usr/include/gtk-1.2/gtk/gtkspinbutton.h :
+/usr/include/gtk-1.2/gtk/gtkstatusbar.h :
+/usr/include/gtk-1.2/gtk/gtktearoffmenuitem.h :
+/usr/include/gtk-1.2/gtk/gtktext.h :
+/usr/include/gtk-1.2/gtk/gtkthemes.h :
+/usr/include/gtk-1.2/gtk/gtktipsquery.h :
+/usr/include/gtk-1.2/gtk/gtktoolbar.h :
+/usr/include/gtk-1.2/gtk/gtktooltips.h :
+/usr/include/gtk-1.2/gtk/gtktree.h :
+/usr/include/gtk-1.2/gtk/gtktreeitem.h :
+/usr/include/gtk-1.2/gtk/gtkvbbox.h :
+/usr/include/gtk-1.2/gtk/gtkvpaned.h :
+/usr/include/gtk-1.2/gtk/gtkvruler.h :
+/usr/include/gtk-1.2/gtk/gtkvscale.h :
+/usr/include/gtk-1.2/gtk/gtkvseparator.h :
+support.h :
+/usr/include/libintl.h :
+/usr/include/locale.h :
+/usr/include/bits/locale.h :
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,344 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+prefix = /usr/local
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/bewan_adsl_status
+pkglibdir = $(libdir)/bewan_adsl_status
+pkgincludedir = $(includedir)/bewan_adsl_status
+
+top_builddir = ..
+
+ACLOCAL = aclocal-1.4
+AUTOCONF = autoconf
+AUTOMAKE = automake-1.4
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+BUILD_INCLUDED_LIBINTL = no
+CATOBJEXT = .gmo
+CC = gcc
+DATADIRNAME = share
+GENCAT = gencat
+GLIBC21 = yes
+GMSGFMT = /usr/bin/msgfmt
+GTK_CFLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+GTK_CONFIG = /usr/bin/gtk-config
+GTK_LIBS = -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = .mo
+INTLBISON = bison
+INTLLIBS =
+INTLOBJS =
+INTL_LIBTOOL_SUFFIX_PREFIX =
+LIB = @LIB@
+LIBICONV =
+LIBINTL =
+LTLIB = @LTLIB@
+LTLIBICONV =
+LTLIBINTL =
+MAKEINFO = makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+PACKAGE = bewan_adsl_status
+POSUB = po
+RANLIB = ranlib
+USE_INCLUDED_LIBINTL = no
+USE_NLS = yes
+VERSION = 0.1
+
+INCLUDES = -I../../amu -I../../include/ -I$(top_srcdir)/intl -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+
+
+bin_PROGRAMS = bewan_adsl_status
+
+bewan_adsl_status_SOURCES = main.c support.c support.h interface.c interface.h callbacks.c callbacks.h status.h status.c
+
+
+bewan_adsl_status_LDADD = -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm $(INTLLIBS)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
+CPPFLAGS =
+LDFLAGS =
+LIBS =
+bewan_adsl_status_OBJECTS = main.o support.o interface.o callbacks.o \
+status.o
+bewan_adsl_status_DEPENDENCIES =
+bewan_adsl_status_LDFLAGS =
+CFLAGS = -g -O2 -Wall
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/callbacks.P .deps/interface.P .deps/main.P \
+.deps/status.P .deps/support.P
+SOURCES = $(bewan_adsl_status_SOURCES)
+OBJECTS = $(bewan_adsl_status_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+bewan_adsl_status: $(bewan_adsl_status_OBJECTS) $(bewan_adsl_status_DEPENDENCIES)
+ @rm -f bewan_adsl_status
+ $(LINK) $(bewan_adsl_status_LDFLAGS) $(bewan_adsl_status_OBJECTS) $(bewan_adsl_status_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
+ distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir mostlyclean-depend \
+distclean-depend clean-depend maintainer-clean-depend info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.am
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.am Wed Dec 27 00:14:01 2006
@@ -0,0 +1,19 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = \
+ -I../../amu -I../../include/ \
+ -I$(top_srcdir)/intl \
+ @GTK_CFLAGS@
+
+bin_PROGRAMS = bewan_adsl_status
+
+bewan_adsl_status_SOURCES = \
+ main.c \
+ support.c support.h \
+ interface.c interface.h \
+ callbacks.c callbacks.h \
+ status.h \
+ status.c
+
+bewan_adsl_status_LDADD = @GTK_LIBS@ $(INTLLIBS)
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/Makefile.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1,344 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+HAVE_LIB = @HAVE_LIB@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LTLIB = @LTLIB@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+PACKAGE = @PACKAGE@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+
+INCLUDES = -I../../amu -I../../include/ -I$(top_srcdir)/intl @GTK_CFLAGS@
+
+
+bin_PROGRAMS = bewan_adsl_status
+
+bewan_adsl_status_SOURCES = main.c support.c support.h interface.c interface.h callbacks.c callbacks.h status.h status.c
+
+
+bewan_adsl_status_LDADD = @GTK_LIBS@ $(INTLLIBS)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+bewan_adsl_status_OBJECTS = main.o support.o interface.o callbacks.o \
+status.o
+bewan_adsl_status_DEPENDENCIES =
+bewan_adsl_status_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/callbacks.P .deps/interface.P .deps/main.P \
+.deps/status.P .deps/support.P
+SOURCES = $(bewan_adsl_status_SOURCES)
+OBJECTS = $(bewan_adsl_status_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+bewan_adsl_status: $(bewan_adsl_status_OBJECTS) $(bewan_adsl_status_DEPENDENCIES)
+ @rm -f bewan_adsl_status
+ $(LINK) $(bewan_adsl_status_LDFLAGS) $(bewan_adsl_status_OBJECTS) $(bewan_adsl_status_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
+ distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir mostlyclean-depend \
+distclean-depend clean-depend maintainer-clean-depend info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,100 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "status.h"
+
+
+void
+on_StartButton_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ start_msw();
+}
+
+
+void
+on_StopButton_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ stop_msw();
+}
+
+
+gboolean
+on_PowerChart_expose_event (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data)
+{
+ draw_chart(widget,event);
+ return FALSE;
+}
+
+
+gboolean
+on_PowerChart_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data)
+{
+ create_chart(widget);
+ return FALSE;
+}
+
+
+gboolean
+on_RxPathLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data)
+{
+ create_RxPathLabel(widget);
+ return FALSE;
+}
+
+
+gboolean
+on_SNRLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data)
+{
+ create_SNRLabel(widget);
+ return FALSE;
+}
+
+
+gboolean
+on_EchoNoiseLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data)
+{
+ create_EchoNoiseLabel(widget);
+ return FALSE;
+}
+
+
+void
+on_GenerateLBcellsButton_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data)
+{
+ gboolean active;
+
+ active = gtk_toggle_button_get_active(togglebutton);
+ if (active) {
+ start_send_oam_lb();
+ } else {
+ stop_send_oam_lb();
+ }
+}
+
+
+void
+on_ResetCountersButton_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ oam_reset_counters();
+}
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/callbacks.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,53 @@
+#include <gtk/gtk.h>
+
+
+gboolean
+on_main_window_destroy_event (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+
+gboolean
+on_main_window_delete_event (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+
+void
+on_StartButton_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_StopButton_clicked (GtkButton *button,
+ gpointer user_data);
+
+gboolean
+on_PowerChart_expose_event (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
+gboolean
+on_PowerChart_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+gboolean
+on_RxPathLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+gboolean
+on_SNRLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+gboolean
+on_EchoNoiseLabel_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+
+void
+on_GenerateLBcellsButton_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void
+on_ResetCountersButton_clicked (GtkButton *button,
+ gpointer user_data);
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,2384 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+
+GtkWidget*
+create_main_window (void)
+{
+ GtkWidget *main_window;
+ GtkWidget *notebook1;
+ GtkWidget *vbox1;
+ GtkWidget *frame1;
+ GtkWidget *hbox2;
+ GtkWidget *table1;
+ GtkWidget *label8;
+ GtkWidget *label9;
+ GtkWidget *label10;
+ GtkWidget *label11;
+ GtkWidget *ModemStateText;
+ GtkWidget *RemoteReportText;
+ GtkWidget *LastFailureText;
+ GtkWidget *TimeConnectedText;
+ GtkWidget *vbox3;
+ GtkWidget *StartButton;
+ GtkWidget *StopButton;
+ GtkWidget *hbox1;
+ GtkWidget *frame2;
+ GtkWidget *table2;
+ GtkWidget *label16;
+ GtkWidget *label17;
+ GtkWidget *label18;
+ GtkWidget *label19;
+ GtkWidget *NearEndFastChannelText;
+ GtkWidget *FarEndFastChannelText;
+ GtkWidget *NearEndInterleavedChannelText;
+ GtkWidget *FarEndInterleavedChannelText;
+ GtkWidget *pixmap2;
+ GtkWidget *State;
+ GtkWidget *vbox4;
+ GtkWidget *frame21;
+ GtkWidget *vbox15;
+ GtkWidget *hbox7;
+ GtkWidget *ModulationLabel;
+ GtkWidget *ModulationText;
+ GtkWidget *table3;
+ GtkWidget *label106;
+ GtkWidget *label107;
+ GtkWidget *label108;
+ GtkWidget *label109;
+ GtkWidget *DsCapacityOccupationText;
+ GtkWidget *DsNoiseMarginText;
+ GtkWidget *DsAttenuationText;
+ GtkWidget *DsOutputPowerText;
+ GtkWidget *UsCapacityOccupationText;
+ GtkWidget *UsNoiseMarginText;
+ GtkWidget *UsOutputPowerText;
+ GtkWidget *UsAttenuationText;
+ GtkWidget *vseparator1;
+ GtkWidget *vseparator2;
+ GtkWidget *label118;
+ GtkWidget *label119;
+ GtkWidget *frame22;
+ GtkWidget *hbox3;
+ GtkWidget *PowerChart;
+ GtkWidget *vbox5;
+ GtkWidget *RxPathLabel;
+ GtkWidget *SNRLabel;
+ GtkWidget *EchoNoiseLabel;
+ GtkWidget *Line;
+ GtkWidget *vbox6;
+ GtkWidget *frame23;
+ GtkWidget *table4;
+ GtkWidget *label123;
+ GtkWidget *label124;
+ GtkWidget *label125;
+ GtkWidget *LocFastCRCText;
+ GtkWidget *LocFastFECText;
+ GtkWidget *LocFastHECText;
+ GtkWidget *DisFastFECText;
+ GtkWidget *DisFastCRCText;
+ GtkWidget *DisFastHECText;
+ GtkWidget *vseparator3;
+ GtkWidget *vseparator4;
+ GtkWidget *label126;
+ GtkWidget *label127;
+ GtkWidget *frame24;
+ GtkWidget *table5;
+ GtkWidget *label134;
+ GtkWidget *label135;
+ GtkWidget *label136;
+ GtkWidget *LocItlvCRCText;
+ GtkWidget *LocItlvFECText;
+ GtkWidget *LocItlvHECText;
+ GtkWidget *DisItlvFECText;
+ GtkWidget *DisItlvCRCText;
+ GtkWidget *DisItlvHECText;
+ GtkWidget *vseparator5;
+ GtkWidget *vseparator6;
+ GtkWidget *label137;
+ GtkWidget *label141;
+ GtkWidget *Errors;
+ GtkWidget *vbox8;
+ GtkWidget *frame25;
+ GtkWidget *NearEndDefectsDetectedTable;
+ GtkWidget *NearLoMLabel;
+ GtkWidget *NearLoPLabel;
+ GtkWidget *NearLoSLabel;
+ GtkWidget *NearLoFLabel;
+ GtkWidget *NearLoCDLabel;
+ GtkWidget *label198;
+ GtkWidget *fixed5;
+ GtkWidget *NearLoCDRedLed;
+ GtkWidget *NearLoCDLed;
+ GtkWidget *fixed4;
+ GtkWidget *NearLoFRedLed;
+ GtkWidget *NearLoFLed;
+ GtkWidget *fixed3;
+ GtkWidget *NearLoSRedLed;
+ GtkWidget *NearLoSLed;
+ GtkWidget *fixed2;
+ GtkWidget *NearLoPRedLed;
+ GtkWidget *NearLoPLed;
+ GtkWidget *fixed1;
+ GtkWidget *NearLoMRedLed;
+ GtkWidget *NearLoMLed;
+ GtkWidget *frame26;
+ GtkWidget *FarEndDefectsDetectedTable;
+ GtkWidget *FarLoMLabel;
+ GtkWidget *FarLoPLabel;
+ GtkWidget *FarLoSLabel;
+ GtkWidget *FarLoFLabel;
+ GtkWidget *DyingGaspLabel;
+ GtkWidget *FarLoCDLabel;
+ GtkWidget *fixed7;
+ GtkWidget *FarLoMRedLed;
+ GtkWidget *FarLoMLed;
+ GtkWidget *fixed8;
+ GtkWidget *FarLoPRedLed;
+ GtkWidget *FarLoPLed;
+ GtkWidget *fixed9;
+ GtkWidget *FarLoSRedLed;
+ GtkWidget *FarLoSLed;
+ GtkWidget *fixed10;
+ GtkWidget *FarLoFRedLed;
+ GtkWidget *FarLoFLed;
+ GtkWidget *fixed11;
+ GtkWidget *FarLoCDRedLed;
+ GtkWidget *FarLoCDLed;
+ GtkWidget *fixed12;
+ GtkWidget *DyingGaspRedLed;
+ GtkWidget *DyingGaspLed;
+ GtkWidget *Defects;
+ GtkWidget *frame27;
+ GtkWidget *vbox9;
+ GtkWidget *vbox11;
+ GtkWidget *vbox12;
+ GtkWidget *GenerateLBcellsButton;
+ GtkWidget *table10;
+ GtkWidget *label157;
+ GtkWidget *label158;
+ GtkWidget *VPIEntry;
+ GtkWidget *VCIEntry;
+ GtkWidget *ResetCountersButton;
+ GtkWidget *label197;
+ GtkWidget *frame28;
+ GtkWidget *table11;
+ GtkWidget *label159;
+ GtkWidget *label160;
+ GtkWidget *label161;
+ GtkWidget *label162;
+ GtkWidget *label163;
+ GtkWidget *CCText;
+ GtkWidget *RDIText;
+ GtkWidget *FeLBText;
+ GtkWidget *AISText;
+ GtkWidget *NeLBText;
+ GtkWidget *Test;
+ GtkWidget *vbox13;
+ GtkWidget *frame29;
+ GtkWidget *table12;
+ GtkWidget *label169;
+ GtkWidget *label170;
+ GtkWidget *label171;
+ GtkWidget *label172;
+ GtkWidget *label173;
+ GtkWidget *ConfigVpiText;
+ GtkWidget *ConfigVciText;
+ GtkWidget *ConfigProtocolText;
+ GtkWidget *ConfigEncapsText;
+ GtkWidget *ConfigModulationText;
+ GtkWidget *Config;
+ GtkWidget *vbox14;
+ GtkWidget *frame30;
+ GtkWidget *table13;
+ GtkWidget *label179;
+ GtkWidget *label180;
+ GtkWidget *label181;
+ GtkWidget *label182;
+ GtkWidget *label183;
+ GtkWidget *PackageNameText;
+ GtkWidget *PackageVersionText;
+ GtkWidget *FirmwareVersionText;
+ GtkWidget *ManufacturerText;
+ GtkWidget *CopyrightText;
+ GtkWidget *hbox6;
+ GtkWidget *frame31;
+ GtkWidget *table14;
+ GtkWidget *label184;
+ GtkWidget *label185;
+ GtkWidget *label186;
+ GtkWidget *label187;
+ GtkWidget *VendorCodeText;
+ GtkWidget *VendorCountryCodeText;
+ GtkWidget *ITURevisionNumberText;
+ GtkWidget *VendorSpecificInfoText;
+ GtkWidget *pixmap15;
+ GtkWidget *Info;
+
+ main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (main_window, "main_window");
+ gtk_object_set_data (GTK_OBJECT (main_window), "main_window", main_window);
+ gtk_window_set_title (GTK_WINDOW (main_window), _("BeWAN ADSL"));
+
+ notebook1 = gtk_notebook_new ();
+ gtk_widget_set_name (notebook1, "notebook1");
+ gtk_widget_ref (notebook1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "notebook1", notebook1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (notebook1);
+ gtk_container_add (GTK_CONTAINER (main_window), notebook1);
+
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox1, "vbox1");
+ gtk_widget_ref (vbox1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox1", vbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox1);
+
+ frame1 = gtk_frame_new (_("Line State"));
+ gtk_widget_set_name (frame1, "frame1");
+ gtk_widget_ref (frame1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame1", frame1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame1);
+ gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
+
+ hbox2 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox2, "hbox2");
+ gtk_widget_ref (hbox2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox2", hbox2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox2);
+ gtk_container_add (GTK_CONTAINER (frame1), hbox2);
+
+ table1 = gtk_table_new (4, 2, FALSE);
+ gtk_widget_set_name (table1, "table1");
+ gtk_widget_ref (table1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table1", table1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table1);
+ gtk_box_pack_start (GTK_BOX (hbox2), table1, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
+
+ label8 = gtk_label_new (_("Modem state:"));
+ gtk_widget_set_name (label8, "label8");
+ gtk_widget_ref (label8);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label8", label8,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label8);
+ gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label8), 4, 0);
+
+ label9 = gtk_label_new (_("Remote report:"));
+ gtk_widget_set_name (label9, "label9");
+ gtk_widget_ref (label9);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label9", label9,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label9);
+ gtk_table_attach (GTK_TABLE (table1), label9, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label9), 4, 0);
+
+ label10 = gtk_label_new (_("Last failure:"));
+ gtk_widget_set_name (label10, "label10");
+ gtk_widget_ref (label10);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label10", label10,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label10);
+ gtk_table_attach (GTK_TABLE (table1), label10, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label10), 4, 0);
+
+ label11 = gtk_label_new (_("Time connected:"));
+ gtk_widget_set_name (label11, "label11");
+ gtk_widget_ref (label11);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label11", label11,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label11);
+ gtk_table_attach (GTK_TABLE (table1), label11, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label11), 4, 0);
+
+ ModemStateText = gtk_label_new ("");
+ gtk_widget_set_name (ModemStateText, "ModemStateText");
+ gtk_widget_ref (ModemStateText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ModemStateText", ModemStateText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ModemStateText);
+ gtk_table_attach (GTK_TABLE (table1), ModemStateText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ModemStateText), 0, 0.5);
+
+ RemoteReportText = gtk_label_new ("");
+ gtk_widget_set_name (RemoteReportText, "RemoteReportText");
+ gtk_widget_ref (RemoteReportText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "RemoteReportText", RemoteReportText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (RemoteReportText);
+ gtk_table_attach (GTK_TABLE (table1), RemoteReportText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (RemoteReportText), 0, 0.5);
+
+ LastFailureText = gtk_label_new ("");
+ gtk_widget_set_name (LastFailureText, "LastFailureText");
+ gtk_widget_ref (LastFailureText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LastFailureText", LastFailureText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LastFailureText);
+ gtk_table_attach (GTK_TABLE (table1), LastFailureText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (LastFailureText, 192, -2);
+ gtk_misc_set_alignment (GTK_MISC (LastFailureText), 0, 0.5);
+
+ TimeConnectedText = gtk_label_new ("");
+ gtk_widget_set_name (TimeConnectedText, "TimeConnectedText");
+ gtk_widget_ref (TimeConnectedText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "TimeConnectedText", TimeConnectedText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (TimeConnectedText);
+ gtk_table_attach (GTK_TABLE (table1), TimeConnectedText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (TimeConnectedText), 0, 0.5);
+
+ vbox3 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox3, "vbox3");
+ gtk_widget_ref (vbox3);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox3", vbox3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox3);
+ gtk_box_pack_start (GTK_BOX (hbox2), vbox3, FALSE, TRUE, 0);
+
+ StartButton = gtk_button_new_with_label (_("Start"));
+ gtk_widget_set_name (StartButton, "StartButton");
+ gtk_widget_ref (StartButton);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "StartButton", StartButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (StartButton);
+ gtk_box_pack_start (GTK_BOX (vbox3), StartButton, FALSE, FALSE, 0);
+
+ StopButton = gtk_button_new_with_label (_("Stop"));
+ gtk_widget_set_name (StopButton, "StopButton");
+ gtk_widget_ref (StopButton);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "StopButton", StopButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (StopButton);
+ gtk_box_pack_start (GTK_BOX (vbox3), StopButton, FALSE, FALSE, 0);
+
+ hbox1 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox1, "hbox1");
+ gtk_widget_ref (hbox1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox1", hbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
+
+ frame2 = gtk_frame_new (_("Actual bit rate (Kbps)"));
+ gtk_widget_set_name (frame2, "frame2");
+ gtk_widget_ref (frame2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame2", frame2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame2);
+ gtk_box_pack_start (GTK_BOX (hbox1), frame2, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
+
+ table2 = gtk_table_new (4, 2, FALSE);
+ gtk_widget_set_name (table2, "table2");
+ gtk_widget_ref (table2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table2", table2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table2);
+ gtk_container_add (GTK_CONTAINER (frame2), table2);
+ gtk_container_set_border_width (GTK_CONTAINER (table2), 4);
+
+ label16 = gtk_label_new (_("Near End Fast Channel:"));
+ gtk_widget_set_name (label16, "label16");
+ gtk_widget_ref (label16);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label16", label16,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label16);
+ gtk_table_attach (GTK_TABLE (table2), label16, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label16), 4, 0);
+
+ label17 = gtk_label_new (_("Far End Fast Channel:"));
+ gtk_widget_set_name (label17, "label17");
+ gtk_widget_ref (label17);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label17", label17,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label17);
+ gtk_table_attach (GTK_TABLE (table2), label17, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label17), 4, 0);
+
+ label18 = gtk_label_new (_("Near End Interleaved Channel:"));
+ gtk_widget_set_name (label18, "label18");
+ gtk_widget_ref (label18);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label18", label18,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label18);
+ gtk_table_attach (GTK_TABLE (table2), label18, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label18), 4, 0);
+
+ label19 = gtk_label_new (_("Far End Interleaved Channel:"));
+ gtk_widget_set_name (label19, "label19");
+ gtk_widget_ref (label19);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label19", label19,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label19);
+ gtk_table_attach (GTK_TABLE (table2), label19, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label19), 4, 0);
+
+ NearEndFastChannelText = gtk_label_new ("");
+ gtk_widget_set_name (NearEndFastChannelText, "NearEndFastChannelText");
+ gtk_widget_ref (NearEndFastChannelText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearEndFastChannelText", NearEndFastChannelText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearEndFastChannelText);
+ gtk_table_attach (GTK_TABLE (table2), NearEndFastChannelText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (NearEndFastChannelText, 39, -2);
+ gtk_misc_set_alignment (GTK_MISC (NearEndFastChannelText), 0, 0.5);
+
+ FarEndFastChannelText = gtk_label_new ("");
+ gtk_widget_set_name (FarEndFastChannelText, "FarEndFastChannelText");
+ gtk_widget_ref (FarEndFastChannelText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarEndFastChannelText", FarEndFastChannelText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarEndFastChannelText);
+ gtk_table_attach (GTK_TABLE (table2), FarEndFastChannelText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarEndFastChannelText), 0, 0.5);
+
+ NearEndInterleavedChannelText = gtk_label_new ("");
+ gtk_widget_set_name (NearEndInterleavedChannelText, "NearEndInterleavedChannelText");
+ gtk_widget_ref (NearEndInterleavedChannelText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearEndInterleavedChannelText", NearEndInterleavedChannelText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearEndInterleavedChannelText);
+ gtk_table_attach (GTK_TABLE (table2), NearEndInterleavedChannelText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearEndInterleavedChannelText), 0, 0.5);
+
+ FarEndInterleavedChannelText = gtk_label_new ("");
+ gtk_widget_set_name (FarEndInterleavedChannelText, "FarEndInterleavedChannelText");
+ gtk_widget_ref (FarEndInterleavedChannelText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarEndInterleavedChannelText", FarEndInterleavedChannelText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarEndInterleavedChannelText);
+ gtk_table_attach (GTK_TABLE (table2), FarEndInterleavedChannelText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarEndInterleavedChannelText), 0, 0.5);
+
+ pixmap2 = create_pixmap (main_window, "bewan.xpm");
+ gtk_widget_set_name (pixmap2, "pixmap2");
+ gtk_widget_ref (pixmap2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "pixmap2", pixmap2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (pixmap2);
+ gtk_box_pack_start (GTK_BOX (hbox1), pixmap2, TRUE, TRUE, 0);
+
+ State = gtk_label_new (_("State"));
+ gtk_widget_set_name (State, "State");
+ gtk_widget_ref (State);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "State", State,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (State);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), State);
+
+ vbox4 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox4, "vbox4");
+ gtk_widget_ref (vbox4);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox4", vbox4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox4);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox4);
+
+ frame21 = gtk_frame_new (_("Operational Data"));
+ gtk_widget_set_name (frame21, "frame21");
+ gtk_widget_ref (frame21);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame21", frame21,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame21);
+ gtk_box_pack_start (GTK_BOX (vbox4), frame21, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame21), 4);
+
+ vbox15 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox15, "vbox15");
+ gtk_widget_ref (vbox15);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox15", vbox15,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox15);
+ gtk_container_add (GTK_CONTAINER (frame21), vbox15);
+
+ hbox7 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox7, "hbox7");
+ gtk_widget_ref (hbox7);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox7", hbox7,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox7);
+ gtk_box_pack_start (GTK_BOX (vbox15), hbox7, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox7), 4);
+
+ ModulationLabel = gtk_label_new (_("Modulation:"));
+ gtk_widget_set_name (ModulationLabel, "ModulationLabel");
+ gtk_widget_ref (ModulationLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ModulationLabel", ModulationLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ModulationLabel);
+ gtk_box_pack_start (GTK_BOX (hbox7), ModulationLabel, FALSE, FALSE, 0);
+ gtk_misc_set_padding (GTK_MISC (ModulationLabel), 4, 0);
+
+ ModulationText = gtk_label_new ("");
+ gtk_widget_set_name (ModulationText, "ModulationText");
+ gtk_widget_ref (ModulationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ModulationText", ModulationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ModulationText);
+ gtk_box_pack_start (GTK_BOX (hbox7), ModulationText, FALSE, FALSE, 0);
+ gtk_misc_set_padding (GTK_MISC (ModulationText), 4, 0);
+
+ table3 = gtk_table_new (5, 5, FALSE);
+ gtk_widget_set_name (table3, "table3");
+ gtk_widget_ref (table3);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table3", table3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table3);
+ gtk_box_pack_start (GTK_BOX (vbox15), table3, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (table3), 4);
+
+ label106 = gtk_label_new (_("Capacity Occupation (%)"));
+ gtk_widget_set_name (label106, "label106");
+ gtk_widget_ref (label106);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label106", label106,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label106);
+ gtk_table_attach (GTK_TABLE (table3), label106, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label106), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label106), 4, 0);
+
+ label107 = gtk_label_new (_("Noise Margin (dB)"));
+ gtk_widget_set_name (label107, "label107");
+ gtk_widget_ref (label107);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label107", label107,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label107);
+ gtk_table_attach (GTK_TABLE (table3), label107, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label107), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label107), 4, 0);
+
+ label108 = gtk_label_new (_("Attenuation (dB)"));
+ gtk_widget_set_name (label108, "label108");
+ gtk_widget_ref (label108);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label108", label108,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label108);
+ gtk_table_attach (GTK_TABLE (table3), label108, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label108), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label108), 4, 0);
+
+ label109 = gtk_label_new (_("Output Power (dBm)"));
+ gtk_widget_set_name (label109, "label109");
+ gtk_widget_ref (label109);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label109", label109,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label109);
+ gtk_table_attach (GTK_TABLE (table3), label109, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label109), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label109), 4, 0);
+
+ DsCapacityOccupationText = gtk_label_new ("");
+ gtk_widget_set_name (DsCapacityOccupationText, "DsCapacityOccupationText");
+ gtk_widget_ref (DsCapacityOccupationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DsCapacityOccupationText", DsCapacityOccupationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DsCapacityOccupationText);
+ gtk_table_attach (GTK_TABLE (table3), DsCapacityOccupationText, 2, 3, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DsNoiseMarginText = gtk_label_new ("");
+ gtk_widget_set_name (DsNoiseMarginText, "DsNoiseMarginText");
+ gtk_widget_ref (DsNoiseMarginText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DsNoiseMarginText", DsNoiseMarginText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DsNoiseMarginText);
+ gtk_table_attach (GTK_TABLE (table3), DsNoiseMarginText, 2, 3, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DsAttenuationText = gtk_label_new ("");
+ gtk_widget_set_name (DsAttenuationText, "DsAttenuationText");
+ gtk_widget_ref (DsAttenuationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DsAttenuationText", DsAttenuationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DsAttenuationText);
+ gtk_table_attach (GTK_TABLE (table3), DsAttenuationText, 2, 3, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DsOutputPowerText = gtk_label_new ("");
+ gtk_widget_set_name (DsOutputPowerText, "DsOutputPowerText");
+ gtk_widget_ref (DsOutputPowerText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DsOutputPowerText", DsOutputPowerText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DsOutputPowerText);
+ gtk_table_attach (GTK_TABLE (table3), DsOutputPowerText, 2, 3, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ UsCapacityOccupationText = gtk_label_new ("");
+ gtk_widget_set_name (UsCapacityOccupationText, "UsCapacityOccupationText");
+ gtk_widget_ref (UsCapacityOccupationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "UsCapacityOccupationText", UsCapacityOccupationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (UsCapacityOccupationText);
+ gtk_table_attach (GTK_TABLE (table3), UsCapacityOccupationText, 4, 5, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ UsNoiseMarginText = gtk_label_new ("");
+ gtk_widget_set_name (UsNoiseMarginText, "UsNoiseMarginText");
+ gtk_widget_ref (UsNoiseMarginText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "UsNoiseMarginText", UsNoiseMarginText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (UsNoiseMarginText);
+ gtk_table_attach (GTK_TABLE (table3), UsNoiseMarginText, 4, 5, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ UsOutputPowerText = gtk_label_new ("");
+ gtk_widget_set_name (UsOutputPowerText, "UsOutputPowerText");
+ gtk_widget_ref (UsOutputPowerText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "UsOutputPowerText", UsOutputPowerText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (UsOutputPowerText);
+ gtk_table_attach (GTK_TABLE (table3), UsOutputPowerText, 4, 5, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ UsAttenuationText = gtk_label_new ("");
+ gtk_widget_set_name (UsAttenuationText, "UsAttenuationText");
+ gtk_widget_ref (UsAttenuationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "UsAttenuationText", UsAttenuationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (UsAttenuationText);
+ gtk_table_attach (GTK_TABLE (table3), UsAttenuationText, 4, 5, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ vseparator1 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator1, "vseparator1");
+ gtk_widget_ref (vseparator1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator1", vseparator1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator1);
+ gtk_table_attach (GTK_TABLE (table3), vseparator1, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ vseparator2 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator2, "vseparator2");
+ gtk_widget_ref (vseparator2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator2", vseparator2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator2);
+ gtk_table_attach (GTK_TABLE (table3), vseparator2, 3, 4, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ label118 = gtk_label_new (_("DownStream"));
+ gtk_widget_set_name (label118, "label118");
+ gtk_widget_ref (label118);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label118", label118,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label118);
+ gtk_table_attach (GTK_TABLE (table3), label118, 2, 3, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label119 = gtk_label_new (_("UpStream"));
+ gtk_widget_set_name (label119, "label119");
+ gtk_widget_ref (label119);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label119", label119,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label119);
+ gtk_table_attach (GTK_TABLE (table3), label119, 4, 5, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ frame22 = gtk_frame_new (_("Power"));
+ gtk_widget_set_name (frame22, "frame22");
+ gtk_widget_ref (frame22);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame22", frame22,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame22);
+ gtk_box_pack_start (GTK_BOX (vbox4), frame22, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame22), 4);
+
+ hbox3 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox3, "hbox3");
+ gtk_widget_ref (hbox3);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox3", hbox3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox3);
+ gtk_container_add (GTK_CONTAINER (frame22), hbox3);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox3), 4);
+
+ PowerChart = gtk_drawing_area_new ();
+ gtk_widget_set_name (PowerChart, "PowerChart");
+ gtk_widget_ref (PowerChart);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "PowerChart", PowerChart,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (PowerChart);
+ gtk_box_pack_start (GTK_BOX (hbox3), PowerChart, FALSE, TRUE, 0);
+ gtk_widget_set_usize (PowerChart, 256, 80);
+
+ vbox5 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox5, "vbox5");
+ gtk_widget_ref (vbox5);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox5", vbox5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox5);
+ gtk_box_pack_start (GTK_BOX (hbox3), vbox5, TRUE, TRUE, 0);
+
+ RxPathLabel = gtk_label_new (_("Rx Path"));
+ gtk_widget_set_name (RxPathLabel, "RxPathLabel");
+ gtk_widget_ref (RxPathLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "RxPathLabel", RxPathLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (RxPathLabel);
+ gtk_box_pack_start (GTK_BOX (vbox5), RxPathLabel, FALSE, FALSE, 0);
+
+ SNRLabel = gtk_label_new (_("SNR"));
+ gtk_widget_set_name (SNRLabel, "SNRLabel");
+ gtk_widget_ref (SNRLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "SNRLabel", SNRLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (SNRLabel);
+ gtk_box_pack_start (GTK_BOX (vbox5), SNRLabel, FALSE, FALSE, 0);
+
+ EchoNoiseLabel = gtk_label_new (_("Echo+Noise"));
+ gtk_widget_set_name (EchoNoiseLabel, "EchoNoiseLabel");
+ gtk_widget_ref (EchoNoiseLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "EchoNoiseLabel", EchoNoiseLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (EchoNoiseLabel);
+ gtk_box_pack_start (GTK_BOX (vbox5), EchoNoiseLabel, FALSE, FALSE, 0);
+
+ Line = gtk_label_new (_("Line"));
+ gtk_widget_set_name (Line, "Line");
+ gtk_widget_ref (Line);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Line", Line,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Line);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), Line);
+
+ vbox6 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox6, "vbox6");
+ gtk_widget_ref (vbox6);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox6", vbox6,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox6);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox6);
+
+ frame23 = gtk_frame_new (_("Fast Channel Error Counters"));
+ gtk_widget_set_name (frame23, "frame23");
+ gtk_widget_ref (frame23);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame23", frame23,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame23);
+ gtk_box_pack_start (GTK_BOX (vbox6), frame23, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame23), 4);
+
+ table4 = gtk_table_new (4, 5, FALSE);
+ gtk_widget_set_name (table4, "table4");
+ gtk_widget_ref (table4);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table4", table4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table4);
+ gtk_container_add (GTK_CONTAINER (frame23), table4);
+ gtk_container_set_border_width (GTK_CONTAINER (table4), 4);
+
+ label123 = gtk_label_new (_("Forward Error Corrections (FEC)"));
+ gtk_widget_set_name (label123, "label123");
+ gtk_widget_ref (label123);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label123", label123,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label123);
+ gtk_table_attach (GTK_TABLE (table4), label123, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label123), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label123), 4, 0);
+
+ label124 = gtk_label_new (_("Cyclic Redundancy Checks (CRC)"));
+ gtk_widget_set_name (label124, "label124");
+ gtk_widget_ref (label124);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label124", label124,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label124);
+ gtk_table_attach (GTK_TABLE (table4), label124, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label124), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label124), 4, 0);
+
+ label125 = gtk_label_new (_("Cyclic Header Error Check (HEC)"));
+ gtk_widget_set_name (label125, "label125");
+ gtk_widget_ref (label125);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label125", label125,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label125);
+ gtk_table_attach (GTK_TABLE (table4), label125, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label125), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label125), 4, 0);
+
+ LocFastCRCText = gtk_label_new ("");
+ gtk_widget_set_name (LocFastCRCText, "LocFastCRCText");
+ gtk_widget_ref (LocFastCRCText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocFastCRCText", LocFastCRCText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocFastCRCText);
+ gtk_table_attach (GTK_TABLE (table4), LocFastCRCText, 2, 3, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ LocFastFECText = gtk_label_new ("");
+ gtk_widget_set_name (LocFastFECText, "LocFastFECText");
+ gtk_widget_ref (LocFastFECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocFastFECText", LocFastFECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocFastFECText);
+ gtk_table_attach (GTK_TABLE (table4), LocFastFECText, 2, 3, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ LocFastHECText = gtk_label_new ("");
+ gtk_widget_set_name (LocFastHECText, "LocFastHECText");
+ gtk_widget_ref (LocFastHECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocFastHECText", LocFastHECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocFastHECText);
+ gtk_table_attach (GTK_TABLE (table4), LocFastHECText, 2, 3, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisFastFECText = gtk_label_new ("");
+ gtk_widget_set_name (DisFastFECText, "DisFastFECText");
+ gtk_widget_ref (DisFastFECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisFastFECText", DisFastFECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisFastFECText);
+ gtk_table_attach (GTK_TABLE (table4), DisFastFECText, 4, 5, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisFastCRCText = gtk_label_new ("");
+ gtk_widget_set_name (DisFastCRCText, "DisFastCRCText");
+ gtk_widget_ref (DisFastCRCText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisFastCRCText", DisFastCRCText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisFastCRCText);
+ gtk_table_attach (GTK_TABLE (table4), DisFastCRCText, 4, 5, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisFastHECText = gtk_label_new ("");
+ gtk_widget_set_name (DisFastHECText, "DisFastHECText");
+ gtk_widget_ref (DisFastHECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisFastHECText", DisFastHECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisFastHECText);
+ gtk_table_attach (GTK_TABLE (table4), DisFastHECText, 4, 5, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ vseparator3 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator3, "vseparator3");
+ gtk_widget_ref (vseparator3);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator3", vseparator3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator3);
+ gtk_table_attach (GTK_TABLE (table4), vseparator3, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ vseparator4 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator4, "vseparator4");
+ gtk_widget_ref (vseparator4);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator4", vseparator4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator4);
+ gtk_table_attach (GTK_TABLE (table4), vseparator4, 3, 4, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ label126 = gtk_label_new (_("Local"));
+ gtk_widget_set_name (label126, "label126");
+ gtk_widget_ref (label126);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label126", label126,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label126);
+ gtk_table_attach (GTK_TABLE (table4), label126, 2, 3, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label127 = gtk_label_new (_("Distant"));
+ gtk_widget_set_name (label127, "label127");
+ gtk_widget_ref (label127);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label127", label127,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label127);
+ gtk_table_attach (GTK_TABLE (table4), label127, 4, 5, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ frame24 = gtk_frame_new (_("Interleaved Channel Error Counters"));
+ gtk_widget_set_name (frame24, "frame24");
+ gtk_widget_ref (frame24);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame24", frame24,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame24);
+ gtk_box_pack_start (GTK_BOX (vbox6), frame24, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame24), 4);
+
+ table5 = gtk_table_new (4, 5, FALSE);
+ gtk_widget_set_name (table5, "table5");
+ gtk_widget_ref (table5);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table5", table5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table5);
+ gtk_container_add (GTK_CONTAINER (frame24), table5);
+ gtk_container_set_border_width (GTK_CONTAINER (table5), 4);
+
+ label134 = gtk_label_new (_("Forward Error Corrections (FEC)"));
+ gtk_widget_set_name (label134, "label134");
+ gtk_widget_ref (label134);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label134", label134,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label134);
+ gtk_table_attach (GTK_TABLE (table5), label134, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label134), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label134), 4, 0);
+
+ label135 = gtk_label_new (_("Cyclic Redundancy Checks (CRC)"));
+ gtk_widget_set_name (label135, "label135");
+ gtk_widget_ref (label135);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label135", label135,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label135);
+ gtk_table_attach (GTK_TABLE (table5), label135, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label135), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label135), 4, 0);
+
+ label136 = gtk_label_new (_("Cyclic Header Error Check (HEC)"));
+ gtk_widget_set_name (label136, "label136");
+ gtk_widget_ref (label136);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label136", label136,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label136);
+ gtk_table_attach (GTK_TABLE (table5), label136, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label136), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label136), 4, 0);
+
+ LocItlvCRCText = gtk_label_new ("");
+ gtk_widget_set_name (LocItlvCRCText, "LocItlvCRCText");
+ gtk_widget_ref (LocItlvCRCText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocItlvCRCText", LocItlvCRCText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocItlvCRCText);
+ gtk_table_attach (GTK_TABLE (table5), LocItlvCRCText, 2, 3, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ LocItlvFECText = gtk_label_new ("");
+ gtk_widget_set_name (LocItlvFECText, "LocItlvFECText");
+ gtk_widget_ref (LocItlvFECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocItlvFECText", LocItlvFECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocItlvFECText);
+ gtk_table_attach (GTK_TABLE (table5), LocItlvFECText, 2, 3, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ LocItlvHECText = gtk_label_new ("");
+ gtk_widget_set_name (LocItlvHECText, "LocItlvHECText");
+ gtk_widget_ref (LocItlvHECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "LocItlvHECText", LocItlvHECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (LocItlvHECText);
+ gtk_table_attach (GTK_TABLE (table5), LocItlvHECText, 2, 3, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisItlvFECText = gtk_label_new ("");
+ gtk_widget_set_name (DisItlvFECText, "DisItlvFECText");
+ gtk_widget_ref (DisItlvFECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisItlvFECText", DisItlvFECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisItlvFECText);
+ gtk_table_attach (GTK_TABLE (table5), DisItlvFECText, 4, 5, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisItlvCRCText = gtk_label_new ("");
+ gtk_widget_set_name (DisItlvCRCText, "DisItlvCRCText");
+ gtk_widget_ref (DisItlvCRCText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisItlvCRCText", DisItlvCRCText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisItlvCRCText);
+ gtk_table_attach (GTK_TABLE (table5), DisItlvCRCText, 4, 5, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DisItlvHECText = gtk_label_new ("");
+ gtk_widget_set_name (DisItlvHECText, "DisItlvHECText");
+ gtk_widget_ref (DisItlvHECText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DisItlvHECText", DisItlvHECText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DisItlvHECText);
+ gtk_table_attach (GTK_TABLE (table5), DisItlvHECText, 4, 5, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ vseparator5 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator5, "vseparator5");
+ gtk_widget_ref (vseparator5);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator5", vseparator5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator5);
+ gtk_table_attach (GTK_TABLE (table5), vseparator5, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ vseparator6 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator6, "vseparator6");
+ gtk_widget_ref (vseparator6);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator6", vseparator6,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator6);
+ gtk_table_attach (GTK_TABLE (table5), vseparator6, 3, 4, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ label137 = gtk_label_new (_("Local"));
+ gtk_widget_set_name (label137, "label137");
+ gtk_widget_ref (label137);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label137", label137,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label137);
+ gtk_table_attach (GTK_TABLE (table5), label137, 2, 3, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label141 = gtk_label_new (_("Distant"));
+ gtk_widget_set_name (label141, "label141");
+ gtk_widget_ref (label141);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label141", label141,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label141);
+ gtk_table_attach (GTK_TABLE (table5), label141, 4, 5, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ Errors = gtk_label_new (_("Errors"));
+ gtk_widget_set_name (Errors, "Errors");
+ gtk_widget_ref (Errors);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Errors", Errors,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Errors);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), Errors);
+
+ vbox8 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox8, "vbox8");
+ gtk_widget_ref (vbox8);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox8", vbox8,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox8);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox8);
+
+ frame25 = gtk_frame_new (_("Near End Defects Detected"));
+ gtk_widget_set_name (frame25, "frame25");
+ gtk_widget_ref (frame25);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame25", frame25,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame25);
+ gtk_box_pack_start (GTK_BOX (vbox8), frame25, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame25), 4);
+
+ NearEndDefectsDetectedTable = gtk_table_new (3, 4, FALSE);
+ gtk_widget_set_name (NearEndDefectsDetectedTable, "NearEndDefectsDetectedTable");
+ gtk_widget_ref (NearEndDefectsDetectedTable);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearEndDefectsDetectedTable", NearEndDefectsDetectedTable,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearEndDefectsDetectedTable);
+ gtk_container_add (GTK_CONTAINER (frame25), NearEndDefectsDetectedTable);
+ gtk_container_set_border_width (GTK_CONTAINER (NearEndDefectsDetectedTable), 4);
+
+ NearLoMLabel = gtk_label_new (_("Loss of Margin (LoM)"));
+ gtk_widget_set_name (NearLoMLabel, "NearLoMLabel");
+ gtk_widget_ref (NearLoMLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoMLabel", NearLoMLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoMLabel);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), NearLoMLabel, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearLoMLabel), 0, 0.5);
+
+ NearLoPLabel = gtk_label_new (_("Loss of Power (LoP)"));
+ gtk_widget_set_name (NearLoPLabel, "NearLoPLabel");
+ gtk_widget_ref (NearLoPLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoPLabel", NearLoPLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoPLabel);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), NearLoPLabel, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearLoPLabel), 0, 0.5);
+
+ NearLoSLabel = gtk_label_new (_("Loss of Signal (LoS)"));
+ gtk_widget_set_name (NearLoSLabel, "NearLoSLabel");
+ gtk_widget_ref (NearLoSLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoSLabel", NearLoSLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoSLabel);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), NearLoSLabel, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearLoSLabel), 0, 0.5);
+
+ NearLoFLabel = gtk_label_new (_("Loss of Frame (LoF)"));
+ gtk_widget_set_name (NearLoFLabel, "NearLoFLabel");
+ gtk_widget_ref (NearLoFLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoFLabel", NearLoFLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoFLabel);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), NearLoFLabel, 3, 4, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearLoFLabel), 0, 0.5);
+
+ NearLoCDLabel = gtk_label_new (_("Loss of Cell Delineation (LoCD)"));
+ gtk_widget_set_name (NearLoCDLabel, "NearLoCDLabel");
+ gtk_widget_ref (NearLoCDLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoCDLabel", NearLoCDLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoCDLabel);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), NearLoCDLabel, 3, 4, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NearLoCDLabel), 0, 0.5);
+
+ label198 = gtk_label_new ("");
+ gtk_widget_set_name (label198, "label198");
+ gtk_widget_ref (label198);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label198", label198,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label198);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), label198, 3, 4, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label198), 0, 0.5);
+
+ fixed5 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed5, "fixed5");
+ gtk_widget_ref (fixed5);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed5", fixed5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed5);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), fixed5, 2, 3, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ NearLoCDRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (NearLoCDRedLed, "NearLoCDRedLed");
+ gtk_widget_ref (NearLoCDRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoCDRedLed", NearLoCDRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoCDRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed5), NearLoCDRedLed, 0, 0);
+ gtk_widget_set_uposition (NearLoCDRedLed, 0, 0);
+ gtk_widget_set_usize (NearLoCDRedLed, 0, 0);
+
+ NearLoCDLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (NearLoCDLed, "NearLoCDLed");
+ gtk_widget_ref (NearLoCDLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoCDLed", NearLoCDLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoCDLed);
+ gtk_fixed_put (GTK_FIXED (fixed5), NearLoCDLed, 0, 0);
+ gtk_widget_set_uposition (NearLoCDLed, 0, 0);
+ gtk_widget_set_usize (NearLoCDLed, 0, 0);
+
+ fixed4 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed4, "fixed4");
+ gtk_widget_ref (fixed4);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed4", fixed4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed4);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), fixed4, 2, 3, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ NearLoFRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (NearLoFRedLed, "NearLoFRedLed");
+ gtk_widget_ref (NearLoFRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoFRedLed", NearLoFRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoFRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed4), NearLoFRedLed, 0, 0);
+ gtk_widget_set_uposition (NearLoFRedLed, 0, 0);
+ gtk_widget_set_usize (NearLoFRedLed, 0, 0);
+
+ NearLoFLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (NearLoFLed, "NearLoFLed");
+ gtk_widget_ref (NearLoFLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoFLed", NearLoFLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoFLed);
+ gtk_fixed_put (GTK_FIXED (fixed4), NearLoFLed, 0, 0);
+ gtk_widget_set_uposition (NearLoFLed, 0, 0);
+ gtk_widget_set_usize (NearLoFLed, 0, 0);
+
+ fixed3 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed3, "fixed3");
+ gtk_widget_ref (fixed3);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed3", fixed3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed3);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), fixed3, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ NearLoSRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (NearLoSRedLed, "NearLoSRedLed");
+ gtk_widget_ref (NearLoSRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoSRedLed", NearLoSRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoSRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed3), NearLoSRedLed, 0, 0);
+ gtk_widget_set_uposition (NearLoSRedLed, 0, 0);
+ gtk_widget_set_usize (NearLoSRedLed, 0, 0);
+
+ NearLoSLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (NearLoSLed, "NearLoSLed");
+ gtk_widget_ref (NearLoSLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoSLed", NearLoSLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoSLed);
+ gtk_fixed_put (GTK_FIXED (fixed3), NearLoSLed, 0, 0);
+ gtk_widget_set_uposition (NearLoSLed, 0, 0);
+ gtk_widget_set_usize (NearLoSLed, 0, 0);
+
+ fixed2 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed2, "fixed2");
+ gtk_widget_ref (fixed2);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed2", fixed2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed2);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), fixed2, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ NearLoPRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (NearLoPRedLed, "NearLoPRedLed");
+ gtk_widget_ref (NearLoPRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoPRedLed", NearLoPRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoPRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed2), NearLoPRedLed, 0, 0);
+ gtk_widget_set_uposition (NearLoPRedLed, 0, 0);
+ gtk_widget_set_usize (NearLoPRedLed, 0, 0);
+
+ NearLoPLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (NearLoPLed, "NearLoPLed");
+ gtk_widget_ref (NearLoPLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoPLed", NearLoPLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoPLed);
+ gtk_fixed_put (GTK_FIXED (fixed2), NearLoPLed, 0, 0);
+ gtk_widget_set_uposition (NearLoPLed, 0, 0);
+ gtk_widget_set_usize (NearLoPLed, 0, 0);
+
+ fixed1 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed1, "fixed1");
+ gtk_widget_ref (fixed1);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed1", fixed1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed1);
+ gtk_table_attach (GTK_TABLE (NearEndDefectsDetectedTable), fixed1, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ NearLoMRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (NearLoMRedLed, "NearLoMRedLed");
+ gtk_widget_ref (NearLoMRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoMRedLed", NearLoMRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoMRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed1), NearLoMRedLed, 0, 0);
+ gtk_widget_set_uposition (NearLoMRedLed, 0, 0);
+ gtk_widget_set_usize (NearLoMRedLed, 0, 0);
+
+ NearLoMLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (NearLoMLed, "NearLoMLed");
+ gtk_widget_ref (NearLoMLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NearLoMLed", NearLoMLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NearLoMLed);
+ gtk_fixed_put (GTK_FIXED (fixed1), NearLoMLed, 0, 0);
+ gtk_widget_set_uposition (NearLoMLed, 0, 0);
+ gtk_widget_set_usize (NearLoMLed, 0, 0);
+
+ frame26 = gtk_frame_new (_("Far End Defects detected"));
+ gtk_widget_set_name (frame26, "frame26");
+ gtk_widget_ref (frame26);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame26", frame26,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame26);
+ gtk_box_pack_start (GTK_BOX (vbox8), frame26, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame26), 4);
+
+ FarEndDefectsDetectedTable = gtk_table_new (3, 4, FALSE);
+ gtk_widget_set_name (FarEndDefectsDetectedTable, "FarEndDefectsDetectedTable");
+ gtk_widget_ref (FarEndDefectsDetectedTable);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarEndDefectsDetectedTable", FarEndDefectsDetectedTable,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarEndDefectsDetectedTable);
+ gtk_container_add (GTK_CONTAINER (frame26), FarEndDefectsDetectedTable);
+ gtk_container_set_border_width (GTK_CONTAINER (FarEndDefectsDetectedTable), 4);
+
+ FarLoMLabel = gtk_label_new (_("Loss of Margin (LoM)"));
+ gtk_widget_set_name (FarLoMLabel, "FarLoMLabel");
+ gtk_widget_ref (FarLoMLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoMLabel", FarLoMLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoMLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), FarLoMLabel, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarLoMLabel), 0, 0.5);
+
+ FarLoPLabel = gtk_label_new (_("Loss of Power (LoP)"));
+ gtk_widget_set_name (FarLoPLabel, "FarLoPLabel");
+ gtk_widget_ref (FarLoPLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoPLabel", FarLoPLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoPLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), FarLoPLabel, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarLoPLabel), 0, 0.5);
+
+ FarLoSLabel = gtk_label_new (_("Loss of Signal (LoS)"));
+ gtk_widget_set_name (FarLoSLabel, "FarLoSLabel");
+ gtk_widget_ref (FarLoSLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoSLabel", FarLoSLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoSLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), FarLoSLabel, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarLoSLabel), 0, 0.5);
+
+ FarLoFLabel = gtk_label_new (_("Loss of Frame (LoF)"));
+ gtk_widget_set_name (FarLoFLabel, "FarLoFLabel");
+ gtk_widget_ref (FarLoFLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoFLabel", FarLoFLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoFLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), FarLoFLabel, 3, 4, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarLoFLabel), 0, 0.5);
+
+ DyingGaspLabel = gtk_label_new (_("Dying Gasp message received"));
+ gtk_widget_set_name (DyingGaspLabel, "DyingGaspLabel");
+ gtk_widget_ref (DyingGaspLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DyingGaspLabel", DyingGaspLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DyingGaspLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), DyingGaspLabel, 3, 4, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (DyingGaspLabel), 0, 0.5);
+
+ FarLoCDLabel = gtk_label_new (_("Loss of Cell Delineation (LoCD)"));
+ gtk_widget_set_name (FarLoCDLabel, "FarLoCDLabel");
+ gtk_widget_ref (FarLoCDLabel);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoCDLabel", FarLoCDLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoCDLabel);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), FarLoCDLabel, 3, 4, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FarLoCDLabel), 0, 0.5);
+
+ fixed7 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed7, "fixed7");
+ gtk_widget_ref (fixed7);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed7", fixed7,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed7);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed7, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ FarLoMRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (FarLoMRedLed, "FarLoMRedLed");
+ gtk_widget_ref (FarLoMRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoMRedLed", FarLoMRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoMRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed7), FarLoMRedLed, 0, 0);
+ gtk_widget_set_uposition (FarLoMRedLed, 0, 0);
+ gtk_widget_set_usize (FarLoMRedLed, 0, 0);
+
+ FarLoMLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (FarLoMLed, "FarLoMLed");
+ gtk_widget_ref (FarLoMLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoMLed", FarLoMLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoMLed);
+ gtk_fixed_put (GTK_FIXED (fixed7), FarLoMLed, 0, 0);
+ gtk_widget_set_uposition (FarLoMLed, 0, 0);
+ gtk_widget_set_usize (FarLoMLed, 0, 0);
+
+ fixed8 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed8, "fixed8");
+ gtk_widget_ref (fixed8);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed8", fixed8,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed8);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed8, 0, 1, 1, 2,
+ (GtkAttachOptions) (0),
+ (GtkAttachOptions) (0), 0, 0);
+
+ FarLoPRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (FarLoPRedLed, "FarLoPRedLed");
+ gtk_widget_ref (FarLoPRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoPRedLed", FarLoPRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoPRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed8), FarLoPRedLed, 0, 0);
+ gtk_widget_set_uposition (FarLoPRedLed, 0, 0);
+ gtk_widget_set_usize (FarLoPRedLed, 0, 0);
+
+ FarLoPLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (FarLoPLed, "FarLoPLed");
+ gtk_widget_ref (FarLoPLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoPLed", FarLoPLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoPLed);
+ gtk_fixed_put (GTK_FIXED (fixed8), FarLoPLed, 0, 0);
+ gtk_widget_set_uposition (FarLoPLed, 0, 0);
+ gtk_widget_set_usize (FarLoPLed, 0, 0);
+
+ fixed9 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed9, "fixed9");
+ gtk_widget_ref (fixed9);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed9", fixed9,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed9);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed9, 0, 1, 2, 3,
+ (GtkAttachOptions) (0),
+ (GtkAttachOptions) (0), 0, 0);
+
+ FarLoSRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (FarLoSRedLed, "FarLoSRedLed");
+ gtk_widget_ref (FarLoSRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoSRedLed", FarLoSRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoSRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed9), FarLoSRedLed, 0, 0);
+ gtk_widget_set_uposition (FarLoSRedLed, 0, 0);
+ gtk_widget_set_usize (FarLoSRedLed, 0, 0);
+
+ FarLoSLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (FarLoSLed, "FarLoSLed");
+ gtk_widget_ref (FarLoSLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoSLed", FarLoSLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoSLed);
+ gtk_fixed_put (GTK_FIXED (fixed9), FarLoSLed, 0, 0);
+ gtk_widget_set_uposition (FarLoSLed, 0, 0);
+ gtk_widget_set_usize (FarLoSLed, 0, 0);
+
+ fixed10 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed10, "fixed10");
+ gtk_widget_ref (fixed10);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed10", fixed10,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed10);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed10, 2, 3, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND),
+ (GtkAttachOptions) (0), 0, 0);
+
+ FarLoFRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (FarLoFRedLed, "FarLoFRedLed");
+ gtk_widget_ref (FarLoFRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoFRedLed", FarLoFRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoFRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed10), FarLoFRedLed, 0, 0);
+ gtk_widget_set_uposition (FarLoFRedLed, 0, 0);
+ gtk_widget_set_usize (FarLoFRedLed, 0, 0);
+
+ FarLoFLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (FarLoFLed, "FarLoFLed");
+ gtk_widget_ref (FarLoFLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoFLed", FarLoFLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoFLed);
+ gtk_fixed_put (GTK_FIXED (fixed10), FarLoFLed, 0, 0);
+ gtk_widget_set_uposition (FarLoFLed, 0, 0);
+ gtk_widget_set_usize (FarLoFLed, 0, 0);
+
+ fixed11 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed11, "fixed11");
+ gtk_widget_ref (fixed11);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed11", fixed11,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed11);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed11, 2, 3, 1, 2,
+ (GtkAttachOptions) (0),
+ (GtkAttachOptions) (0), 0, 0);
+
+ FarLoCDRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (FarLoCDRedLed, "FarLoCDRedLed");
+ gtk_widget_ref (FarLoCDRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoCDRedLed", FarLoCDRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoCDRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed11), FarLoCDRedLed, 0, 0);
+ gtk_widget_set_uposition (FarLoCDRedLed, 0, 0);
+ gtk_widget_set_usize (FarLoCDRedLed, 0, 0);
+
+ FarLoCDLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (FarLoCDLed, "FarLoCDLed");
+ gtk_widget_ref (FarLoCDLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FarLoCDLed", FarLoCDLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FarLoCDLed);
+ gtk_fixed_put (GTK_FIXED (fixed11), FarLoCDLed, 0, 0);
+ gtk_widget_set_uposition (FarLoCDLed, 0, 0);
+ gtk_widget_set_usize (FarLoCDLed, 0, 0);
+
+ fixed12 = gtk_fixed_new ();
+ gtk_widget_set_name (fixed12, "fixed12");
+ gtk_widget_ref (fixed12);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "fixed12", fixed12,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (fixed12);
+ gtk_table_attach (GTK_TABLE (FarEndDefectsDetectedTable), fixed12, 2, 3, 2, 3,
+ (GtkAttachOptions) (0),
+ (GtkAttachOptions) (0), 0, 0);
+
+ DyingGaspRedLed = create_pixmap (main_window, "red_led.xpm");
+ gtk_widget_set_name (DyingGaspRedLed, "DyingGaspRedLed");
+ gtk_widget_ref (DyingGaspRedLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DyingGaspRedLed", DyingGaspRedLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DyingGaspRedLed);
+ gtk_fixed_put (GTK_FIXED (fixed12), DyingGaspRedLed, 0, 0);
+ gtk_widget_set_uposition (DyingGaspRedLed, 0, 0);
+ gtk_widget_set_usize (DyingGaspRedLed, 0, 0);
+
+ DyingGaspLed = create_pixmap (main_window, "green_led.xpm");
+ gtk_widget_set_name (DyingGaspLed, "DyingGaspLed");
+ gtk_widget_ref (DyingGaspLed);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "DyingGaspLed", DyingGaspLed,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (DyingGaspLed);
+ gtk_fixed_put (GTK_FIXED (fixed12), DyingGaspLed, 0, 0);
+ gtk_widget_set_uposition (DyingGaspLed, 0, 0);
+ gtk_widget_set_usize (DyingGaspLed, 0, 0);
+
+ Defects = gtk_label_new (_("Defects"));
+ gtk_widget_set_name (Defects, "Defects");
+ gtk_widget_ref (Defects);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Defects", Defects,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Defects);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), Defects);
+
+ frame27 = gtk_frame_new (_("ATM maintenance indicators (OAM-F5)"));
+ gtk_widget_set_name (frame27, "frame27");
+ gtk_widget_ref (frame27);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame27", frame27,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame27);
+ gtk_container_add (GTK_CONTAINER (notebook1), frame27);
+ gtk_container_set_border_width (GTK_CONTAINER (frame27), 4);
+
+ vbox9 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox9, "vbox9");
+ gtk_widget_ref (vbox9);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox9", vbox9,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox9);
+ gtk_container_add (GTK_CONTAINER (frame27), vbox9);
+
+ vbox11 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox11, "vbox11");
+ gtk_widget_ref (vbox11);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox11", vbox11,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox11);
+ gtk_box_pack_start (GTK_BOX (vbox9), vbox11, TRUE, TRUE, 0);
+
+ vbox12 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox12, "vbox12");
+ gtk_widget_ref (vbox12);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox12", vbox12,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox12);
+ gtk_box_pack_start (GTK_BOX (vbox11), vbox12, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox12), 4);
+
+ GenerateLBcellsButton = gtk_check_button_new_with_label (_("Generate looback cells (OAM-F5 LB cells)"));
+ gtk_widget_set_name (GenerateLBcellsButton, "GenerateLBcellsButton");
+ gtk_widget_ref (GenerateLBcellsButton);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "GenerateLBcellsButton", GenerateLBcellsButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (GenerateLBcellsButton);
+ gtk_box_pack_start (GTK_BOX (vbox12), GenerateLBcellsButton, FALSE, FALSE, 0);
+
+ table10 = gtk_table_new (2, 4, FALSE);
+ gtk_widget_set_name (table10, "table10");
+ gtk_widget_ref (table10);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table10", table10,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table10);
+ gtk_box_pack_start (GTK_BOX (vbox12), table10, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (table10), 4);
+
+ label157 = gtk_label_new (_("VPI:"));
+ gtk_widget_set_name (label157, "label157");
+ gtk_widget_ref (label157);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label157", label157,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label157);
+ gtk_table_attach (GTK_TABLE (table10), label157, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label157), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label157), 4, 0);
+
+ label158 = gtk_label_new (_("VCI:"));
+ gtk_widget_set_name (label158, "label158");
+ gtk_widget_ref (label158);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label158", label158,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label158);
+ gtk_table_attach (GTK_TABLE (table10), label158, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label158), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label158), 4, 0);
+
+ VPIEntry = gtk_entry_new ();
+ gtk_widget_set_name (VPIEntry, "VPIEntry");
+ gtk_widget_ref (VPIEntry);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "VPIEntry", VPIEntry,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (VPIEntry);
+ gtk_table_attach (GTK_TABLE (table10), VPIEntry, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ VCIEntry = gtk_entry_new ();
+ gtk_widget_set_name (VCIEntry, "VCIEntry");
+ gtk_widget_ref (VCIEntry);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "VCIEntry", VCIEntry,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (VCIEntry);
+ gtk_table_attach (GTK_TABLE (table10), VCIEntry, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ ResetCountersButton = gtk_button_new_with_label (_("Reset Counters"));
+ gtk_widget_set_name (ResetCountersButton, "ResetCountersButton");
+ gtk_widget_ref (ResetCountersButton);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ResetCountersButton", ResetCountersButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ResetCountersButton);
+ gtk_table_attach (GTK_TABLE (table10), ResetCountersButton, 3, 4, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label197 = gtk_label_new ("");
+ gtk_widget_set_name (label197, "label197");
+ gtk_widget_ref (label197);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label197", label197,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label197);
+ gtk_table_attach (GTK_TABLE (table10), label197, 2, 3, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label197), 0, 0.5);
+
+ frame28 = gtk_frame_new (_("Receive counters"));
+ gtk_widget_set_name (frame28, "frame28");
+ gtk_widget_ref (frame28);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame28", frame28,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame28);
+ gtk_box_pack_start (GTK_BOX (vbox11), frame28, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame28), 6);
+
+ table11 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_set_name (table11, "table11");
+ gtk_widget_ref (table11);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table11", table11,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table11);
+ gtk_container_add (GTK_CONTAINER (frame28), table11);
+ gtk_container_set_border_width (GTK_CONTAINER (table11), 4);
+
+ label159 = gtk_label_new (_("Continuity Check cells (CC):"));
+ gtk_widget_set_name (label159, "label159");
+ gtk_widget_ref (label159);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label159", label159,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label159);
+ gtk_table_attach (GTK_TABLE (table11), label159, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label159), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label159), 4, 0);
+
+ label160 = gtk_label_new (_("Remote Defect Indication cells (RDI):"));
+ gtk_widget_set_name (label160, "label160");
+ gtk_widget_ref (label160);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label160", label160,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label160);
+ gtk_table_attach (GTK_TABLE (table11), label160, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label160), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label160), 4, 0);
+
+ label161 = gtk_label_new (_("Alarm Indication Signal cells (AIS):"));
+ gtk_widget_set_name (label161, "label161");
+ gtk_widget_ref (label161);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label161", label161,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label161);
+ gtk_table_attach (GTK_TABLE (table11), label161, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label161), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label161), 4, 0);
+
+ label162 = gtk_label_new (_("Far-end loopback cells (LB):"));
+ gtk_widget_set_name (label162, "label162");
+ gtk_widget_ref (label162);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label162", label162,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label162);
+ gtk_table_attach (GTK_TABLE (table11), label162, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label162), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label162), 4, 0);
+
+ label163 = gtk_label_new (_("Near-end loopback cells (LB):"));
+ gtk_widget_set_name (label163, "label163");
+ gtk_widget_ref (label163);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label163", label163,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label163);
+ gtk_table_attach (GTK_TABLE (table11), label163, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label163), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label163), 4, 0);
+
+ CCText = gtk_label_new ("");
+ gtk_widget_set_name (CCText, "CCText");
+ gtk_widget_ref (CCText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "CCText", CCText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (CCText);
+ gtk_table_attach (GTK_TABLE (table11), CCText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (CCText), 0, 0.5);
+
+ RDIText = gtk_label_new ("");
+ gtk_widget_set_name (RDIText, "RDIText");
+ gtk_widget_ref (RDIText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "RDIText", RDIText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (RDIText);
+ gtk_table_attach (GTK_TABLE (table11), RDIText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (RDIText), 0, 0.5);
+
+ FeLBText = gtk_label_new ("");
+ gtk_widget_set_name (FeLBText, "FeLBText");
+ gtk_widget_ref (FeLBText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FeLBText", FeLBText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FeLBText);
+ gtk_table_attach (GTK_TABLE (table11), FeLBText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FeLBText), 0, 0.5);
+
+ AISText = gtk_label_new ("");
+ gtk_widget_set_name (AISText, "AISText");
+ gtk_widget_ref (AISText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "AISText", AISText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (AISText);
+ gtk_table_attach (GTK_TABLE (table11), AISText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (AISText), 0, 0.5);
+
+ NeLBText = gtk_label_new ("");
+ gtk_widget_set_name (NeLBText, "NeLBText");
+ gtk_widget_ref (NeLBText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "NeLBText", NeLBText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (NeLBText);
+ gtk_table_attach (GTK_TABLE (table11), NeLBText, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (NeLBText), 0, 0.5);
+
+ Test = gtk_label_new (_("Test"));
+ gtk_widget_set_name (Test, "Test");
+ gtk_widget_ref (Test);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Test", Test,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Test);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), Test);
+
+ vbox13 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox13, "vbox13");
+ gtk_widget_ref (vbox13);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox13", vbox13,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox13);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox13);
+
+ frame29 = gtk_frame_new (_("Installed Profile"));
+ gtk_widget_set_name (frame29, "frame29");
+ gtk_widget_ref (frame29);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame29", frame29,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame29);
+ gtk_box_pack_start (GTK_BOX (vbox13), frame29, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame29), 4);
+
+ table12 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_set_name (table12, "table12");
+ gtk_widget_ref (table12);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table12", table12,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table12);
+ gtk_container_add (GTK_CONTAINER (frame29), table12);
+ gtk_container_set_border_width (GTK_CONTAINER (table12), 4);
+
+ label169 = gtk_label_new (_("Modulation:"));
+ gtk_widget_set_name (label169, "label169");
+ gtk_widget_ref (label169);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label169", label169,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label169);
+ gtk_table_attach (GTK_TABLE (table12), label169, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label169), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label169), 4, 0);
+
+ label170 = gtk_label_new (_("VPI:"));
+ gtk_widget_set_name (label170, "label170");
+ gtk_widget_ref (label170);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label170", label170,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label170);
+ gtk_table_attach (GTK_TABLE (table12), label170, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label170), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label170), 4, 0);
+
+ label171 = gtk_label_new (_("VCI:"));
+ gtk_widget_set_name (label171, "label171");
+ gtk_widget_ref (label171);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label171", label171,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label171);
+ gtk_table_attach (GTK_TABLE (table12), label171, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label171), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label171), 4, 0);
+
+ label172 = gtk_label_new (_("Protocol:"));
+ gtk_widget_set_name (label172, "label172");
+ gtk_widget_ref (label172);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label172", label172,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label172);
+ gtk_table_attach (GTK_TABLE (table12), label172, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label172), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label172), 4, 0);
+
+ label173 = gtk_label_new (_("Encapsulation:"));
+ gtk_widget_set_name (label173, "label173");
+ gtk_widget_ref (label173);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label173", label173,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label173);
+ gtk_table_attach (GTK_TABLE (table12), label173, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label173), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label173), 4, 0);
+
+ ConfigVpiText = gtk_label_new ("");
+ gtk_widget_set_name (ConfigVpiText, "ConfigVpiText");
+ gtk_widget_ref (ConfigVpiText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ConfigVpiText", ConfigVpiText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ConfigVpiText);
+ gtk_table_attach (GTK_TABLE (table12), ConfigVpiText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ConfigVpiText), 0, 0.5);
+
+ ConfigVciText = gtk_label_new ("");
+ gtk_widget_set_name (ConfigVciText, "ConfigVciText");
+ gtk_widget_ref (ConfigVciText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ConfigVciText", ConfigVciText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ConfigVciText);
+ gtk_table_attach (GTK_TABLE (table12), ConfigVciText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ConfigVciText), 0, 0.5);
+
+ ConfigProtocolText = gtk_label_new ("");
+ gtk_widget_set_name (ConfigProtocolText, "ConfigProtocolText");
+ gtk_widget_ref (ConfigProtocolText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ConfigProtocolText", ConfigProtocolText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ConfigProtocolText);
+ gtk_table_attach (GTK_TABLE (table12), ConfigProtocolText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ConfigProtocolText), 0, 0.5);
+
+ ConfigEncapsText = gtk_label_new ("");
+ gtk_widget_set_name (ConfigEncapsText, "ConfigEncapsText");
+ gtk_widget_ref (ConfigEncapsText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ConfigEncapsText", ConfigEncapsText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ConfigEncapsText);
+ gtk_table_attach (GTK_TABLE (table12), ConfigEncapsText, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ConfigEncapsText), 0, 0.5);
+
+ ConfigModulationText = gtk_label_new ("");
+ gtk_widget_set_name (ConfigModulationText, "ConfigModulationText");
+ gtk_widget_ref (ConfigModulationText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ConfigModulationText", ConfigModulationText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ConfigModulationText);
+ gtk_table_attach (GTK_TABLE (table12), ConfigModulationText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ConfigModulationText), 0, 0.5);
+
+ Config = gtk_label_new (_("Config"));
+ gtk_widget_set_name (Config, "Config");
+ gtk_widget_ref (Config);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Config", Config,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Config);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), Config);
+
+ vbox14 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox14, "vbox14");
+ gtk_widget_ref (vbox14);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox14", vbox14,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox14);
+ gtk_container_add (GTK_CONTAINER (notebook1), vbox14);
+
+ frame30 = gtk_frame_new (_("ADSL Package Information"));
+ gtk_widget_set_name (frame30, "frame30");
+ gtk_widget_ref (frame30);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame30", frame30,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame30);
+ gtk_box_pack_start (GTK_BOX (vbox14), frame30, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame30), 4);
+
+ table13 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_set_name (table13, "table13");
+ gtk_widget_ref (table13);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table13", table13,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table13);
+ gtk_container_add (GTK_CONTAINER (frame30), table13);
+ gtk_container_set_border_width (GTK_CONTAINER (table13), 4);
+
+ label179 = gtk_label_new (_("Package Name:"));
+ gtk_widget_set_name (label179, "label179");
+ gtk_widget_ref (label179);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label179", label179,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label179);
+ gtk_table_attach (GTK_TABLE (table13), label179, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label179), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label179), 4, 0);
+
+ label180 = gtk_label_new (_("Package Version:"));
+ gtk_widget_set_name (label180, "label180");
+ gtk_widget_ref (label180);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label180", label180,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label180);
+ gtk_table_attach (GTK_TABLE (table13), label180, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label180), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label180), 4, 0);
+
+ label181 = gtk_label_new (_("Firmware Version:"));
+ gtk_widget_set_name (label181, "label181");
+ gtk_widget_ref (label181);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label181", label181,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label181);
+ gtk_table_attach (GTK_TABLE (table13), label181, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label181), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label181), 4, 0);
+
+ label182 = gtk_label_new (_("Manufacturer:"));
+ gtk_widget_set_name (label182, "label182");
+ gtk_widget_ref (label182);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label182", label182,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label182);
+ gtk_table_attach (GTK_TABLE (table13), label182, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label182), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label182), 4, 0);
+
+ label183 = gtk_label_new (_("Copyright:"));
+ gtk_widget_set_name (label183, "label183");
+ gtk_widget_ref (label183);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label183", label183,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label183);
+ gtk_table_attach (GTK_TABLE (table13), label183, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label183), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label183), 4, 0);
+
+ PackageNameText = gtk_label_new ("");
+ gtk_widget_set_name (PackageNameText, "PackageNameText");
+ gtk_widget_ref (PackageNameText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "PackageNameText", PackageNameText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (PackageNameText);
+ gtk_table_attach (GTK_TABLE (table13), PackageNameText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (PackageNameText), 0, 0.5);
+
+ PackageVersionText = gtk_label_new ("");
+ gtk_widget_set_name (PackageVersionText, "PackageVersionText");
+ gtk_widget_ref (PackageVersionText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "PackageVersionText", PackageVersionText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (PackageVersionText);
+ gtk_table_attach (GTK_TABLE (table13), PackageVersionText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (PackageVersionText), 0, 0.5);
+
+ FirmwareVersionText = gtk_label_new ("");
+ gtk_widget_set_name (FirmwareVersionText, "FirmwareVersionText");
+ gtk_widget_ref (FirmwareVersionText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "FirmwareVersionText", FirmwareVersionText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (FirmwareVersionText);
+ gtk_table_attach (GTK_TABLE (table13), FirmwareVersionText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (FirmwareVersionText), 0, 0.5);
+
+ ManufacturerText = gtk_label_new ("");
+ gtk_widget_set_name (ManufacturerText, "ManufacturerText");
+ gtk_widget_ref (ManufacturerText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ManufacturerText", ManufacturerText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ManufacturerText);
+ gtk_table_attach (GTK_TABLE (table13), ManufacturerText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ManufacturerText), 0, 0.5);
+
+ CopyrightText = gtk_label_new ("");
+ gtk_widget_set_name (CopyrightText, "CopyrightText");
+ gtk_widget_ref (CopyrightText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "CopyrightText", CopyrightText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (CopyrightText);
+ gtk_table_attach (GTK_TABLE (table13), CopyrightText, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (CopyrightText), 0, 0.5);
+
+ hbox6 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox6, "hbox6");
+ gtk_widget_ref (hbox6);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "hbox6", hbox6,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox6);
+ gtk_box_pack_start (GTK_BOX (vbox14), hbox6, TRUE, TRUE, 0);
+
+ frame31 = gtk_frame_new (_("Far End Modem Identification"));
+ gtk_widget_set_name (frame31, "frame31");
+ gtk_widget_ref (frame31);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "frame31", frame31,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame31);
+ gtk_box_pack_start (GTK_BOX (hbox6), frame31, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (frame31), 4);
+
+ table14 = gtk_table_new (4, 2, FALSE);
+ gtk_widget_set_name (table14, "table14");
+ gtk_widget_ref (table14);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "table14", table14,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table14);
+ gtk_container_add (GTK_CONTAINER (frame31), table14);
+ gtk_container_set_border_width (GTK_CONTAINER (table14), 4);
+
+ label184 = gtk_label_new (_("Vendor Code:"));
+ gtk_widget_set_name (label184, "label184");
+ gtk_widget_ref (label184);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label184", label184,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label184);
+ gtk_table_attach (GTK_TABLE (table14), label184, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label184), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label184), 4, 0);
+
+ label185 = gtk_label_new (_("Vendor Country Code:"));
+ gtk_widget_set_name (label185, "label185");
+ gtk_widget_ref (label185);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label185", label185,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label185);
+ gtk_table_attach (GTK_TABLE (table14), label185, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label185), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label185), 4, 0);
+
+ label186 = gtk_label_new (_("ITU Revision Number:"));
+ gtk_widget_set_name (label186, "label186");
+ gtk_widget_ref (label186);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label186", label186,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label186);
+ gtk_table_attach (GTK_TABLE (table14), label186, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label186), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label186), 4, 0);
+
+ label187 = gtk_label_new (_("Vendor Specific Info:"));
+ gtk_widget_set_name (label187, "label187");
+ gtk_widget_ref (label187);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "label187", label187,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label187);
+ gtk_table_attach (GTK_TABLE (table14), label187, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label187), 0, 0.5);
+ gtk_misc_set_padding (GTK_MISC (label187), 4, 0);
+
+ VendorCodeText = gtk_label_new ("");
+ gtk_widget_set_name (VendorCodeText, "VendorCodeText");
+ gtk_widget_ref (VendorCodeText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "VendorCodeText", VendorCodeText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (VendorCodeText);
+ gtk_table_attach (GTK_TABLE (table14), VendorCodeText, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (VendorCodeText), 0, 0.5);
+
+ VendorCountryCodeText = gtk_label_new ("");
+ gtk_widget_set_name (VendorCountryCodeText, "VendorCountryCodeText");
+ gtk_widget_ref (VendorCountryCodeText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "VendorCountryCodeText", VendorCountryCodeText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (VendorCountryCodeText);
+ gtk_table_attach (GTK_TABLE (table14), VendorCountryCodeText, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (VendorCountryCodeText), 0, 0.5);
+
+ ITURevisionNumberText = gtk_label_new ("");
+ gtk_widget_set_name (ITURevisionNumberText, "ITURevisionNumberText");
+ gtk_widget_ref (ITURevisionNumberText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "ITURevisionNumberText", ITURevisionNumberText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (ITURevisionNumberText);
+ gtk_table_attach (GTK_TABLE (table14), ITURevisionNumberText, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (ITURevisionNumberText), 0, 0.5);
+
+ VendorSpecificInfoText = gtk_label_new ("");
+ gtk_widget_set_name (VendorSpecificInfoText, "VendorSpecificInfoText");
+ gtk_widget_ref (VendorSpecificInfoText);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "VendorSpecificInfoText", VendorSpecificInfoText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (VendorSpecificInfoText);
+ gtk_table_attach (GTK_TABLE (table14), VendorSpecificInfoText, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (VendorSpecificInfoText), 0, 0.5);
+
+ pixmap15 = create_pixmap (main_window, "bewan.xpm");
+ gtk_widget_set_name (pixmap15, "pixmap15");
+ gtk_widget_ref (pixmap15);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "pixmap15", pixmap15,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (pixmap15);
+ gtk_box_pack_start (GTK_BOX (hbox6), pixmap15, TRUE, TRUE, 0);
+
+ Info = gtk_label_new (_("Info"));
+ gtk_widget_set_name (Info, "Info");
+ gtk_widget_ref (Info);
+ gtk_object_set_data_full (GTK_OBJECT (main_window), "Info", Info,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Info);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 6), Info);
+
+ gtk_signal_connect (GTK_OBJECT (main_window), "destroy_event",
+ GTK_SIGNAL_FUNC (gtk_main_quit),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (main_window), "delete_event",
+ GTK_SIGNAL_FUNC (gtk_main_quit),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (StartButton), "clicked",
+ GTK_SIGNAL_FUNC (on_StartButton_clicked),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (StopButton), "clicked",
+ GTK_SIGNAL_FUNC (on_StopButton_clicked),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (PowerChart), "expose_event",
+ GTK_SIGNAL_FUNC (on_PowerChart_expose_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (PowerChart), "configure_event",
+ GTK_SIGNAL_FUNC (on_PowerChart_configure_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (RxPathLabel), "configure_event",
+ GTK_SIGNAL_FUNC (on_RxPathLabel_configure_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (SNRLabel), "configure_event",
+ GTK_SIGNAL_FUNC (on_SNRLabel_configure_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (EchoNoiseLabel), "configure_event",
+ GTK_SIGNAL_FUNC (on_EchoNoiseLabel_configure_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (GenerateLBcellsButton), "toggled",
+ GTK_SIGNAL_FUNC (on_GenerateLBcellsButton_toggled),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (ResetCountersButton), "clicked",
+ GTK_SIGNAL_FUNC (on_ResetCountersButton_clicked),
+ NULL);
+
+ return main_window;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/interface.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,5 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_main_window (void);
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/main.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/main.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,58 @@
+/*
+ * Initial main.c file generated by Glade. Edit as required.
+ * Glade will not overwrite this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include "interface.h"
+#include "support.h"
+#include "status.h"
+
+
+int
+main (int argc, char *argv[])
+{
+ GtkWidget *main_window;
+
+#ifdef ENABLE_NLS
+ bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
+ textdomain (PACKAGE);
+#endif
+
+ gtk_set_locale ();
+ gtk_init (&argc, &argv);
+
+
+ add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
+ add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
+
+ /*
+ * The following code was added by Glade to create one of each component
+ * (except popup menus), just so that you see something after building
+ * the project. Delete any components that you don't want shown initially.
+ */
+ main_window = create_main_window ();
+
+ /*
+ my callbacks not called on configure_event ???
+ */
+ {
+ create_RxPathLabel(lookup_widget(GTK_WIDGET(main_window),"RxPathLabel"));
+ create_SNRLabel(lookup_widget(GTK_WIDGET(main_window),"SNRLabel"));
+ create_EchoNoiseLabel(lookup_widget(GTK_WIDGET(main_window),"EchoNoiseLabel"));
+ }
+ status_init (main_window);
+
+ gtk_widget_show (main_window);
+
+ gtk_main ();
+
+ status_exit();
+ return 0;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1009 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <unistd.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <linux/atmdev.h>
+#include "amu.h"
+#include "unicorn.h"
+#include "support.h"
+
+
+struct ADSL_DEVICE {
+ int sd;
+ enum {
+ ATM_DRIVER=1,
+ ETH_DRIVER=2
+ } type;
+ union {
+ struct atmif_sioc atm;
+ struct ifreq eth;
+ } req;
+};
+typedef struct ADSL_DEVICE ADSL_DEVICE;
+
+
+/* globals */
+static ADSL_DEVICE g_device={-1,0};
+static GtkWidget *g_main_window=NULL;
+
+static T_StateInfo last_info = { C_AMSW_IDLE,-1,-1,0L};
+static T_AMSW_def_counter_set last_dcs = {{0}};
+static T_AMSW_def_bitmap_set last_dbs = {{0}};
+
+static int g_send_oam=0;
+int g_vpi,g_vci;
+static T_oam_stats last_oam_counters = {0};
+/* config */
+struct {
+ int modulation;
+ int vpi;
+ int vci;
+ char protocol[128];
+ char encaps[128];
+} AdslConfig = {AMSW_ANSI,0,0,"",""};
+
+#define CURVES 3 // Maximum number of curves
+#define MAXVAL 256 // Size of the curve table
+
+int mCurves;
+float mCurve[CURVES][MAXVAL]; // Tables of values
+/* Backing pixmap for drawing area */
+static GdkPixmap *pixmap = NULL;
+
+ // colors
+static const GdkColor chart_colors[CURVES] = {
+ {0,65535,0,0}, // red
+ {0,0,65535,0}, // green
+ {0,0,0,65535}, // blue
+};
+
+static void set_color(GtkWidget *widget,const GdkColor *color)
+{
+ GtkRcStyle *rc_style = gtk_rc_style_new ();
+ rc_style->fg[GTK_STATE_NORMAL] = *color;
+ rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG;
+ gtk_widget_modify_style (widget,rc_style);
+ gtk_rc_style_unref (rc_style);
+}
+
+static void label_set_text(GtkWidget *main_window,const char *field, const char *text)
+{
+ gtk_label_set_text(GTK_LABEL(lookup_widget(GTK_WIDGET(main_window),field)),text);
+}
+
+static void label_set_number(GtkWidget *main_window,const char *field, int number)
+{
+ char str[8];
+
+ g_snprintf(str,8,"%d",number);
+
+ label_set_text(main_window,field,str);
+}
+
+static void label_set_float(GtkWidget *main_window,const char *field, float number)
+{
+ char str[8];
+
+ g_snprintf(str,8,"%.2f",number);
+
+ label_set_text(main_window,field,str);
+}
+
+static int label_get_number(GtkWidget *main_window,const char *field)
+{
+ const gchar *str;
+
+ str = gtk_entry_get_text(GTK_ENTRY(lookup_widget(GTK_WIDGET(main_window),field)));
+ return atoi(str);
+}
+
+static void hide_widget(GtkWidget *main_window,const char *field)
+{
+ GtkWidget *widget = lookup_widget(GTK_WIDGET(main_window),field);
+
+ gtk_widget_hide(GTK_WIDGET(widget));
+}
+
+static void show_widget(GtkWidget *main_window,const char *field)
+{
+ GtkWidget *widget = lookup_widget(GTK_WIDGET(main_window),field);
+
+ gtk_widget_show_now(GTK_WIDGET(widget));
+}
+
+const char *modem_state_string(AMSW_ModemState modemState)
+{
+ switch(modemState) {
+ case C_AMSW_IDLE: return N_("IDLE");
+ case C_AMSW_L3: return N_("L3");
+ case C_AMSW_LISTENING: return N_("LISTENING");
+ case C_AMSW_ACTIVATING: return N_("ACTIVATING");
+ case C_AMSW_Ghs_HANDSHAKING: return N_("Ghs_HANDSHAKING");
+ case C_AMSW_ANSI_HANDSHAKING: return N_("ANSI_HANDSHAKING");
+ case C_AMSW_INITIALIZING: return N_("INITIALIZING");
+ case C_AMSW_RESTARTING: return N_("RESTARTING");
+ case C_AMSW_FAST_RETRAIN: return N_("FAST_RETRAIN");
+ case C_AMSW_SHOWTIME_L0: return N_("SHOWTIME_L0");
+ case C_AMSW_SHOWTIME_LQ: return N_("SHOWTIME_LQ");
+ case C_AMSW_SHOWTIME_L1: return N_("SHOWTIME_L1");
+ case C_AMSW_EXCHANGE: return N_("EXCHANGE");
+ case C_AMSW_TRUNCATE: return N_("TRUNCATE");
+ case C_AMSW_ESCAPE: return N_("ESCAPE");
+ case C_AMSW_RETRY: return N_("RETRY");
+ case C_AMSW_DISORDERLY: return N_("DISORDERLY");
+ default: return N_(" ");
+ }
+}
+
+const char *modem_event_string(AMSW_ModemEvent event)
+{
+ switch(event) {
+ case C_AMSW_PEER_ATU_FOUND: return N_("Peer ATU Found");
+ case C_AMSW_RESTART_REQUEST: return N_("Restart Request");
+ case C_AMSW_ACTIVATION_REQUEST: return N_("Activation Request");
+ case C_AMSW_TO_INITIALIZING: return N_("Initializing");
+ case C_AMSW_SHOWTIME: return N_("Showtime");
+ case C_AMSW_L3_EXECUTED: return N_("L3 Executed");
+ case C_AMSW_L3_REJECTED: return N_("L3 Rejected");
+ case C_AMSW_L1_EXECUTED: return N_("L1 Executed");
+ case C_AMSW_L1_REJECTED: return N_("L1 Rejected");
+ case C_AMSW_L0_REJECTED: return N_("L0 Rejected");
+ case C_AMSW_RESTART_ACCEPTABLE: return N_("Restart Acceptable");
+ case C_AMSW_SUICIDE_REQUEST: return N_("Suicide Request");
+ case C_AMSW_RESTART_NOT_ACCEPTABLE: return N_("Restart Not Acceptable");
+ default: return N_(" ");
+ }
+}
+
+const char *modem_failure_string(AMSW_ModemFailure failure)
+{
+ switch(failure) {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS: return N_("Uncompatible Line Conditions");
+ case C_AMSW_NO_LOCK_POSSIBLE: return N_("No Lock Possible");
+ case C_AMSW_PROTOCOL_ERROR: return N_("Protocol Error");
+ case C_AMSW_MESSAGE_ERROR: return N_("Message Error");
+ case C_AMSW_SPURIOUS_ATU_DETECTED: return N_("Spurious ATU Detected");
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE: return N_("Requested Bit Rate Too High");
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE: return N_("Interleaved Profile Required for LITE");
+ case C_AMSW_FORCED_SILENCE: return N_("Forced Silence");
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE: return N_("Unselectable Operation Mode");
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN: return N_("State Refused By Golden");
+ case C_AMSW_AMU_EVENT_ACT_TIMEOUT: return N_("Activation Timeout");
+ case C_AMSW_AMU_EVENT_INI_TIMEOUT: return N_("Initialization Timeout");
+ case C_AMSW_AMU_EVENT_SHUTDOWN: return N_("Bringing Down Line due to persistent faults");
+ case C_AMSW_EVENT_RETRY: return N_("Retry");
+ case C_AMSW_UNKNOWN: return N_("Unknown");
+ case C_AMSW_UNKNOWN_FAILURE: return N_("Unknown failure");
+ case C_AMSW_NO_HARDWARE: return N_("No hardware detected");
+ case C_AMSW_NO_USB_BANDWIDTH: return N_("USB bandwidth unavailable");
+ default: return N_(" ");
+ }
+}
+
+const char *modulation_string(unsigned long operationalMode)
+{
+ switch(operationalMode) {
+ case AMSW_ANSI: return N_("ANSI");
+ case AMSW_G_LITE: return N_("G.lite");
+ case AMSW_G_DMT: return N_("G.dmt");
+ default: return N_(" ");
+ }
+}
+
+static void read_adsl_config(const char *filename)
+{
+ FILE *file;
+ char line[64];
+
+ file = fopen(filename,"r");
+ if (!file) return;
+
+ while (fgets(line,sizeof(line),file)) {
+ if (line[0] == '#') {
+ } else if (sscanf(line,"MODULATION=%d",&AdslConfig.modulation)) {
+ } else if (sscanf(line,"VPI=%d",&AdslConfig.vci)) {
+ } else if (sscanf(line,"VCI=%d",&AdslConfig.vpi)) {
+ } else if (sscanf(line,"PROTOCOL=%s",AdslConfig.protocol)) {
+ } else if (sscanf(line,"ENCAPS=%s",AdslConfig.encaps)) {
+ } else {
+ }
+ }
+ fclose(file);
+}
+
+int msw_ctrl(T_MswCtrl *ctrl)
+{
+ ADSL_DEVICE *device = &g_device;
+
+ ctrl->retcode = 0;
+ if (device->type == ATM_DRIVER) {
+ device->req.atm.arg = ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ } else if (device->type == ETH_DRIVER) {
+ device->req.eth.ifr_data = (char *)ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ }
+ return -1;
+}
+
+int open_device(ADSL_DEVICE *device)
+{
+ unsigned long state=0L;
+ T_MswCtrl ctrl ={MSW_CTL_GET_STATE,0,0,&state,sizeof(state)};
+ int sd;
+
+ // try first ATM socket
+ sd = socket(PF_ATMPVC,SOCK_DGRAM,0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ATM_DRIVER;
+ device->req.atm.number = 0;
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC socket opened,itf=%d\n",device->req.atm.number);
+#endif
+ device->req.atm.arg = &ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC msw_ctrl failed\n");
+ close (sd);
+#endif
+ }
+ }
+
+ // try Ethernet socket
+ sd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ETH_DRIVER;
+ strcpy(device->req.eth.ifr_name,UNICORN_ETH_NAME);
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET socket opened,itf=%s\n",device->req.eth.ifr_name);
+#endif
+ device->req.eth.ifr_data = (char *)&ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET msw_ctrl failed\n");
+ close (sd);
+#endif
+ }
+ }
+ return errno;
+}
+
+void close_device(ADSL_DEVICE *device)
+{
+ close(device->sd);
+ device->sd = -1;
+ device->type = 0;
+}
+
+static void get_state_info(T_StateInfo *info)
+{
+ T_MswCtrl ctrl;
+
+ info->State = 0;
+ info->Report = -1;
+ info->Failure = C_AMSW_NO_HARDWARE;
+ info->TimeCnctd = 0L;
+
+ ctrl.code = MSW_CTL_STATE_INFO;
+ ctrl.subcode = 0;
+ ctrl.retcode = 0;
+ ctrl.buffer = info;
+ ctrl.length = sizeof(T_StateInfo);
+
+ msw_ctrl(&ctrl);
+}
+
+void get_bit_rates(unsigned short *bit_rates)
+{
+ int i;
+
+ for (i=0; i < 4; i++) {
+ T_AMSW_NT_ChannelOperData cod;
+ T_MswCtrl ctrl =
+ {MSW_CTL_GET_DATA,C_AMSW_NEAR_END_CHANNEL_DATA_FAST+i,
+ 0,&cod,sizeof(T_AMSW_NT_ChannelOperData)};
+ bit_rates[i] = 0;
+ msw_ctrl(&ctrl);
+ if (ctrl.retcode == 0) {
+ bit_rates[i] = cod.actualBitrate;
+ } else {
+ bit_rates[i] = 0;
+ }
+ }
+}
+
+void get_near_end_line_oper_data( T_AMSW_NT_NearEndLineOperData *nelod )
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_NEAR_END_LINE_DATA,0,
+ nelod,sizeof(T_AMSW_NT_NearEndLineOperData)};
+ memset(nelod,0,sizeof(T_AMSW_NT_NearEndLineOperData));
+ msw_ctrl(&ctrl);
+}
+
+void get_far_end_line_oper_data( T_AMSW_NT_FarEndLineOperData *felod )
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_FAR_END_LINE_DATA,0,
+ felod,sizeof(T_AMSW_NT_FarEndLineOperData)};
+ memset(felod,0,sizeof(T_AMSW_NT_FarEndLineOperData));
+ msw_ctrl(&ctrl);
+}
+
+static void get_power_tables(float table[CURVES][MAXVAL])
+{
+ T_AMSW_TeqX teq;
+ int i;
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_TEQ,0,
+ &teq,sizeof(T_AMSW_TeqX)};
+
+ int mScaling = 1;
+
+
+ memset(&teq,0,sizeof(T_AMSW_TeqX));
+
+ msw_ctrl(&ctrl);
+
+ for (i=0; i < MAXVAL; i++) {
+ // Echo + Noise
+ float x = teq.Teq_noise_table[i]/mScaling + 0.000001;
+ table[0][i] = 10*log10(x);
+
+ // Receive Path
+ x = teq.hf[2*i]*teq.hf[2*i]/mScaling/mScaling +
+ teq.hf[2*i+1]*teq.hf[2*i+1]/mScaling/mScaling +
+ 0.000001;
+ table[1][i] = 20*log10(sqrt(x));
+
+ // SNR
+ if (i < 32) table[2][i] = 0;
+ else table[2][i] = table[1][i] - table[0][i];
+ }
+}
+
+static void get_counters( T_AMSW_def_counter_set *dcs )
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_PM_DATA,0,dcs,sizeof(T_AMSW_def_counter_set)};
+ memset(dcs,0,sizeof(T_AMSW_def_counters));
+ msw_ctrl(&ctrl);
+}
+
+static void get_oam_stats( T_oam_stats *oam_stats )
+{
+ T_MswCtrl ctrl = {NET_CTL_GET_OAM_STATS,0,0,oam_stats,sizeof(T_oam_stats)};
+ memset(oam_stats,0,sizeof(T_oam_stats));
+ msw_ctrl(&ctrl);
+}
+
+static void get_bitmaps( T_AMSW_def_bitmap_set *dbs )
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_FM_DATA,0,dbs,sizeof(T_AMSW_def_bitmap_set)};
+ memset(dbs,0,sizeof(T_AMSW_def_bitmap_set));
+ msw_ctrl(&ctrl);
+}
+
+static void get_ident( T_AMSW_Identification *ident )
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_FAR_END_IDENTIFICATION,0,
+ ident,sizeof(T_AMSW_Identification)};
+ memset(ident,0xFF,sizeof(T_AMSW_Identification));
+ msw_ctrl(&ctrl);
+}
+
+static void get_version(T_AMSW_VersionMS *version)
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_VERSIONMS,0,version,sizeof(T_AMSW_VersionMS)};
+
+ memset(&version,0,sizeof(version));
+ msw_ctrl(&ctrl);
+}
+
+static void get_driver_version(unsigned long *version)
+{
+ T_MswCtrl ctrl = {MSW_CTL_VERSION_INFO,0,0,version,sizeof(unsigned long)};
+ *version = 0;
+ msw_ctrl(&ctrl);
+}
+
+static void state_showtime(GtkWidget *main_window)
+{
+ unsigned short bit_rates[4];
+ T_AMSW_NT_NearEndLineOperData nelod;
+ T_AMSW_NT_FarEndLineOperData felod;
+ T_AMSW_Identification ident;
+
+ /* status panel */
+ get_bit_rates(bit_rates);
+
+ label_set_number(main_window,"NearEndFastChannelText",bit_rates[0]);
+ label_set_number(main_window,"FarEndFastChannelText",bit_rates[1]);
+ label_set_number(main_window,"NearEndInterleavedChannelText",bit_rates[2]);
+ label_set_number(main_window,"FarEndInterleavedChannelText",bit_rates[3]);
+
+ /* line panel */
+ get_near_end_line_oper_data(&nelod);
+ get_far_end_line_oper_data(&felod);
+
+ label_set_text(main_window,"ModulationText",modulation_string(nelod.operationalMode));
+ label_set_number(main_window,"DsCapacityOccupationText",nelod.relCapacityOccupationDnstr);
+ label_set_float(main_window,"DsNoiseMarginText",(float)nelod.noiseMarginDnstr/2.0);
+ label_set_float(main_window,"DsAttenuationText",(float)nelod.attenuationDnstr/2.0);
+ label_set_float(main_window,"DsOutputPowerText",(float)felod.outputPowerDnstr/2.0);
+ label_set_number(main_window,"UsCapacityOccupationText",felod.relCapacityOccupationUpstr);
+ label_set_float(main_window,"UsNoiseMarginText",(float)felod.noiseMarginUpstr/2.0);
+ label_set_float(main_window,"UsAttenuationText",(float)felod.attenuationUpstr/2.0);
+ label_set_float(main_window,"UsOutputPowerText",(float)nelod.outputPowerUpstr/2.0);
+
+ mCurves = CURVES;
+ get_power_tables(mCurve);
+
+ /* Test panel */
+ if (g_device.type == ATM_DRIVER) {
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"GenerateLBcellsButton"),TRUE);
+ }
+ /* info panel */
+ get_ident(&ident);
+
+ if (nelod.operationalMode == AMSW_ANSI) {
+ label_set_number(main_window,"VendorCodeText",ident.ANSI_ETSI_VendorId);
+ label_set_number(main_window,"ITURevisionNumberText",ident.ANSI_ETSI_StandardRevisionNbr);
+ label_set_number(main_window,"VendorSpecificInfoText",ident.ANSI_ETSI_VendorRevisionNbr);
+ } else {
+ // G.dmt or G.lite
+ char str[8];
+ g_snprintf(str,8,"%c%c%c%c",
+ (int)ident.ITU_VendorId.vendorCode>>24,
+ (int)ident.ITU_VendorId.vendorCode>>16&255,
+ (int)ident.ITU_VendorId.vendorCode>>8&255,
+ (int)ident.ITU_VendorId.vendorCode&255);
+ label_set_text(main_window,"VendorCodeText",str);
+ label_set_number(main_window,"VendorCountryCodeText",ident.ITU_VendorId.countryCode);
+ label_set_number(main_window,"ITURevisionNumberText",ident.ITU_StandardRevisionNbr);
+ label_set_number(main_window,"VendorSpecificInfoText",ident.ITU_VendorId.vendorSpecific);
+ }
+}
+
+static void state_idle(GtkWidget *main_window)
+{
+ T_AMSW_VersionMS version;
+
+ /* Status panel */
+ label_set_text(main_window,"ModemStateText",modem_state_string(last_info.State));
+ //label_set_text(main_window,"RemoteReportText",modem_event_string(last_info.Report));
+ //label_set_text(main_window,"LastFailureText",modem_failure_string(last_info.Failure));
+ label_set_text(main_window,"TimeConnectedText","--:--:--");
+
+ label_set_number(main_window,"NearEndFastChannelText",0);
+ label_set_number(main_window,"FarEndFastChannelText",0);
+ label_set_number(main_window,"NearEndInterleavedChannelText",0);
+ label_set_number(main_window,"FarEndInterleavedChannelText",0);
+
+ /* Errors panel */
+ label_set_number(main_window,"LocFastFECText", 0);
+ label_set_number(main_window,"LocFastCRCText", 0);
+ label_set_number(main_window,"LocFastHECText", 0);
+ label_set_number(main_window,"DisFastFECText", 0);
+ label_set_number(main_window,"DisFastCRCText", 0);
+ label_set_number(main_window,"DisFastHECText", 0);
+ label_set_number(main_window,"LocItlvFECText", 0);
+ label_set_number(main_window,"LocItlvCRCText", 0);
+ label_set_number(main_window,"LocItlvHECText", 0);
+ label_set_number(main_window,"DisItlvFECText", 0);
+ label_set_number(main_window,"DisItlvCRCText", 0);
+ label_set_number(main_window,"DisItlvHECText", 0);
+
+ /* Defects panel */
+
+ // Near End
+ // LoM
+ hide_widget(main_window,"NearLoMRedLed");
+ show_widget(main_window,"NearLoMLed");
+ // LoP
+ hide_widget(main_window,"NearLoPRedLed");
+ show_widget(main_window,"NearLoPLed");
+ // LoS
+ hide_widget(main_window,"NearLoSRedLed");
+ show_widget(main_window,"NearLoSLed");
+ // LoF
+ hide_widget(main_window,"NearLoFRedLed");
+ show_widget(main_window,"NearLoFLed");
+ // LoCD
+ hide_widget(main_window,"NearLoCDRedLed");
+ show_widget(main_window,"NearLoCDLed");
+
+ // Far End
+ // LoM
+ hide_widget(main_window,"FarLoMRedLed");
+ show_widget(main_window,"FarLoMLed");
+ // LoP
+ hide_widget(main_window,"FarLoPRedLed");
+ show_widget(main_window,"FarLoPLed");
+ // LoS
+ hide_widget(main_window,"FarLoSRedLed");
+ show_widget(main_window,"FarLoSLed");
+ // LoF
+ hide_widget(main_window,"FarLoFRedLed");
+ show_widget(main_window,"FarLoFLed");
+ // LoCD
+ hide_widget(main_window,"FarLoCDRedLed");
+ show_widget(main_window,"FarLoCDLed");
+ // Dying Gasp
+ hide_widget(main_window,"DyingGaspRedLed");
+ show_widget(main_window,"DyingGaspLed");
+
+
+ /* Test Panel */
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"GenerateLBcellsButton"),FALSE);
+
+ label_set_number(main_window,"CCText",last_oam_counters.rx_CC);
+ label_set_number(main_window,"RDIText",last_oam_counters.rx_RDI);
+ label_set_number(main_window,"AISText",last_oam_counters.rx_AIS);
+ label_set_number(main_window,"FeLBText",last_oam_counters.rx_fe_LB);
+ label_set_number(main_window,"NeLBText",last_oam_counters.rx_ne_LB);
+
+ /* Config Panel */
+ read_adsl_config("/etc/sysconfig/adsl-config");
+ label_set_text(main_window,"ConfigModulationText",modulation_string(AdslConfig.modulation));
+ label_set_number(main_window,"ConfigVpiText",AdslConfig.vpi);
+ label_set_number(main_window,"ConfigVciText",AdslConfig.vci);
+ label_set_text(main_window,"ConfigProtocolText",AdslConfig.protocol);
+ label_set_text(main_window,"ConfigEncapsText",AdslConfig.encaps);
+
+
+ /* info panel */
+ label_set_text(main_window,"PackageNameText","BeWAN ADSL");
+ {
+ unsigned long driver_version;
+ char str[8];
+ get_driver_version(&driver_version);
+ g_snprintf(str,8,"%ld.%ld.%ld",
+ (driver_version>>8)&0xf,(driver_version>>4)&0xf,driver_version&0xf);
+ label_set_text(main_window,"PackageVersionText",str);
+ }
+ {
+ get_version(&version);
+ version.versionA[sizeof(version.versionA)-1] = 0;
+ label_set_text(main_window,"FirmwareVersionText",version.versionA);
+ }
+
+ label_set_text(main_window,"ManufacturerText","BeWAN systems");
+ label_set_text(main_window,"CopyrightText","BeWAN systems 2004");
+}
+
+
+static void update_panels(GtkWidget *main_window)
+{
+ T_StateInfo info;
+ T_AMSW_def_counter_set dcs;
+ T_AMSW_def_bitmap_set dbs;
+ T_oam_stats oam_counters;
+
+ /* Status panel */
+ get_state_info(&info);
+ if (info.State != last_info.State) {
+ gtk_label_set_text(GTK_LABEL(lookup_widget(GTK_WIDGET(main_window),
+ "ModemStateText")),
+ modem_state_string(info.State));
+ last_info.State = info.State;
+ if (info.State == C_AMSW_IDLE) {
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"StartButton"),TRUE);
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"StopButton"),FALSE);
+ } else {
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"StartButton"),FALSE);
+ gtk_widget_set_sensitive(lookup_widget(GTK_WIDGET(main_window),"StopButton"),TRUE);
+ }
+ if (info.State == C_AMSW_SHOWTIME_L0) {
+ state_showtime(main_window);
+ } else {
+ state_idle(main_window);
+ }
+ }
+ if (info.Report != last_info.Report) {
+ label_set_text(main_window,"RemoteReportText",modem_event_string(info.Report));
+ last_info.Report = info.Report;
+ }
+ if (info.Failure != last_info.Failure) {
+ label_set_text(main_window,"LastFailureText",modem_failure_string(info.Failure));
+ last_info.Failure = info.Failure;
+ }
+ if (info.TimeCnctd != last_info.TimeCnctd) {
+ if (info.TimeCnctd == 0L) {
+ label_set_text(main_window,"TimeConnectedText","--:--:--");
+ } else {
+ unsigned long t = info.TimeCnctd/1000UL;
+ if (t != last_info.TimeCnctd/1000UL) {
+ char time_str[16];
+ unsigned long h = t/3600;
+ unsigned long s = t%3600;
+ unsigned long m = s/60;
+ s = s%60;
+ g_snprintf(time_str,16,"%2.2ld:%2.2ld:%2.2ld",h,m,s);
+ label_set_text(main_window,"TimeConnectedText",time_str);
+ }
+ }
+ last_info.TimeCnctd = info.TimeCnctd;
+ }
+
+ /* Errors panel */
+ if (info.State == C_AMSW_SHOWTIME_L0) {
+ get_counters(&dcs);
+ } else {
+ memset(&dcs,0,sizeof(dcs));
+ }
+ if (last_dcs.near_end.FecNotInterleaved != dcs.near_end.FecNotInterleaved) {
+ label_set_number(main_window,"LocFastFECText", dcs.near_end.FecNotInterleaved);
+ last_dcs.near_end.FecNotInterleaved = dcs.near_end.FecNotInterleaved;
+ }
+ if (last_dcs.near_end.CrcNotInterleaved != dcs.near_end.CrcNotInterleaved) {
+ label_set_number(main_window,"LocFastCRCText", dcs.near_end.CrcNotInterleaved);
+ last_dcs.near_end.CrcNotInterleaved = dcs.near_end.CrcNotInterleaved;
+ }
+ if (last_dcs.near_end.HecNotInterleaved != dcs.near_end.HecNotInterleaved) {
+ label_set_number(main_window,"LocFastHECText", dcs.near_end.HecNotInterleaved);
+ last_dcs.near_end.HecNotInterleaved = dcs.near_end.HecNotInterleaved;
+ }
+ if (last_dcs.far_end.FecNotInterleaved != dcs.far_end.FecNotInterleaved) {
+ label_set_number(main_window,"DisFastFECText", dcs.far_end.FecNotInterleaved);
+ last_dcs.far_end.FecNotInterleaved = dcs.far_end.FecNotInterleaved;
+ }
+ if (last_dcs.far_end.CrcNotInterleaved != dcs.far_end.CrcNotInterleaved) {
+ label_set_number(main_window,"DisFastCRCText", dcs.far_end.CrcNotInterleaved);
+ last_dcs.far_end.CrcNotInterleaved = dcs.far_end.CrcNotInterleaved;
+ }
+ if (last_dcs.far_end.HecNotInterleaved != dcs.far_end.HecNotInterleaved) {
+ label_set_number(main_window,"DisFastHECText", dcs.far_end.HecNotInterleaved);
+ last_dcs.far_end.HecNotInterleaved = dcs.far_end.HecNotInterleaved;
+ }
+ if (last_dcs.near_end.FecInterleaved != dcs.near_end.FecInterleaved) {
+ label_set_number(main_window,"LocItlvFECText", dcs.near_end.FecInterleaved);
+ last_dcs.near_end.FecInterleaved = dcs.near_end.FecInterleaved;
+ }
+ if (last_dcs.near_end.CrcInterleaved != dcs.near_end.CrcInterleaved) {
+ label_set_number(main_window,"LocItlvCRCText", dcs.near_end.CrcInterleaved);
+ last_dcs.near_end.CrcInterleaved = dcs.near_end.CrcInterleaved;
+ }
+ if (last_dcs.near_end.HecInterleaved != dcs.near_end.HecInterleaved) {
+ label_set_number(main_window,"LocItlvHECText", dcs.near_end.HecInterleaved);
+ last_dcs.near_end.HecInterleaved = dcs.near_end.HecInterleaved;
+ }
+ if (last_dcs.far_end.FecInterleaved != dcs.far_end.FecInterleaved) {
+ label_set_number(main_window,"DisItlvFECText", dcs.near_end.FecInterleaved);
+ last_dcs.far_end.FecInterleaved = dcs.far_end.FecInterleaved;
+ }
+ if (last_dcs.far_end.CrcInterleaved != dcs.far_end.CrcInterleaved) {
+ label_set_number(main_window,"DisItlvCRCText", dcs.near_end.CrcInterleaved);
+ last_dcs.far_end.CrcInterleaved = dcs.far_end.CrcInterleaved;
+ }
+ if (last_dcs.far_end.HecInterleaved != dcs.far_end.HecInterleaved) {
+ label_set_number(main_window,"DisItlvHECText", dcs.near_end.HecInterleaved);
+ last_dcs.far_end.HecInterleaved = dcs.far_end.HecInterleaved;
+ }
+
+ /* Defects panel */
+ get_bitmaps( &dbs );
+
+ if (dbs.near_end.status != last_dbs.near_end.status) {
+ // LoM
+ if (dbs.near_end.status & LOM) {
+ hide_widget(main_window,"NearLoMLed");
+ show_widget(main_window,"NearLoMRedLed");
+ } else {
+ hide_widget(main_window,"NearLoMRedLed");
+ show_widget(main_window,"NearLoMLed");
+ }
+ // LoP
+ if (dbs.near_end.status & 0x20) {
+ hide_widget(main_window,"NearLoPLed");
+ show_widget(main_window,"NearLoPRedLed");
+ } else {
+ hide_widget(main_window,"NearLoPRedLed");
+ show_widget(main_window,"NearLoPLed");
+ }
+ // LoS
+ if (dbs.near_end.status & LOS) {
+ hide_widget(main_window,"NearLoSLed");
+ show_widget(main_window,"NearLoSRedLed");
+ } else {
+ hide_widget(main_window,"NearLoSRedLed");
+ show_widget(main_window,"NearLoSLed");
+ }
+ // LoF
+ if (dbs.near_end.status & LOF) {
+ hide_widget(main_window,"NearLoFLed");
+ show_widget(main_window,"NearLoFRedLed");
+ } else {
+ hide_widget(main_window,"NearLoFRedLed");
+ show_widget(main_window,"NearLoFLed");
+ }
+ // LoCD
+ if (dbs.near_end.status & (LCDI | LCDNI)) {
+ hide_widget(main_window,"NearLoCDLed");
+ show_widget(main_window,"NearLoCDRedLed");
+ } else {
+ hide_widget(main_window,"NearLoCDRedLed");
+ show_widget(main_window,"NearLoCDLed");
+ }
+
+ last_dbs.near_end.status = dbs.near_end.status;
+ }
+
+ // Far End
+ if (dbs.far_end.status != last_dbs.far_end.status) {
+ // LoM
+ if (dbs.far_end.status & LOM) {
+ hide_widget(main_window,"FarLoMLed");
+ show_widget(main_window,"FarLoMRedLed");
+ } else {
+ hide_widget(main_window,"FarLoMRedLed");
+ show_widget(main_window,"FarLoMLed");
+ }
+ // LoP
+ if (dbs.far_end.status & 0x20) {
+ hide_widget(main_window,"FarLoPLed");
+ show_widget(main_window,"FarLoPRedLed");
+ } else {
+ hide_widget(main_window,"FarLoPRedLed");
+ show_widget(main_window,"FarLoPLed");
+ }
+ // LoS
+ if (dbs.far_end.status & LOS) {
+ hide_widget(main_window,"FarLoSLed");
+ show_widget(main_window,"FarLoSRedLed");
+ } else {
+ hide_widget(main_window,"FarLoSRedLed");
+ show_widget(main_window,"FarLoSLed");
+ }
+ // LoF
+ if (dbs.far_end.status & LOF) {
+ hide_widget(main_window,"FarLoFLed");
+ show_widget(main_window,"FarLoFRedLed");
+ } else {
+ hide_widget(main_window,"FarLoFRedLed");
+ show_widget(main_window,"FarLoFLed");
+ }
+ // LoCD
+ if (dbs.far_end.status & (LCDI | LCDNI)) {
+ hide_widget(main_window,"FarLoCDLed");
+ show_widget(main_window,"FarLoCDRedLed");
+ } else {
+ hide_widget(main_window,"FarLoCDRedLed");
+ show_widget(main_window,"FarLoCDLed");
+ }
+ // Dying Gasp
+ if (dbs.far_end.status & 0x100) {
+ hide_widget(main_window,"DyingGaspLed");
+ show_widget(main_window,"DyingGaspRedLed");
+ } else {
+ hide_widget(main_window,"DyingGaspRedLed");
+ show_widget(main_window,"DyingGaspLed");
+ }
+
+ last_dbs.far_end.status = dbs.far_end.status;
+ }
+
+ /* Test Panel */
+ if (info.State == C_AMSW_SHOWTIME_L0) {
+ get_oam_stats(&oam_counters);
+ }
+ if (oam_counters.rx_CC != last_oam_counters.rx_CC) {
+ label_set_number(main_window,"CCText",oam_counters.rx_CC);
+ last_oam_counters.rx_CC = oam_counters.rx_CC;
+ }
+ if (oam_counters.rx_RDI != last_oam_counters.rx_RDI) {
+ label_set_number(main_window,"RDIText",oam_counters.rx_RDI);
+ last_oam_counters.rx_RDI = oam_counters.rx_RDI;
+ }
+ if (oam_counters.rx_AIS != last_oam_counters.rx_AIS) {
+ label_set_number(main_window,"AISText",oam_counters.rx_AIS);
+ last_oam_counters.rx_AIS = oam_counters.rx_AIS;
+ }
+ if (oam_counters.rx_fe_LB != last_oam_counters.rx_fe_LB) {
+ label_set_number(main_window,"FeLBText",oam_counters.rx_fe_LB);
+ last_oam_counters.rx_fe_LB = oam_counters.rx_fe_LB;
+ }
+ if (oam_counters.rx_ne_LB != last_oam_counters.rx_ne_LB) {
+ label_set_number(main_window,"NeLBText",oam_counters.rx_ne_LB);
+ last_oam_counters.rx_ne_LB = oam_counters.rx_ne_LB;
+ }
+}
+
+
+/*
+ PowerChart
+*/
+void create_chart(GtkWidget *drawing_area)
+{
+ float mXmin; // Minimum X Value
+ float mXmax; // Maximum X value
+ float mYmin; // Minimum Y value
+ float mYmax; // Maximum Y value
+ float yscale;
+ int n;
+
+ mXmin = 0;
+ mXmax = 1104; // kHz
+ mYmin = 10;
+ mYmax = 90; // dBm
+
+ if (pixmap)
+ gdk_pixmap_unref(pixmap);
+ pixmap = gdk_pixmap_new(drawing_area->window,
+ drawing_area->allocation.width,
+ drawing_area->allocation.height,
+ -1);
+
+ gdk_draw_rectangle (pixmap,
+ drawing_area->style->black_gc,
+ TRUE,
+ 0, 0,
+ drawing_area->allocation.width,
+ drawing_area->allocation.height);
+
+ if (mCurves == 0) return;
+
+ yscale = mYmax - mYmin;
+ for (n=0; n < mCurves; n++) {
+ int i;
+ int x,y;
+ int last_x=0,last_y=0;
+ set_color(drawing_area,&chart_colors[n]);
+ for (i=0; i < MAXVAL; i++) {
+ x = i*drawing_area->allocation.width/MAXVAL;
+ y = drawing_area->allocation.height -
+ ((mCurve[n][i]-mYmin)*drawing_area->allocation.height/yscale);
+ if (y >= drawing_area->allocation.height) y = drawing_area->allocation.height;
+ if (i==0) {
+ gdk_draw_point(pixmap,
+ drawing_area->style->fg_gc[GTK_STATE_NORMAL],
+ x,y);
+ } else {
+ gdk_draw_line(pixmap,
+ drawing_area->style->fg_gc[GTK_STATE_NORMAL],
+ last_x,last_y,
+ x,y);
+ }
+ last_x=x;
+ last_y=y;
+ }
+ }
+}
+
+void draw_chart(GtkWidget *drawing_area,GdkEventExpose *event)
+{
+ gdk_draw_pixmap(drawing_area->window,
+ drawing_area->style->fg_gc[GTK_WIDGET_STATE (drawing_area)],
+ pixmap,
+ event->area.x, event->area.y,
+ event->area.x, event->area.y,
+ event->area.width, event->area.height);
+}
+
+
+void create_RxPathLabel(GtkWidget *label)
+{
+ set_color(label,&chart_colors[1]);
+}
+
+extern void create_SNRLabel(GtkWidget *label)
+{
+ set_color(label,&chart_colors[2]);
+}
+
+extern void create_EchoNoiseLabel(GtkWidget *label)
+{
+ set_color(label,&chart_colors[0]);
+}
+
+
+extern int start_msw()
+{
+ T_MswCtrl ctrl = {MSW_CTL_START,0,0,NULL,0};
+ return msw_ctrl(&ctrl);
+}
+
+extern void stop_msw()
+{
+ T_MswCtrl ctrl = {MSW_CTL_STOP,0,0,NULL,0};
+ msw_ctrl(&ctrl);
+}
+
+extern int start_send_oam_lb(void)
+{
+ g_vpi = label_get_number(g_main_window,"VPIEntry");
+ g_vci = label_get_number(g_main_window,"VCIEntry");
+ g_send_oam = 1;
+ return 0;
+}
+
+extern void stop_send_oam_lb(void)
+{
+ g_send_oam = 0;
+}
+
+extern void oam_reset_counters(void)
+{
+ T_MswCtrl ctrl = {NET_CTL_RESET_OAM_STATS,0,0,0,0};
+ msw_ctrl(&ctrl);
+}
+
+extern void status_exit(void)
+{
+ close_device(&g_device);
+}
+
+gint periodic_callback(gpointer data)
+{
+ static int counter=0;
+ GtkWidget *main_window = (GtkWidget *)data;
+
+ update_panels(main_window);
+ if ((counter % 10) == 0) {
+ // 1 second
+ if (g_send_oam) {
+ T_MswCtrl ctrl;
+ T_atm_channel tx_oam;
+
+ if ( g_vpi==0) {
+ tx_oam.type = ATM_OAM_F4;
+ } else {
+ tx_oam.type = ATM_OAM_F5;
+ }
+ tx_oam.vpi = g_vpi;
+ tx_oam.vci = g_vci;
+ ctrl.code = NET_CTL_TX_OAM_CELL;
+ ctrl.subcode = 0;
+ ctrl.buffer = &tx_oam;
+ ctrl.length = sizeof(tx_oam);
+
+ msw_ctrl(&ctrl);
+ }
+
+ }
+ counter++;
+ return TRUE;
+}
+
+int status_init(GtkWidget *main_window)
+{
+ GtkWidget *label;
+
+ g_main_window = main_window;
+
+ if (open_device(&g_device) < 0) {
+ label = lookup_widget(GTK_WIDGET(main_window),"LastFailureText");
+ gtk_label_set_text(GTK_LABEL(label),_("No hardware detected"));
+ return -errno;
+ }
+
+ state_idle(main_window);
+
+ periodic_callback(main_window);
+ gtk_timeout_add(100,periodic_callback,main_window);
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/status.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,12 @@
+extern void create_chart(GtkWidget *drawing_area);
+extern void draw_chart(GtkWidget *drawing_area,GdkEventExpose *event);
+extern void create_RxPathLabel(GtkWidget *label);
+extern void create_SNRLabel(GtkWidget *label);
+extern void create_EchoNoiseLabel(GtkWidget *label);
+extern int status_init(GtkWidget *main_window);
+extern void status_exit(void);
+extern int start_msw(void);
+extern void stop_msw(void);
+extern int start_send_oam_lb(void);
+extern void stop_send_oam_lb(void);
+extern void oam_reset_counters(void);
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,162 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <gtk/gtk.h>
+
+#include "support.h"
+
+/* This is an internally used function to check if a pixmap file exists. */
+static gchar* check_file_exists (const gchar *directory,
+ const gchar *filename);
+
+/* This is an internally used function to create pixmaps. */
+static GtkWidget* create_dummy_pixmap (GtkWidget *widget);
+
+GtkWidget*
+lookup_widget (GtkWidget *widget,
+ const gchar *widget_name)
+{
+ GtkWidget *parent, *found_widget;
+
+ for (;;)
+ {
+ if (GTK_IS_MENU (widget))
+ parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+ else
+ parent = widget->parent;
+ if (parent == NULL)
+ break;
+ widget = parent;
+ }
+
+ found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
+ widget_name);
+ if (!found_widget)
+ g_warning ("Widget not found: %s", widget_name);
+ return found_widget;
+}
+
+/* This is a dummy pixmap we use when a pixmap can't be found. */
+static char *dummy_pixmap_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"1 1 1 1",
+" c None",
+/* pixels */
+" "
+};
+
+/* This is an internally used function to create pixmaps. */
+static GtkWidget*
+create_dummy_pixmap (GtkWidget *widget)
+{
+ GdkColormap *colormap;
+ GdkPixmap *gdkpixmap;
+ GdkBitmap *mask;
+ GtkWidget *pixmap;
+
+ colormap = gtk_widget_get_colormap (widget);
+ gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
+ NULL, dummy_pixmap_xpm);
+ if (gdkpixmap == NULL)
+ g_error ("Couldn't create replacement pixmap.");
+ pixmap = gtk_pixmap_new (gdkpixmap, mask);
+ gdk_pixmap_unref (gdkpixmap);
+ gdk_bitmap_unref (mask);
+ return pixmap;
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory (const gchar *directory)
+{
+ pixmaps_directories = g_list_prepend (pixmaps_directories,
+ g_strdup (directory));
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap (GtkWidget *widget,
+ const gchar *filename)
+{
+ gchar *found_filename = NULL;
+ GdkColormap *colormap;
+ GdkPixmap *gdkpixmap;
+ GdkBitmap *mask;
+ GtkWidget *pixmap;
+ GList *elem;
+
+ if (!filename || !filename[0])
+ return create_dummy_pixmap (widget);
+
+ /* We first try any pixmaps directories set by the application. */
+ elem = pixmaps_directories;
+ while (elem)
+ {
+ found_filename = check_file_exists ((gchar*)elem->data, filename);
+ if (found_filename)
+ break;
+ elem = elem->next;
+ }
+
+ /* If we haven't found the pixmap, try the source directory. */
+ if (!found_filename)
+ {
+ found_filename = check_file_exists ("../pixmaps", filename);
+ }
+
+ if (!found_filename)
+ {
+ g_warning (_("Couldn't find pixmap file: %s"), filename);
+ return create_dummy_pixmap (widget);
+ }
+
+ colormap = gtk_widget_get_colormap (widget);
+ gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
+ NULL, found_filename);
+ if (gdkpixmap == NULL)
+ {
+ g_warning (_("Error loading pixmap file: %s"), found_filename);
+ g_free (found_filename);
+ return create_dummy_pixmap (widget);
+ }
+ g_free (found_filename);
+ pixmap = gtk_pixmap_new (gdkpixmap, mask);
+ gdk_pixmap_unref (gdkpixmap);
+ gdk_bitmap_unref (mask);
+ return pixmap;
+}
+
+/* This is an internally used function to check if a pixmap file exists. */
+static gchar*
+check_file_exists (const gchar *directory,
+ const gchar *filename)
+{
+ gchar *full_filename;
+ struct stat s;
+ gint status;
+
+ full_filename = (gchar*) g_malloc (strlen (directory) + 1
+ + strlen (filename) + 1);
+ strcpy (full_filename, directory);
+ strcat (full_filename, G_DIR_SEPARATOR_S);
+ strcat (full_filename, filename);
+
+ status = stat (full_filename, &s);
+ if (status == 0 && S_ISREG (s.st_mode))
+ return full_filename;
+ g_free (full_filename);
+ return NULL;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/src/support.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,61 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# undef _
+# define _(String) dgettext (PACKAGE, String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# define N_(String) (String)
+# endif
+#else
+# define textdomain(String) (String)
+# define gettext(String) (String)
+# define dgettext(Domain,Message) (Message)
+# define dcgettext(Domain,Message,Type) (Message)
+# define bindtextdomain(Domain,Directory) (Domain)
+# define _(String) (String)
+# define N_(String) (String)
+#endif
+
+
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget* lookup_widget (GtkWidget *widget,
+ const gchar *widget_name);
+
+/* get_widget() is deprecated. Use lookup_widget instead. */
+#define get_widget lookup_widget
+
+/* Use this function to set the directory containing installed pixmaps. */
+void add_pixmap_directory (const gchar *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps in the interface. */
+GtkWidget* create_pixmap (GtkWidget *widget,
+ const gchar *filename);
+
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+timestamp
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h.in
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/stamp-h.in Wed Dec 27 00:14:01 2006
@@ -0,0 +1 @@
+timestamp
Added: dists/trunk/modules/unicorn/unicorn/adsl_status/strings.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/adsl_status/strings.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,91 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("BeWAN ADSL");
+gchar *s = N_("Line State");
+gchar *s = N_("Modem state:");
+gchar *s = N_("Remote report:");
+gchar *s = N_("Last failure:");
+gchar *s = N_("Time connected:");
+gchar *s = N_("Start");
+gchar *s = N_("Stop");
+gchar *s = N_("Actual bit rate (Kbps)");
+gchar *s = N_("Near End Fast Channel:");
+gchar *s = N_("Far End Fast Channel:");
+gchar *s = N_("Near End Interleaved Channel:");
+gchar *s = N_("Far End Interleaved Channel:");
+gchar *s = N_("State");
+gchar *s = N_("Operational Data");
+gchar *s = N_("Modulation:");
+gchar *s = N_("Capacity Occupation (%)");
+gchar *s = N_("Noise Margin (dB)");
+gchar *s = N_("Attenuation (dB)");
+gchar *s = N_("Output Power (dBm)");
+gchar *s = N_("DownStream");
+gchar *s = N_("UpStream");
+gchar *s = N_("Power");
+gchar *s = N_("Rx Path");
+gchar *s = N_("SNR");
+gchar *s = N_("Echo+Noise");
+gchar *s = N_("Line");
+gchar *s = N_("Fast Channel Error Counters");
+gchar *s = N_("Forward Error Corrections (FEC)");
+gchar *s = N_("Cyclic Redundancy Checks (CRC)");
+gchar *s = N_("Cyclic Header Error Check (HEC)");
+gchar *s = N_("Local");
+gchar *s = N_("Distant");
+gchar *s = N_("Interleaved Channel Error Counters");
+gchar *s = N_("Forward Error Corrections (FEC)");
+gchar *s = N_("Cyclic Redundancy Checks (CRC)");
+gchar *s = N_("Cyclic Header Error Check (HEC)");
+gchar *s = N_("Local");
+gchar *s = N_("Distant");
+gchar *s = N_("Errors");
+gchar *s = N_("Near End Defects Detected");
+gchar *s = N_("Loss of Margin (LoM)");
+gchar *s = N_("Loss of Power (LoP)");
+gchar *s = N_("Loss of Signal (LoS)");
+gchar *s = N_("Loss of Frame (LoF)");
+gchar *s = N_("Loss of Cell Delineation (LoCD)");
+gchar *s = N_("Far End Defects detected");
+gchar *s = N_("Loss of Margin (LoM)");
+gchar *s = N_("Loss of Power (LoP)");
+gchar *s = N_("Loss of Signal (LoS)");
+gchar *s = N_("Loss of Frame (LoF)");
+gchar *s = N_("Dying Gasp message received");
+gchar *s = N_("Loss of Cell Delineation (LoCD)");
+gchar *s = N_("Defects");
+gchar *s = N_("ATM maintenance indicators (OAM-F5)");
+gchar *s = N_("Generate looback cells (OAM-F5 LB cells)");
+gchar *s = N_("VPI:");
+gchar *s = N_("VCI:");
+gchar *s = N_("Reset Counters");
+gchar *s = N_("Receive counters");
+gchar *s = N_("Continuity Check cells (CC):");
+gchar *s = N_("Remote Defect Indication cells (RDI):");
+gchar *s = N_("Alarm Indication Signal cells (AIS):");
+gchar *s = N_("Far-end loopback cells (LB):");
+gchar *s = N_("Near-end loopback cells (LB):");
+gchar *s = N_("Test");
+gchar *s = N_("Installed Profile");
+gchar *s = N_("Modulation:");
+gchar *s = N_("VPI:");
+gchar *s = N_("VCI:");
+gchar *s = N_("Protocol:");
+gchar *s = N_("Encapsulation:");
+gchar *s = N_("Config");
+gchar *s = N_("ADSL Package Information");
+gchar *s = N_("Package Name:");
+gchar *s = N_("Package Version:");
+gchar *s = N_("Firmware Version:");
+gchar *s = N_("Manufacturer:");
+gchar *s = N_("Copyright:");
+gchar *s = N_("Far End Modem Identification");
+gchar *s = N_("Vendor Code:");
+gchar *s = N_("Vendor Country Code:");
+gchar *s = N_("ITU Revision Number:");
+gchar *s = N_("Vendor Specific Info:");
+gchar *s = N_("Info");
Added: dists/trunk/modules/unicorn/unicorn/amu/amas.cpp
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/amas.cpp Wed Dec 27 00:14:01 2006
@@ -0,0 +1,160 @@
+#include "types.h"
+#include "tracetool.h"
+#include "amas.h" /* AMAS API's and typedefs */
+#include "rapi.h"
+
+extern unsigned long g_ModemState, g_ShowtimeCounter;
+extern unsigned int g_WaitForShowtime, g_WaitForInit;
+extern bool L3_flag;
+
+extern T_AMSW_ANT_StaticConfiguration g_StaticCfg;
+extern T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
+extern T_AMSW_NT_FarEndLineOperData g_FarEndLineOperData;
+extern T_AMSW_def_counter_set g_def_counter_set;
+extern T_AMSW_def_bitmap_set g_def_bitmap_set;
+extern T_AMSW_def_counters g_def_counters;
+extern T_AMSW_NT_ChannelOperData g_ChannelOperData;
+extern T_AMSW_ANT_CustomerConfiguration g_CustomerCfg;
+extern T_AMSW_PowerStateConfiguration g_PowerStateCfg;
+extern T_AMSW_Teq g_Teq;
+extern T_AMSW_Ber g_Ber;
+extern T_AMSW_VersionMS g_VersionMS;
+
+// ADSL Modem Software calls this function to report any state changes
+void AMSW_ANT_reportModemStateChange(AMSW_ModemState p_ModemState)
+{
+ g_ModemState = p_ModemState;
+
+ char *s;
+ switch(p_ModemState)
+ {
+ case C_AMSW_IDLE : s = "IDLE"; break;
+ case C_AMSW_L3 : s = "L3"; break;
+ case C_AMSW_LISTENING : s = "LISTENING"; break;
+ case C_AMSW_ACTIVATING : s = "ACTIVATING"; break;
+ case C_AMSW_Ghs_HANDSHAKING : s = "Ghs_HANDSHAKING"; break;
+ case C_AMSW_ANSI_HANDSHAKING : s = "ANSI_HANDSHAKING"; break;
+ case C_AMSW_INITIALIZING : s = "INITIALIZING"; break;
+ case C_AMSW_RESTARTING : s = "RESTARTING"; break;
+ case C_AMSW_FAST_RETRAIN : s = "FAST_RETRAIN"; break;
+ case C_AMSW_SHOWTIME_L0 : s = "SHOWTIME_L0"; break;
+ case C_AMSW_SHOWTIME_LQ : s = "SHOWTIME_LQ"; break;
+ case C_AMSW_SHOWTIME_L1 : s = "SHOWTIME_L1"; break;
+ case C_AMSW_EXCHANGE : s = "EXCHANGE"; break;
+ case C_AMSW_TRUNCATE : s = "TRUNCATE"; break;
+ case C_AMSW_ESCAPE : s = "ESCAPE"; break;
+ default : s = "Unknown State"; break;
+ }
+ PRINT_ERROR("Current Modem State (%d): %s\n", g_ModemState, s);
+
+ msw_report_event(MSW_EVENT_STATE,p_ModemState);
+}
+
+// ADSL Modem Software calls this function to report events
+void AMSW_ANT_reportEvent(AMSW_ModemEvent p_Event)
+{
+ char *s;
+ switch(p_Event)
+ {
+ default : s = "UNKNOWN"; break;
+ case C_AMSW_PEER_ATU_FOUND : s = "Peer ATU Found"; break;
+ case C_AMSW_RESTART_REQUEST : s = "Restart Request"; break;
+ case C_AMSW_ACTIVATION_REQUEST : s = "Activation Request"; break;
+ case C_AMSW_L3_EXECUTED : s = "L3 Executed";
+ g_ModemState = C_AMSW_IDLE;
+ L3_flag = TRUE;
+ break;
+ case C_AMSW_L3_REJECTED : s = "L3 Rejected";
+ L3_flag = TRUE;
+ break;
+ case C_AMSW_L1_EXECUTED : s = "L1 Executed"; break;
+ case C_AMSW_L1_REJECTED : s = "L1 Rejected"; break;
+ case C_AMSW_L0_REJECTED : s = "L0 Rejected"; break;
+ case C_AMSW_RESTART_ACCEPTABLE : s = "Restart Acceptable"; break;
+ case C_AMSW_RESTART_NOT_ACCEPTABLE : s = "Restart Not Acceptable"; break;
+
+ case C_AMSW_TO_INITIALIZING : s = "Initializing";
+ g_WaitForInit = 0;
+ g_WaitForShowtime = 0;
+ break;
+
+ case C_AMSW_SHOWTIME : s = "Showtime";
+ g_WaitForShowtime = 0;
+ g_ShowtimeCounter = 0;
+ break;
+
+ case C_AMSW_SUICIDE_REQUEST : s = "Suicide Request";
+ // orderly shutdown request from peer ATU
+ g_ModemState = C_AMSW_DISORDERLY;
+ break;
+
+ }
+ PRINT_ERROR("Event Reported (%d): %s\n", (int)p_Event, s);
+
+ msw_report_event(MSW_EVENT_REPORT,p_Event);
+}
+
+// ADSL Modem Software calls this function to report the reason for failure
+void AMSW_ANT_reportModemFailure(AMSW_ModemFailure p_FailureCause)
+{
+ char *s;
+ switch(p_FailureCause)
+ {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS :
+ s = "Uncompatible Line Conditions";
+ break;
+
+ case C_AMSW_NO_LOCK_POSSIBLE :
+ s = "No Lock Possible";
+ break;
+
+ case C_AMSW_PROTOCOL_ERROR :
+ s = "Protocol Error";
+ break;
+
+ case C_AMSW_MESSAGE_ERROR :
+ s = "Message Error";
+ break;
+
+ case C_AMSW_SPURIOUS_ATU_DETECTED :
+ s = "Spurious ATU Detected";
+ break;
+
+ case C_AMSW_FORCED_SILENCE :
+ s = "Forced Silence";
+ break;
+
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE :
+ s = "Requested Bit Rate Too High";
+ break;
+
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE :
+ s = "Interleaved Profile Required for LITE";
+ break;
+
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE :
+ s = "Unselectable Operation Mode";
+ break;
+
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN :
+ s = "State Refused By Golden";
+ break;
+
+ default :
+ s = "Unknown Cause";
+ break;
+ }
+
+ // Disorderly shutdown
+ PRINT_ERROR("Modem Init Failure: %s (%d)\n", s, p_FailureCause);
+ g_ModemState = C_AMSW_DISORDERLY;
+
+ msw_report_event(MSW_EVENT_FAILURE,p_FailureCause);
+}
+
+AMSW_ResultCode AMSW_ANT_wait_event(unsigned long *event)
+{
+ *event= last_report;
+ return 0;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/amu/amas.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/amas.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,424 @@
+#ifndef _AMAS_H_
+#define _AMAS_H_
+#include "types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Constants and typedefs
+typedef unsigned long AMSW_DataType;
+typedef unsigned long AMSW_ResultCode;
+typedef unsigned long AMSW_ConfigType;
+
+/* possible structs for configData in setModemConfiguration */
+typedef unsigned char VendorIdentification[16];
+typedef struct {
+ unsigned char MinNoiseMarginDnstr;
+ unsigned char MinNoiseMarginUpstr;
+ unsigned char MaxAddNoiseMarginDnstr;
+ unsigned char MaxAddNoiseMarginUpstr;
+ unsigned char TargetNoiseMarginDnstr;
+ unsigned char TargetNoiseMarginUpstr;
+ signed char MaxPSDDnstr;
+ unsigned char CarrierMask[32];
+ unsigned long RAModeDnstr;
+ unsigned long RAModeUpstr;
+ unsigned short InterlMinBitrateDnstr;
+ unsigned short InterlMinBitrateUpstr;
+ unsigned short InterlPlannedBitrateDnstr;
+ unsigned short InterlPlannedBitrateUpstr;
+ unsigned short InterlMaxBitrateDnstr;
+ unsigned short InterlMaxBitrateUpstr;
+ unsigned char InterlMaxDelayDnstr;
+ unsigned char InterlMaxDelayUpstr;
+ unsigned short FastMinBitrateDnstr;
+ unsigned short FastMinBitrateUpstr;
+ unsigned short FastPlannedBitrateDnstr;
+ unsigned short FastPlannedBitrateUpstr;
+ unsigned short FastMaxBitrateDnstr;
+ unsigned short FastMaxBitrateUpstr;
+ unsigned short LowPowerBitrateDnstr;
+ unsigned short LowPowerBitrateUpstr;
+ unsigned char POTSoverlayOperationModes;
+ unsigned short POTSoverlayPermissions[8];
+ unsigned char ISDNoverlayOperationModes;
+ unsigned short ISDNoverlayPermissions[8];
+} T_AMSW_LT_OperatorConfiguration;
+
+typedef struct {
+ unsigned char USpowerCutback;
+ unsigned char POTSoverlayOperationModes;
+ unsigned short POTSoverlayPermissions[8];
+ unsigned char ISDNoverlayOperationModes;
+ unsigned short ISDNoverlayPermissions[8];
+} T_AMSW_ANT_CustomerConfiguration;
+
+typedef struct {
+ unsigned char countryCode;
+ unsigned char reserved;
+ unsigned long vendorCode;
+ unsigned short vendorSpecific;
+} T_ITU_VendorId;
+
+typedef struct {
+ T_ITU_VendorId ITU_VendorId;
+ unsigned char ITU_StandardRevisionNbr;
+ unsigned short ANSI_ETSI_VendorId;
+ unsigned char ANSI_ETSI_VendorRevisionNbr;
+ unsigned char ANSI_ETSI_StandardRevisionNbr;
+ unsigned long ALC_ManagementInfo;
+} T_AMSW_Identification;
+
+typedef struct {
+ unsigned long utopiaMode;
+ unsigned long utopiaFast;
+ unsigned long utopiaSlow;
+ T_ITU_VendorId vendorIdentif;
+ unsigned char goldenMode;
+} T_AMSW_LT_StaticConfiguration;
+
+typedef struct {
+ unsigned long utopiaMode;
+ unsigned long utopiaFast;
+ unsigned long utopiaSlow;
+ char serialNumber[32];
+ T_ITU_VendorId vendorIdentif;
+ unsigned long maximumDownstreamLineRate;
+ unsigned long managementVersion;
+ unsigned char goldenMode;
+} T_AMSW_ANT_StaticConfiguration;
+
+typedef struct {
+ unsigned char powerStateControl;
+} T_AMSW_PowerStateConfiguration;
+
+typedef struct {
+ unsigned short relCapacityOccupationDnstr;
+ unsigned short attainableBitrateDnstr;
+ signed char noiseMarginDnstr;
+ signed char outputPowerUpstr;
+ unsigned char attenuationDnstr;
+} T_AMSW_LT_FarEndLineOperData;
+
+typedef struct {
+ unsigned short relCapacityOccupationDnstr;
+ signed char noiseMarginDnstr;
+ signed char outputPowerUpstr;
+ unsigned char attenuationDnstr;
+ unsigned long operationalMode;
+} T_AMSW_NT_NearEndLineOperData;
+
+typedef struct {
+ unsigned short relCapacityOccupationUpstr;
+ signed char noiseMarginUpstr;
+ signed char outputPowerDnstr;
+ unsigned char attenuationUpstr;
+ unsigned char carrierLoad[128];
+} T_AMSW_NT_FarEndLineOperData;
+
+typedef struct {
+ unsigned short actualBitrate;
+} T_AMSW_LT_ChannelOperData;
+
+typedef struct {
+ unsigned short actualBitrate;
+} T_AMSW_NT_ChannelOperData;
+
+typedef struct {
+ unsigned long status;
+ unsigned long change;
+} T_AMSW_def_bitmaps;
+
+typedef struct {
+ T_AMSW_def_bitmaps near_end;
+ T_AMSW_def_bitmaps far_end;
+} T_AMSW_def_bitmap_set;
+
+typedef struct {
+ unsigned short FecNotInterleaved;
+ unsigned short FecInterleaved;
+ unsigned short CrcNotInterleaved;
+ unsigned short CrcInterleaved;
+ unsigned short HecNotInterleaved;
+ unsigned short HecInterleaved;
+ unsigned short TotalCellCountInterleaved;
+ unsigned short TotalCellCountNotInterleaved;
+ unsigned short ActiveCellCountInterleaved;
+ unsigned short ActiveCellCountNotInterleaved;
+ unsigned short BERInterleaved;
+ unsigned short BERNotInterleaved;
+} T_AMSW_def_counters;
+
+typedef struct {
+ T_AMSW_def_counters near_end;
+ T_AMSW_def_counters far_end;
+} T_AMSW_def_counter_set;
+//---------------------------------------
+// STM G
+//---------------------------------------
+typedef struct {
+ float Teq_noise_table[256];
+ float hf[512];
+ unsigned long a;
+ short teq_global[32];
+} T_AMSW_Teq;
+
+typedef struct {
+ float Teq_noise_table[256];
+ float hf[512];
+ unsigned long a;
+ short teq_global[32];
+} T_AMSW_TeqX;
+
+typedef struct {
+ unsigned long a;
+} T_AMSW_Ber;
+
+typedef struct {
+ char versionA[40];
+} T_AMSW_VersionMS;
+
+typedef struct {
+ unsigned long carrier;
+ short X[32];
+ short Y[32];
+} T_AMSW_Constellation;
+//---------------------------------------
+//#define STARTMSW_VERSION "UnicornTest 1.02"
+//---------------------------------------
+/* Bitpmap for Defects */
+#define LOM 0x4
+#define LCDI 0x8
+#define LCDNI 0x10
+#define LOF 0x40
+#define LOS 0x80
+
+/* possible bitpositions for POTSoverlayOperationModes */
+#define AMSW_ANSI_IDX 0
+#define AMSW_ANSI (1<<AMSW_ANSI_IDX)
+#define AMSW_G_DMT_IDX 1
+#define AMSW_G_DMT (1<<AMSW_G_DMT_IDX)
+#define AMSW_UAWG_IDX 2
+#define AMSW_UAWG (1<<AMSW_UAWG_IDX)
+#define AMSW_G_LITE_IDX 3
+#define AMSW_G_LITE (1<<AMSW_G_LITE_IDX)
+#define AMSW_MULTI 4 //MADDA
+
+/* constants for the utopia mode */
+#define C_AMSW_UTOPIA_LEVEL1 1
+#define C_AMSW_UTOPIA_LEVEL2 2
+
+/* possible bitpositions for goldenMode */
+//#define TILAB_ECI_MODIFICATION
+#ifdef TILAB_ECI_MODIFICATION
+#define AMSW_GOLDEN_OFF (0<<0)
+#define AMSW_GOLDEN_ON (1<<0)
+#else
+#define AMSW_GOLDEN_OFF (1<<0)
+#define AMSW_GOLDEN_ON (1<<1)
+#endif
+
+/* possible bitpositions for powerStateControl */
+#define AMSW_L1 (1<<1)
+#define AMSW_L3 (1<<3)
+
+/* possible values for AMSW_ConfigType */
+#define C_AMSW_OPERATOR_CONFIGURATION 1
+#define C_AMSW_STATIC_CONFIGURATION 2
+#define C_AMSW_CUSTOMER_CONFIGURATION 1
+#define C_AMSW_POWER_STATE_CONTROL 3
+
+/* possible values for AMSW_ResultCode */
+#define C_AMSW_ACK 0
+#define C_AMSW_REJ 1
+#define C_AMSW_ERR_COM_INV_PARAM 0x10003
+
+/* possible values for AMSW_DataType in getData */
+#define C_AMSW_PM_DATA 0
+#define C_AMSW_FM_DATA 1
+#define C_AMSW_NEAR_END_IDENTIFICATION 2
+#define C_AMSW_FAR_END_IDENTIFICATION 3
+#define C_AMSW_NEAR_END_LINE_DATA 4
+#define C_AMSW_FAR_END_LINE_DATA 5
+#define C_AMSW_NEAR_END_CHANNEL_DATA_FAST 6
+#define C_AMSW_FAR_END_CHANNEL_DATA_FAST 7
+#define C_AMSW_NEAR_END_CHANNEL_DATA_INTERLEAVED 8
+#define C_AMSW_FAR_END_CHANNEL_DATA_INTERLEAVED 9
+
+// STM G
+#define C_AMSW_VERSIONMS 10
+#define C_AMSW_BER 11
+#define C_AMSW_TEQ 12
+#define C_AMSW_CONSTELLATION 13
+
+/* possible bitpositions for the permissions */
+#define AMSW_TRELLIS (1<<0)
+#define AMSW_FAST_RETRAIN (1<<1)
+#define AMSW_POWER_MANAGEMENT (1<<2)
+#define AMSW_BITSWAP (1<<3)
+#define AMSW_RS16 (1<<4)
+#define AMSW_US_PILOT_MODULATED (1<<5)
+#define AMSW_DS_PILOT_MODULATED (1<<6)
+#define AMSW_GOLDEN_CHANNEL (1<<12)
+#define AMSW_LQ (1<<13)
+
+/* constants for the states */
+typedef unsigned short AMSW_ModemState;
+
+#define C_AMSW_IDLE 0
+#define C_AMSW_L3 1
+#define C_AMSW_LISTENING 2
+#define C_AMSW_ACTIVATING 3
+#define C_AMSW_Ghs_HANDSHAKING 4
+#define C_AMSW_ANSI_HANDSHAKING 5
+#define C_AMSW_INITIALIZING 6
+#define C_AMSW_RESTARTING 7
+#define C_AMSW_FAST_RETRAIN 8
+#define C_AMSW_SHOWTIME_L0 9
+#define C_AMSW_SHOWTIME_LQ 10
+#define C_AMSW_SHOWTIME_L1 11
+#define C_AMSW_EXCHANGE 12
+#define C_AMSW_TRUNCATE 13
+#define C_AMSW_ESCAPE 14
+#define C_AMSW_DISORDERLY 0xabcd //STM
+#define C_AMSW_RETRY 15 //STM
+
+/* constants for the events */
+typedef unsigned char AMSW_ModemEvent;
+
+#define C_AMSW_PEER_ATU_FOUND 0
+#define C_AMSW_RESTART_REQUEST 1
+#define C_AMSW_ACTIVATION_REQUEST 2
+#define C_AMSW_TO_INITIALIZING 3
+#define C_AMSW_SHOWTIME 4
+#define C_AMSW_L3_EXECUTED 5
+#define C_AMSW_L3_REJECTED 6
+#define C_AMSW_L1_EXECUTED 7
+#define C_AMSW_L1_REJECTED 8
+#define C_AMSW_L0_REJECTED 9
+#define C_AMSW_RESTART_ACCEPTABLE 10
+#define C_AMSW_SUICIDE_REQUEST 11
+#define C_AMSW_RESTART_NOT_ACCEPTABLE 12
+
+/* modemfailures */
+typedef unsigned short AMSW_ModemFailure;
+
+#define C_AMSW_UNCOMPATIBLE_LINECONDITIONS 5
+#define C_AMSW_NO_LOCK_POSSIBLE 10
+#define C_AMSW_PROTOCOL_ERROR 15
+#define C_AMSW_MESSAGE_ERROR 20
+#define C_AMSW_SPURIOUS_ATU_DETECTED 25
+#define C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE 30
+#define C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE 35
+#define C_AMSW_FORCED_SILENCE 40
+#define C_AMSW_UNSELECTABLE_OPERATION_MODE 45
+#define C_AMSW_STATE_REFUSED_BY_GOLDEN 50
+
+#define C_AMSW_AMU_EVENT_ACT_TIMEOUT 60 /* AMU_EVENT_ACT_TIMEOUT */
+#define C_AMSW_AMU_EVENT_INI_TIMEOUT 65 /* AMU_EVENT_INI_TIMEOUT */
+#define C_AMSW_AMU_EVENT_SHUTDOWN 70 /* AMU_EVENT_SHUTDOWN */
+#define C_AMSW_EVENT_RETRY 75 /* AMU_EVENT_RETRY */
+#define C_AMSW_UNKNOWN 80
+#define C_AMSW_UNKNOWN_FAILURE 85
+#define C_AMSW_NO_HARDWARE 90
+#define C_AMSW_NO_USB_BANDWIDTH 95
+
+void AMSW_ANT_reportModemFailure(AMSW_ModemFailure p_FailureCause);
+void AMSW_ANT_reportEvent(AMSW_ModemEvent p_Event);
+void AMSW_ANT_reportModemStateChange(AMSW_ModemState p_ModemState);
+AMSW_ResultCode AMSW_ANT_setModemConfiguration(AMSW_ConfigType configType, void *configData);
+AMSW_ResultCode AMSW_ANT_getModemConfiguration(AMSW_ConfigType configType, void *configData);
+
+AMSW_ResultCode AMSW_ANT_getData(AMSW_DataType dataType, void * data);
+AMSW_ResultCode AMSW_ANT_requestModemStateChange(AMSW_ModemState requestedState);
+AMSW_ResultCode AMSW_ANT_getModemState(AMSW_ModemState *modemState);
+unsigned long AMSW_ANT_dyingGasp(void);
+AMSW_ResultCode AMSW_ANT_wait_event(unsigned long *event);
+unsigned long AMSW_Chip_Halt(void); // STM: Nick 28/8/2000
+
+unsigned long AMSW_Modem_SW_Init(unsigned long deviceNumber,
+ unsigned long chipAddress,
+ unsigned long intr);
+void AMSW_Modem_SW_Exit(void);
+AMSW_ResultCode AMSW_ANT_setCarrierConstellation(long Carrier);
+
+// STM : Initialization Mode Options
+
+#define MSW_MODE_UNKNOWN 0
+#define MSW_MODE_ANSI 1
+#define MSW_MODE_GLITE 2
+#define MSW_MODE_MULTI 3
+#define MSW_MODE_GDMT 4
+#define MSW_MODE_MAX 5
+
+void msw_init(unsigned short mode); // Cold entry point of the MSW
+void msw_exit(void); // Shutdown of the MSW
+void msw_start(void); // Activation of the line
+void msw_stop(void); // Deactivation of the line
+
+unsigned long msw_get_event(void); // Wait for changes in the MSW state
+void msw_cancel_event(void); // Cancel the wait
+
+void msw_report_event(unsigned long type,unsigned long code);
+
+//void stwinmsw_Ver(T_AMSW_VersionMS *VersionMSdata); //STM Gian
+char * stwinmsw_Ver(void);
+
+// Globals
+extern int amu_go;
+extern unsigned long GlobalRemove; // Driver is being removed
+extern unsigned long last_report;
+
+
+#ifdef WIN32
+void _cdecl TestCycle(void *);
+#endif
+// type of the event returned by msw_get_event()
+
+#define MSW_EVENT_NONE 0
+#define MSW_EVENT_REPORT 1
+#define MSW_EVENT_FAILURE 2
+#define MSW_EVENT_STATE 3
+#define MSW_EVENT_CANCEL 4
+
+#define AMU_EVENT_ACT_TIMEOUT 5
+#define AMU_EVENT_INI_TIMEOUT 25
+#define AMU_EVENT_SHUTDOWN 7
+#define AMU_EVENT_RETRY 8
+
+#ifdef WIN32
+//---------------------------------------------------------------------
+// STMCTRL.DLL interface
+//---------------------------------------------------------------------
+// entry points in STMCTRL.DLL used by applications to access MSW data
+//
+// This should be the only way to access the MSW data from user mode
+//---------------------------------------------------------------------
+void MswInitDll(void); // Must be called by console applications
+void MswExitDll(void); // Must be called by console applications
+
+void MswInit(int mode); // Initializes the MSW
+void MswExit(void); // Shutdowns the MSW
+void MswStart(void); // Start the line activation
+void MswStop(void); // Stop the line activation
+
+DWORD MswGetConfig(DWORD,PVOID);// Get a MSW config structure
+DWORD MswGetData(DWORD,PVOID); // Get a MSW data structure
+DWORD MswDyingGasp(void); // Send the dying gasp command
+DWORD MswGetState(void); // Get the activation state
+DWORD MswSetCarrier(DWORD); // Set Carrier for constellation retrieval
+
+DWORD MswGetEvent(void); // Wait for changes in the MSW state
+void MswCancelEvent(void); // Cancel the wait
+
+char *MswCtrlVersion(void); // Returns the version of STMCTRL.DLL
+
+DWORD HalWriteProm(PBYTE,WORD,WORD); // Write to the configuration EEPROM
+DWORD HalReadProm(PBYTE,WORD,WORD); // Read the configuration EEPROM
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+/* end of file */
Added: dists/trunk/modules/unicorn/unicorn/amu/amu.cpp
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/amu.cpp Wed Dec 27 00:14:01 2006
@@ -0,0 +1,517 @@
+#include "types.h"
+#include "tracetool.h"
+#include "rapi.h"
+#include "hard.h"
+#include "hal.h"
+#include "amas.h"
+#include "amu.h"
+#define _PICAP_CODE_
+#ifdef _PICAP_CODE_
+extern long Vendor_Id_code_ECI;
+#endif
+
+
+
+//#define PM_FM_POLLING_RATE 1000// milliseconds
+//#define INIT_POLLING_TIME 2 // (INIT_POLLING_TIME* PM_FM_POLLING_RATE) milliseconds
+//#define WAITFOR_SHOWTIME_COUNT 20 // (WAITFOR_SHOWTIME_COUNT * PM_FM_POLLING_RATE) millisecs
+#define RETRY_WAIT_TIME_MIN_MSEC 5000 // 5 seconds (between line disable and reenable)
+
+//#define WAITFOR_DISORDERLY_COUNT 2000 // (WAITFOR_DISORDERLY_COUNT * PM_FM_POLLING_RATE) msecs
+
+//#define NEAR_LCDNI_COUNT 15 // 15 seconds timeout of near end LCD persistency
+//#define NEAR_LCDI_COUNT 15 // 15 seconds timeout of near end LCDI persistency
+//#define NEAR_LOS_COUNT 5 // 5 seconds timeout of near end LOS persistency
+//#define NEAR_LOF_COUNT 5 // 5 seconds timeout of near end LOF persistency
+//#define FAR_LCDNI_COUNT 17 // 17 seconds timeout of far end LCD persistency
+//#define FAR_LCDI_COUNT 17 // 17 seconds timeout of far end LCD persistency
+//#define FAR_LOS_COUNT 5 // 6 seconds timeout of far end LOS persistency
+//#define FAR_LOF_COUNT 5 // 6 seconds timeout of far end LOF persistency
+//#define FAR_LOS_SHORT_COUNT 4 // 4 seconds timeout of far end LOS persistency
+//#define FAR_LOF_SHORT_COUNT 4 // 4 seconds timeout of far end LOF persistency
+
+
+//#define CRC_FAST_COUNT 5 // (CRC_FAST_COUNT * AMUTASK_MSG_WAIT_TIME) millisecs
+//#define CRC_INTERLEAVED_COUNT 5 // (CRC_INTERLEAVED_COUNT * AMUTASK_MSG_WAIT_TIME) milli
+//#define WATCHDOG_COUNTER_VALUE 500 // Time to reset = (WATCHDOG_COUNTER_VALUE * 2) * 8.192
+ // milli sec
+
+unsigned long NEAR_LCDNI_COUNT;
+unsigned long NEAR_LCDI_COUNT;
+unsigned long NEAR_LOS_COUNT;
+unsigned long NEAR_LOF_COUNT;
+unsigned long FAR_LCDNI_COUNT;
+unsigned long FAR_LCDI_COUNT;
+unsigned long FAR_LOS_COUNT;
+unsigned long FAR_LOF_COUNT;
+unsigned long FAR_LOS_SHORT_COUNT;
+unsigned long FAR_LOF_SHORT_COUNT;
+
+#if 0
+//ModemSW variables
+extern T_AMSW_Identification g_Identification;
+extern T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
+extern T_AMSW_NT_FarEndLineOperData g_FarEndLineOperData;
+extern T_AMSW_def_counter_set g_def_counter_set;
+extern T_AMSW_def_bitmap_set g_def_bitmap_set;
+extern T_AMSW_def_counters g_def_counters;
+extern T_AMSW_NT_ChannelOperData g_ChannelOperData;
+extern T_AMSW_ANT_CustomerConfiguration g_CustomerCfg;
+extern T_AMSW_ANT_StaticConfiguration g_StaticCfg;
+extern T_AMSW_PowerStateConfiguration g_PowerStateCfg;
+extern T_AMSW_Teq g_Teq; //STM G
+extern T_AMSW_Ber g_Ber;
+extern T_AMSW_VersionMS g_VersionMS;
+#endif
+
+extern unsigned long DownstreamRate; // In Kbits/sec
+unsigned long FmPollingRate = 1000;
+unsigned long InitTimeout = 20000;
+//unsigned long ActTimeout = 10000;
+unsigned long ActTimeout = 300000; // Fix for Alcatel 4.2.13
+unsigned long RetryTime = 5000;
+
+unsigned long LCD_Trig = 15000;
+unsigned long LOS_LOF_Trig = 5000;
+
+extern unsigned long Vendor_Id_code_Globspan;
+unsigned long Vendor_Id_code_Globspan=0;
+
+extern "C" void HandleAtmError(void);
+extern "C" void HandleLeds(void);
+
+unsigned long amu_init_modem(unsigned short MODE);
+unsigned long amu_init_modem(unsigned short MODE)
+{
+ unsigned long l_RetCode;
+
+ //
+ // Static Configuration
+ //
+ g_StaticCfg.utopiaMode = C_AMSW_UTOPIA_LEVEL1;
+ g_StaticCfg.utopiaFast = 0;
+ g_StaticCfg.utopiaSlow = 0;
+ for (l_RetCode=0; l_RetCode<32; l_RetCode++)
+ g_StaticCfg.serialNumber[l_RetCode] = '9';
+// g_StaticCfg.maximumDownstreamLineRate = 5000;
+ g_StaticCfg.maximumDownstreamLineRate = DownstreamRate;
+ g_StaticCfg.managementVersion = 1;
+ g_StaticCfg.goldenMode = AMSW_GOLDEN_OFF;
+ g_StaticCfg.vendorIdentif.countryCode = 0x0f;
+ g_StaticCfg.vendorIdentif.reserved = 0x00;
+ g_StaticCfg.vendorIdentif.vendorCode = (0x41 << 24) | (0x4c << 16) | (0x43 << 8) | (0x42); /*"ALCB"*/ //RFC016
+// g_StaticCfg.vendorIdentif.vendorCode = 0x3A; //STMicroelectronics
+ g_StaticCfg.vendorIdentif.vendorSpecific = 0x0451;
+
+ //
+ // Customer Configuration
+ //
+
+ switch(MODE)
+ {
+ case MSW_MODE_ANSI:
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_ANSI;
+ break;
+ case MSW_MODE_GLITE:
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_LITE;
+ break;
+ case MSW_MODE_GDMT:
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_DMT;
+ break;
+ case MSW_MODE_MULTI: default:
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_DMT | AMSW_ANSI | AMSW_G_LITE;
+ break;
+ }
+
+ g_CustomerCfg.POTSoverlayPermissions[0] = AMSW_TRELLIS | AMSW_BITSWAP; // ANSI
+
+#ifdef SUICIDE_FIX
+ g_CustomerCfg.POTSoverlayPermissions[1] = AMSW_TRELLIS | AMSW_DS_PILOT_MODULATED | AMSW_POWER_MANAGEMENT; //DMT
+#else
+ g_CustomerCfg.POTSoverlayPermissions[1] = AMSW_TRELLIS | AMSW_DS_PILOT_MODULATED; // DMT
+#endif
+
+ g_CustomerCfg.POTSoverlayPermissions[2] = AMSW_LQ; // UAWG
+ g_CustomerCfg.POTSoverlayPermissions[3] = AMSW_BITSWAP | AMSW_RS16 | AMSW_TRELLIS | AMSW_DS_PILOT_MODULATED ; // G.LITE
+ g_CustomerCfg.POTSoverlayPermissions[4] = 0;
+ g_CustomerCfg.POTSoverlayPermissions[5] = 0;
+ g_CustomerCfg.POTSoverlayPermissions[6] = 0;
+ g_CustomerCfg.POTSoverlayPermissions[7] = 0;
+
+ //
+ // ISDN
+ //
+ g_CustomerCfg.ISDNoverlayOperationModes = 0;
+ for (l_RetCode = 0; l_RetCode < 8; l_RetCode++)
+ g_CustomerCfg.ISDNoverlayPermissions[l_RetCode] = 0;
+ for (l_RetCode = 0; l_RetCode < 8; l_RetCode++)
+ g_CustomerCfg.ISDNoverlayPermissions[l_RetCode] = 0;
+
+ //
+ // Power State Configuration
+ //
+ g_PowerStateCfg.powerStateControl = AMSW_L3 | AMSW_L1;
+
+ // Setup modem configuration
+ l_RetCode = AMSW_ANT_setModemConfiguration(C_AMSW_STATIC_CONFIGURATION,&g_StaticCfg);
+ if (l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("Error in AMSW_ANT_setModemConfiguration-1 (%d)\n", l_RetCode);
+ l_RetCode = AMSW_ANT_setModemConfiguration(C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if (l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("Error in AMSW_ANT_setModemConfiguration-2 (%d)\n", l_RetCode);
+ l_RetCode = AMSW_ANT_setModemConfiguration(C_AMSW_POWER_STATE_CONTROL,&g_PowerStateCfg);
+ if (l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("Error in AMSW_ANT_setModemConfiguration-3 (%d)\n", l_RetCode);
+ return l_RetCode;
+}
+
+void AMUTask(unsigned long,unsigned long , unsigned long , unsigned long )
+{
+ unsigned long l_RetCode = C_AMSW_REJ;
+ //static int l_Lit = 0;
+ static bool PM_toggle = TRUE;
+
+ PRINT_ERROR("FmPollingRate=%ldms,InitTimeout=%ldms,ActTimeout=%ld\n",
+ FmPollingRate,InitTimeout,ActTimeout);
+
+ unsigned long PM_FM_POLLING_RATE = FmPollingRate;
+ unsigned long WAITFOR_SHOWTIME_COUNT = InitTimeout / PM_FM_POLLING_RATE;
+ unsigned long WAITFOR_INIT_COUNT = ActTimeout / PM_FM_POLLING_RATE;
+ unsigned long RETRY_WAIT_TIME = RETRY_WAIT_TIME_MIN_MSEC / PM_FM_POLLING_RATE;
+ if (RetryTime > RETRY_WAIT_TIME_MIN_MSEC) // STM Gian Set RetryTime Only if is Bigger then minimum value
+ RETRY_WAIT_TIME = RetryTime / PM_FM_POLLING_RATE;
+ unsigned long INIT_POLLING_TIME = 5; //(??????)
+ unsigned long WAITFOR_DISORDERLY_COUNT = 3;
+
+ NEAR_LCDNI_COUNT = LCD_Trig / PM_FM_POLLING_RATE;
+ NEAR_LCDI_COUNT = NEAR_LCDNI_COUNT;
+ NEAR_LOS_COUNT = LOS_LOF_Trig / PM_FM_POLLING_RATE;
+ NEAR_LOF_COUNT = NEAR_LOS_COUNT;
+ FAR_LCDNI_COUNT = NEAR_LCDNI_COUNT;
+ FAR_LCDI_COUNT = NEAR_LCDNI_COUNT;
+ FAR_LOS_COUNT = NEAR_LOS_COUNT;
+ FAR_LOF_COUNT = NEAR_LOS_COUNT;
+ FAR_LOS_SHORT_COUNT = NEAR_LOS_COUNT;
+ FAR_LOF_SHORT_COUNT = NEAR_LOS_COUNT;
+
+ UINT delay = 0;
+
+ while (amu_go)
+ {
+ xtm_wkafter(500);
+ delay += 500;
+
+
+ // Exit immediately on surprise removal
+ // ------------------------------------
+ if (GlobalRemove) return;
+
+ HandleAtmError();
+ HandleLeds();
+
+ // Modem Software polling
+ // ----------------------
+ if (delay < PM_FM_POLLING_RATE) continue;
+ delay = 0;
+
+ // Modem Software polling
+ // ----------------------
+ switch(g_ModemState)
+ {
+ case C_AMSW_IDLE :
+ g_WaitForRetry = 0; // STM Gian clear
+ g_WaitForInit = 0; // STM Gian clear
+
+ break;
+ case C_AMSW_ACTIVATING :
+ g_WaitForInit++;
+ if(g_WaitForInit >= WAITFOR_INIT_COUNT)
+ {
+ msw_report_event(AMU_EVENT_ACT_TIMEOUT,0);
+ PRINT_ERROR("Timeout in activation!!!!\n");
+ g_ModemState = C_AMSW_DISORDERLY;
+ g_WaitForInit = 0;
+ }
+ break;
+ case C_AMSW_L3 : break;
+ case C_AMSW_SHOWTIME_L0:
+ case C_AMSW_SHOWTIME_LQ:
+ case C_AMSW_SHOWTIME_L1:
+ // Poll line for defects and performance
+ g_ShowtimeCounter++;
+ if (g_ShowtimeCounter >= INIT_POLLING_TIME)
+ {
+// PRINT_ERROR("Polling Defects after %d ms\n", g_ShowtimeCounter*PM_FM_POLLING_RATE);
+ if ( (FM_Polling(PM_toggle) != C_AMSW_ACK ))
+ {
+ PRINT_ERROR("Error in AMSW_get_Data during Fm Polling....\n");
+ PRINT_ERROR("Fm Polling will be stopped for %d sec!!!\n",(INIT_POLLING_TIME*PM_FM_POLLING_RATE)/1000);
+ g_ShowtimeCounter = 0;
+ }
+ else
+ PM_toggle = !PM_toggle;
+ }
+ break;
+ case C_AMSW_INITIALIZING :
+ case C_AMSW_Ghs_HANDSHAKING :
+ case C_AMSW_ANSI_HANDSHAKING :
+
+ // WAIT to reach SHOWTIME
+ g_WaitForShowtime++;
+ if(g_WaitForShowtime >= WAITFOR_SHOWTIME_COUNT)
+ {
+ msw_report_event(AMU_EVENT_INI_TIMEOUT,0);
+ PRINT_ERROR("Timeout in initialization!!!!\n");
+ // Reset count
+ g_WaitForShowtime = 0;
+ // Disorderly shutdown
+ g_ModemState = C_AMSW_DISORDERLY;
+ }
+ break;
+
+ case C_AMSW_DISORDERLY :
+
+ // Special state for disorderly shutdown
+ // Wait out the period of heavy burst of interrupts
+ // from CO side when line length is changed while in
+ // showtime
+
+ g_WaitForDisorderly++;
+ if(g_WaitForDisorderly >= WAITFOR_DISORDERLY_COUNT)
+ {
+
+
+// if (RetryTime != 0)
+// msw_report_event(AMU_EVENT_RETRY,0);
+
+ board_disable_intrs();
+
+// xtm_wkafter(WAITFOR_DISORDERLY_COUNT);
+
+
+ g_ShowtimeCounter = 0;
+ g_WaitForDisorderly = 0;
+
+ // Disorderly shutdown
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ if(l_RetCode != C_AMSW_ACK) {
+ PRINT_ERROR("Error in AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) = %d\n", l_RetCode);
+ }
+ else for (int i=0; i<6; i++)
+ {
+ if (g_ModemState == C_AMSW_IDLE || GlobalRemove) break;
+ xtm_wkafter(500);
+ }
+ if (RetryTime != 0)
+ {
+ g_ModemState = C_AMSW_RETRY;
+ g_WaitForRetry = 0;
+ }
+
+ }
+ break;
+
+ case C_AMSW_RETRY:
+ if (RetryTime != 0)
+ {
+ g_WaitForRetry++;
+ //xtm_wkafter(RETRY_WAIT_TIME);
+#ifdef _PICAP_CODE_
+ if(Vendor_Id_code_ECI==TRUE)
+ xtm_wkafter(1000); //modif PICAP ECI CK
+#endif
+ if (g_WaitForRetry >= RETRY_WAIT_TIME)
+ {
+ msw_report_event(AMU_EVENT_RETRY,0);
+ g_WaitForRetry = 0;
+ msw_start();
+ }
+ }
+ else
+ {
+ PRINT_ERROR("Error in AMUTask (C_AMSW_RETRY) with RetryTime != 0 (%ld)\n",RetryTime);
+ g_ModemState = C_AMSW_IDLE;
+ }
+ break;
+ default:
+ PRINT_ERROR("Error in AMUTask g_ModemState =%d not catched\n",g_ModemState);
+ g_ModemState = C_AMSW_IDLE;
+ break;
+ } //end switch
+ }
+}
+
+// This function monitors the line for LOS (Loss Of Signal), LOF (Loss Of Frame),
+// LCDI (Loss Of Cell Delineation Interleaved),
+// LCDNI (Loss Of Cell Delineation Fast)defects
+
+unsigned long FM_Polling(bool pm_poll)
+{
+ unsigned long l_RetCode = C_AMSW_REJ;
+
+ if ((g_ModemState == C_AMSW_SHOWTIME_L0) ||
+ (g_ModemState == C_AMSW_SHOWTIME_LQ) ||
+ (g_ModemState == C_AMSW_SHOWTIME_L1))
+ {
+ // Get defect bit map
+ l_RetCode = AMSW_ANT_getData(C_AMSW_FM_DATA, &g_def_bitmap_set);
+
+ if(l_RetCode == C_AMSW_ACK)
+ {
+//####################### Loss Of Signal ##############################
+
+ if( ((g_def_bitmap_set.near_end.status & LOS) == LOS) ||
+ ((g_def_bitmap_set.near_end.status & LOS) == 0) &&
+ ((g_def_bitmap_set.near_end.change & LOS) == LOS) )
+ {
+ g_NEAR_LOS++;
+ }
+ else
+ {
+ g_NEAR_LOS = 0;
+ }
+ if( ((g_def_bitmap_set.far_end.status & LOS) == LOS) ||
+ ((g_def_bitmap_set.far_end.status & LOS) == 0) &&
+ ((g_def_bitmap_set.far_end.change & LOS) == LOS) )
+ {
+ g_FAR_LOS++;
+ }
+ else
+ {
+ g_FAR_LOS = 0;
+ }
+
+//###################### Loss Of Cell Delineation Fast ######################
+
+ if((g_def_bitmap_set.near_end.status & LCDNI) == LCDNI)
+ {
+ g_NEAR_LCDNI++;
+ }
+ else
+ {
+ g_NEAR_LCDNI = 0;
+ }
+ if((g_def_bitmap_set.far_end.status & LCDNI) == LCDNI)
+ {
+ g_FAR_LCDNI++;
+ }
+ else
+ {
+ g_FAR_LCDNI = 0;
+ }
+
+//###################### Loss Of Cell Delineation Interleaved ######################
+
+ if((g_def_bitmap_set.near_end.status & LCDI) == LCDI)
+ {
+ g_NEAR_LCDI++;
+ }
+ else
+ {
+ g_NEAR_LCDI = 0;
+ }
+ if((g_def_bitmap_set.far_end.status & LCDI) == LCDI)
+ {
+ g_FAR_LCDI++;
+ }
+ else
+ {
+ g_FAR_LCDI = 0;
+ }
+
+ // WAIT : If over a period of time defect persists, do a disorderly shutdown
+
+ if( (g_NEAR_LOS >= NEAR_LOS_COUNT) || (g_NEAR_LCDNI >= NEAR_LCDNI_COUNT) ||
+ (g_NEAR_LCDI >= NEAR_LCDI_COUNT) )
+ {
+ g_FAR_LOS = 0;
+ g_FAR_LCDNI = 0;
+ g_FAR_LCDI = 0;
+ g_ModemState = C_AMSW_DISORDERLY;
+ }
+ else if ( (g_FAR_LOS >= FAR_LOS_COUNT) || (g_FAR_LCDNI >= FAR_LCDNI_COUNT) ||
+ (g_FAR_LCDI >= FAR_LCDI_COUNT) ||
+ ((g_FAR_LOS >= FAR_LOS_SHORT_COUNT) && g_NEAR_LOS ) )
+ g_ModemState = C_AMSW_DISORDERLY;
+
+ if(g_ModemState == C_AMSW_DISORDERLY)
+ {
+
+ PRINT_ERROR("Bringing down line due to persistent:\n");
+ PRINT_ERROR("NEAR_LOS = %d/NEAR_LCD = %d/NEAR_LCDI = %d\nFAR_LOS = %d FAR_LCDI = %d FAR_LCDNI = %d\n",
+ g_NEAR_LOS, g_NEAR_LCDNI, g_NEAR_LCDI,g_FAR_LOS, g_FAR_LCDNI, g_FAR_LCDI);
+
+ msw_report_event(AMU_EVENT_SHUTDOWN,0);
+ /*
+ if (RetryTime != 0)
+ {
+ msw_report_event(AMU_EVENT_RETRY,0);
+ PRINT_ERROR("Auto-Retry will take place\n");
+ }
+ */
+
+ g_NEAR_LOS = 0; g_NEAR_LCDNI = 0; g_NEAR_LCDI = 0;
+ g_FAR_LOS = 0; g_FAR_LCDNI = 0; g_FAR_LCDI = 0;
+ }
+ /*
+ if (pm_poll)
+ {
+ PM_Polling();
+ }
+ */
+ }
+ }
+
+ return l_RetCode;
+}
+
+unsigned long PM_Polling(void)
+{
+
+ unsigned long l_RetCode = C_AMSW_REJ;
+
+ if ((g_ModemState == C_AMSW_SHOWTIME_L0) ||
+ (g_ModemState == C_AMSW_SHOWTIME_LQ) ||
+ (g_ModemState == C_AMSW_SHOWTIME_L1)
+ )
+ {
+
+ l_RetCode = AMSW_ANT_getData(C_AMSW_PM_DATA, &g_def_counter_set);
+ if(l_RetCode != C_AMSW_ACK)
+ {
+ PRINT_ERROR("AMSW_ANT_getData error\n");
+ }
+ else
+ {
+ PRINT_INFO("\nFast Path Performance Counters:\n\n");
+
+ PRINT_INFO("Near-end Fec-F = %5u\n", g_def_counter_set.near_end.FecNotInterleaved);
+ PRINT_INFO("Far-end Fec-F = %5u\n", g_def_counter_set.far_end.FecNotInterleaved);
+
+ PRINT_INFO("Near-end Crc-F = %5u\n", g_def_counter_set.near_end.CrcNotInterleaved);
+ PRINT_INFO("Far-end Crc-F = %5u\n", g_def_counter_set.far_end.CrcNotInterleaved);
+
+ PRINT_INFO("Near-end Hec-F = %5u\n", g_def_counter_set.near_end.HecNotInterleaved);
+ PRINT_INFO("Far-end Hec-F = %5u\n", g_def_counter_set.far_end.HecNotInterleaved);
+
+ PRINT_INFO("Near-end Total Cell-F = %5u\n", g_def_counter_set.near_end.TotalCellCountNotInterleaved);
+ PRINT_INFO("Near-end Active Cell-F = %5u\n", g_def_counter_set.near_end.ActiveCellCountNotInterleaved);
+
+ PRINT_INFO("\nInterleave Path Performance Counters:\n\n");
+
+ PRINT_INFO("Near-end Fec-I = %5u\n", g_def_counter_set.near_end.FecInterleaved);
+ PRINT_INFO("Far-end Fec-I = %5u\n", g_def_counter_set.far_end.FecInterleaved);
+
+ PRINT_INFO("Near-end Crc-I = %5u\n", g_def_counter_set.near_end.CrcInterleaved);
+ PRINT_INFO("Far-end Crc-I = %5u\n", g_def_counter_set.far_end.CrcInterleaved);
+
+ PRINT_INFO("Near-end Hec-I = %5u\n", g_def_counter_set.near_end.HecInterleaved);
+ PRINT_INFO("Far-end Hec-I = %5u\n", g_def_counter_set.far_end.HecInterleaved);
+
+ PRINT_INFO("Near-end Total Cell-I = %5u\n", g_def_counter_set.near_end.TotalCellCountInterleaved);
+ PRINT_INFO("Near-end Active Cell-I = %5u\n", g_def_counter_set.near_end.ActiveCellCountInterleaved);
+ }
+ }
+
+ return l_RetCode;
+}
Added: dists/trunk/modules/unicorn/unicorn/amu/amu.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/amu.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,53 @@
+#ifndef _AMU_H_
+#define _AMU_H_
+
+//
+// amu.h : Defines the global variables for manager.
+//
+
+
+#include "types.h"
+#include "amas.h" /* AMAS API's and typedefs */
+
+
+/***********************************************************************
+ * AMU Global Variables *
+ ***********************************************************************/
+
+extern unsigned long FmPollingRate;
+extern unsigned long InitTimeout;
+extern unsigned long ActTimeout;
+extern unsigned long RetryTime;
+
+extern unsigned long LCD_Trig;
+extern unsigned long LOS_LOF_Trig;
+
+unsigned long g_AMUQid = 0;
+unsigned long g_ModemState = C_AMSW_IDLE;
+unsigned int g_WaitForInit = 0, g_WaitForShowtime = 0, g_WaitForDisorderly = 0;
+unsigned int g_WaitForRetry = 0;
+unsigned char g_NEAR_LOS = 0, g_NEAR_LOF = 0, g_NEAR_LCDNI = 0, g_NEAR_LCDI = 0;
+unsigned char g_FAR_LOS = 0, g_FAR_LOF = 0, g_FAR_LCDNI = 0, g_FAR_LCDI = 0;
+unsigned char g_Mode = AMSW_ANSI | AMSW_UAWG | AMSW_G_DMT | AMSW_G_LITE;
+unsigned long g_ShowtimeCounter = 0;
+bool L3_flag = FALSE; // bool var to acknowledge answer to orderly shutdown request
+
+T_AMSW_Identification g_Identification;
+T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
+T_AMSW_NT_FarEndLineOperData g_FarEndLineOperData;
+T_AMSW_def_counter_set g_def_counter_set;
+T_AMSW_def_bitmap_set g_def_bitmap_set;
+T_AMSW_def_counters g_def_counters;
+T_AMSW_NT_ChannelOperData g_ChannelOperData;
+T_AMSW_ANT_CustomerConfiguration g_CustomerCfg;
+T_AMSW_ANT_StaticConfiguration g_StaticCfg;
+T_AMSW_PowerStateConfiguration g_PowerStateCfg;
+T_AMSW_Teq g_Teq; // STM G
+T_AMSW_Ber g_Ber;
+T_AMSW_VersionMS g_VersionMS;
+
+void AMUTask(unsigned long Arg1, unsigned long , unsigned long , unsigned long );
+unsigned long FM_Polling(bool pm_poll);
+unsigned long PM_Polling(void);
+
+#endif // _AMU_H_
Added: dists/trunk/modules/unicorn/unicorn/amu/bsp.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/bsp.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,31 @@
+#ifndef _BSP_H_
+#define _BSP_H_
+
+#define SACHEM_TX_DSP 0x0B62 // TX DSP Register
+#define AFE_POWER_UP 0x0008 // power up AFE bit 3
+#define AFE_POWER_DOWN 0xFFF7 // power down AFE bit 3
+#define MASK_AFE_POWER_DOWN 0x0008 // Mask for power down AFE bit 3
+#define TX_DSP_MODE_ATUR 0x0001 // ATU-R Mode set
+#define MASK_TX_DSP_MODE 0x0001 // Mask for ATU-R Mode setting
+
+#define CONFIG_MODE_BIG 0x0004 // BIG Endian Mode set
+#define MASK_BIGEND_MODE 0x0004 // Mask for BIG Endian Mode setting
+
+#define DMT_GPIO_OFFSET 0x40 // General purpose Register
+#define DMT_OUT_PIN_HIGH 0x0004 // High level bit 2 (GP-OUT)
+#define DMT_OUT_PIN_LOW 0xFFFB // Low level bit 2 (GP-OUT)
+#define MASK_DMT_OUT_PIN_LOW 0x0004 // Mask Low level bit 2 (GP-OUT)
+#define DMT_IN_PIN0_MASK 0x0001 // GP_IN0 bit 0
+#define DMT_IN_PIN1_MASK 0x0002 // GP_IN1 bit 1
+
+extern "C" {
+
+unsigned short initializeBoard(void);
+unsigned long powerUp_Modem_Chipset (unsigned long Chipset);
+unsigned long powerDown_Modem_Chipset (unsigned long Chipset);
+unsigned long pull_Modem_Chipset_out_of_reset(unsigned long Chipset);
+unsigned long put_Modem_Chipset_in_reset(unsigned long Chipset);
+
+} // extern "C"
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/amu/bsp_pci.cpp
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/bsp_pci.cpp Wed Dec 27 00:14:01 2006
@@ -0,0 +1,107 @@
+#include "types.h"
+#include "tracetool.h"
+#include "hal.h"
+#include "hard.h"
+#include "rapi.h"
+#include "bsp.h" // AMAS API's and typedefs
+
+#ifndef _PCI_DRIVER
+#error not_PCI_DRIVER
+#endif
+
+unsigned short initializeBoard(void)
+{
+ T_SlaveMaskData p;
+ ST_STATUS status;
+
+ // TX_DSP_Register configured in ATU-R Mode
+ p.iaddr = SACHEM_TX_DSP;
+ p.idata = TX_DSP_MODE_ATUR;
+ p.mask = MASK_TX_DSP_MODE;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+
+ xtm_wkafter(1);
+
+ // AFE in Reset (UNICORN)
+ p.iaddr = DMT_GPIO_OFFSET;
+ p.idata = DMT_OUT_PIN_LOW;
+ p.mask = MASK_DMT_OUT_PIN_LOW;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+
+ xtm_wkafter(1);
+
+ // AFE in Power Down (UNICORN)
+ p.iaddr = SACHEM_TX_DSP;
+ p.idata = AFE_POWER_DOWN; // fisaksen
+ p.mask = MASK_AFE_POWER_DOWN;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+
+ xtm_wkafter(1);
+
+ // AFE out of Reset (UNICORN)
+ p.iaddr = DMT_GPIO_OFFSET;
+ p.idata = DMT_OUT_PIN_HIGH;
+ p.mask = MASK_DMT_OUT_PIN_LOW;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+
+ xtm_wkafter(1);
+
+ // AFE in PowerUp (UNICORN)
+ p.iaddr = SACHEM_TX_DSP;
+ p.idata = AFE_POWER_UP; // fisaksen
+ p.mask = MASK_AFE_POWER_DOWN;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+
+ xtm_wkafter(1);
+ return 0;
+}
+
+unsigned long powerUp_Modem_Chipset (unsigned long Chipset)
+{
+ T_SlaveMaskData p;
+ ST_STATUS status;
+
+ // AFE out of Reset (UNICORN)
+ p.iaddr = DMT_GPIO_OFFSET;
+ p.idata = DMT_OUT_PIN_HIGH;
+ p.mask = MASK_DMT_OUT_PIN_LOW;
+ p.status = 0x2823;
+ status = PCI_SlaveRMWrite(&p);
+ if (status == FAILURE) PRINT_ERROR("PCI_SlaveRMWrite() failed\n");
+ xtm_wkafter(1);
+ return 0;
+}
+
+
+unsigned long powerDown_Modem_Chipset (unsigned long Chipset)
+{
+ return 0;
+}
+
+unsigned long pull_Modem_Chipset_out_of_reset(unsigned long Chipset)
+{
+ return 0;
+}
+
+unsigned long put_Modem_Chipset_in_reset(unsigned long Chipset)
+{
+ return 0;
+}
+
+extern "C" void HandleAtmError(void)
+{
+}
+
+extern "C" void HandleLeds(void)
+{
+}
Added: dists/trunk/modules/unicorn/unicorn/amu/bsp_usb.cpp
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/amu/bsp_usb.cpp Wed Dec 27 00:14:01 2006
@@ -0,0 +1,152 @@
+//#define USB_KERNEL_DEBUG
+
+#include "types.h"
+#include "tracetool.h"
+#include "hal.h"
+#include "hard.h"
+#include "rapi.h"
+#include "bsp.h" // AMAS API's and typedefs
+
+#ifndef _USB_DRIVER
+#error not_USB_DRIVER
+#endif
+
+unsigned short initializeBoard(void)
+{
+
+ ST_STATUS status;
+ unsigned short iaddr_val, idata_val, irmw_val;
+
+ // TX_DSP_Register configured in ATU-R Mode
+
+ status = USB_controlWrite(UR_IADR,SACHEM_TX_DSP);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IDATA,TX_DSP_MODE_ATUR);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IRMW,MASK_TX_DSP_MODE);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB> TX_DSP_Register configuration DONE!\n");
+
+ // AFE in Reset
+
+ iaddr_val = DMT_GPIO_OFFSET;
+ idata_val = DMT_OUT_PIN_LOW;
+ irmw_val = MASK_DMT_OUT_PIN_LOW;
+
+ status = USB_controlWrite(UR_IADR,iaddr_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IDATA,idata_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IRMW,irmw_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB> AFE_RESET: DONE!\n");
+
+ // AFE in PowerDown
+
+ iaddr_val = SACHEM_TX_DSP;
+ idata_val = AFE_POWER_UP;
+ irmw_val = MASK_AFE_POWER_DOWN;
+
+ status = USB_controlWrite(UR_IADR,iaddr_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IDATA,idata_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IRMW,irmw_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB> AFE_POWER_DOWN: DONE!\n");
+
+ // AFE out of Reset
+
+ iaddr_val = DMT_GPIO_OFFSET;
+ idata_val = DMT_OUT_PIN_HIGH;
+ irmw_val = MASK_DMT_OUT_PIN_LOW;
+
+ status = USB_controlWrite(UR_IADR,iaddr_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IDATA,idata_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IRMW,irmw_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB> AFE_OUT_OF_RESET: DONE!\n");
+
+ // AFE Power Up
+
+ iaddr_val = SACHEM_TX_DSP;
+ idata_val = AFE_POWER_DOWN;
+ irmw_val = MASK_AFE_POWER_DOWN;
+
+ status = USB_controlWrite(UR_IADR,iaddr_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IDATA,idata_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_IRMW,irmw_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB> AFE_POWER_UP: DONE!\n");
+
+#ifdef USB_KERNEL_DEBUG
+ if ( (status = USB_controlWrite(0x61,0x00)) == FAILURE )
+ PRINT_ERROR("Configuration of GPIO_DIR register failed!\n");
+
+ PRINT_INFO("USB> GPIO_DIR: INITIALIZED!\n");
+#endif
+
+ return 0;
+}
+
+unsigned long powerUp_Modem_Chipset (unsigned long Chipset)
+{
+ ST_STATUS status;
+ unsigned short iaddr_val, idata_val, irmw_val;
+
+ iaddr_val = DMT_GPIO_OFFSET;
+ idata_val = DMT_OUT_PIN_HIGH;
+ irmw_val = MASK_DMT_OUT_PIN_LOW;
+
+ status = USB_controlWrite(UR_IADR,iaddr_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ status = USB_controlWrite(UR_IDATA,idata_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ status = USB_controlWrite(UR_IRMW,irmw_val);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ status = USB_controlWrite(UR_STATUS,0x2823);
+ if (status == FAILURE) PRINT_ERROR("USB_controlWrite() failed\n");
+
+ PRINT_INFO("USB powerUp_Modem_Chipset completed\n");
+
+ return 0;
+}
+
+
+unsigned long powerDown_Modem_Chipset (unsigned long Chipset)
+{
+ return 0;
+}
+
+unsigned long pull_Modem_Chipset_out_of_reset(unsigned long Chipset)
+{
+ return 0;
+}
+
+unsigned long put_Modem_Chipset_in_reset(unsigned long Chipset)
+{
+ return 0;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/arch/i386/modem_ant_PCI_LINUX.o.regparm3
==============================================================================
Binary file. No diff available.
Added: dists/trunk/modules/unicorn/unicorn/include/crc.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/crc.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,19 @@
+#ifndef __CRC_H__
+#define __CRC_H__ 1
+
+#define CRC32_INITIAL 0xffffffff
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+unsigned long crc32(unsigned long initial, unsigned char *mem, int len);
+unsigned short crc10(unsigned short crc, unsigned char *mem, int len);
+unsigned char hecCompute(unsigned char *p);
+int hecCheck(unsigned char *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/debug.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/debug.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,97 @@
+#ifndef _LINUX_KERNEL_H
+#include <linux/kernel.h>
+#endif
+
+#define ATM_D 1
+#define DATA_D 2
+#define RW_D 4
+#define PCI_D 8
+#define USB_D 8
+#define TOSCA_D 16
+#define INTR_D 32
+#define RAPI_D 64
+
+#ifdef _PCI_DRIVER
+#define LOG_PREFIX "unicorn_pci"
+#endif
+#ifdef _USB_DRIVER
+#define LOG_PREFIX "unicorn_usb"
+#endif
+#ifdef _ATM_DRIVER
+#define LOG_PREFIX "unicorn_atm"
+#endif
+#ifdef _ETH_DRIVER
+#define LOG_PREFIX "unicorn_eth"
+#endif
+
+#ifndef LOG_PREFIX
+#define LOG_PREFIX ""
+#endif
+
+extern unsigned long DebugLevel;
+
+#define INFO(fmt,arg...) \
+ printk( KERN_INFO LOG_PREFIX ": " fmt,## arg)
+
+#define WARN(fmt,arg...) \
+ do { printk(KERN_WARNING "%s: ",__FUNCTION__); \
+ printk(fmt,## arg); } while(0);
+
+#define ERR(fmt,arg...) \
+ do { printk(KERN_ERR "%s: ",__FUNCTION__); \
+ printk(fmt,## arg); } while(0);
+
+#if DEBUG
+#define DBG(level,fmt,arg...) \
+if (level & DebugLevel) { \
+ printk(KERN_DEBUG "%s: ",__FUNCTION__); \
+ printk(fmt,## arg); }
+
+#undef ASSERT
+#define ASSERT(test) ((test) ? (void)0 : printk(KERN_ERR "%s : %s: %s",__FILE__,__FUNCTION__,#test))
+
+static void __attribute__((unused))
+dump_packet(const char *name,const u_char *data,int pkt_len)
+{
+#define DUMP_HDR_SIZE 20
+#define DUMP_TLR_SIZE 8
+ if (pkt_len) {
+ int i,len1,len2;
+
+ printk(KERN_DEBUG "%s: length=%d,data=",name,pkt_len);
+
+ if (pkt_len > DUMP_HDR_SIZE+ DUMP_TLR_SIZE) {
+ len1 = DUMP_HDR_SIZE;
+ len2 = DUMP_TLR_SIZE;
+ } else {
+ len1 = pkt_len > DUMP_HDR_SIZE ? DUMP_HDR_SIZE : pkt_len;
+ len2 = 0;
+ }
+ for (i = 0; i < len1; ++i) {
+ printk ("%.2x", data[i]);
+ }
+ if (len2) {
+ printk ("..");
+ for (i = pkt_len-DUMP_TLR_SIZE; i < pkt_len; ++i) {
+ printk ("%.2x", data[i]);
+ }
+ }
+ printk ("\n");
+ }
+#undef DUMP_HDR_SIZE
+#undef DUMP_TLR_SIZE
+}
+
+#define DUMP_PACKET(level,data,len) \
+if (level & DebugLevel) { \
+dump_packet(__FUNCTION__,data,len);}
+
+
+#else
+
+#define DBG(level,format, arg...) do {} while (0)
+#undef ASSERT
+#define ASSERT(test)
+#define DUMP_PACKET(level,data,len) do {} while (0)
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/hal.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/hal.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,388 @@
+//----------------------------------------------------------------------
+// Test driver for the STMicroelectronics ADSL Chip Taurus
+//----------------------------------------------------------------------
+// File: hal.h
+// Author: Christophe Piel
+// Copyright F.H.L.P. 2000
+// Copyright ST Microelectronics 2000
+//----------------------------------------------------------------------
+// provides definitions for hardware access API to the Taurus chip
+//----------------------------------------------------------------------
+#ifndef __hal__h_
+#define __hal__h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { SUCCESS,FAILURE } ST_STATUS;
+//----------------------------------------------------------------------
+// PCI hardware access interface
+//----------------------------------------------------------------------
+// structure definitions
+//----------------------------------------------------------------------
+typedef struct {
+ DWORD *CMDptrW1;
+ DWORD *CMDptrW2;
+ DWORD *CMDptrRd;
+ WORD *ITABLEptr;
+ WORD *IMASKptr;
+} T_PCIinit;
+
+typedef struct {
+ WORD addr;
+ DWORD data;
+} T_DirData;
+
+typedef struct {
+ DWORD idata;
+ DWORD iaddr;
+ DWORD status;
+} T_SlaveDirData;
+
+typedef struct {
+ DWORD idata[3];
+ DWORD icntrl;
+ DWORD iaddr;
+ DWORD status;
+} T_SlaveIndData;
+
+typedef struct {
+ DWORD idata;
+ DWORD iaddr;
+ DWORD mask;
+ DWORD status;
+} T_SlaveMaskData;
+
+typedef struct {
+ DWORD *cmdBuff;
+ DWORD *resBuff;
+ DWORD wrSize;
+ DWORD rdSize;
+ DWORD status;
+} T_MasterRBlock;
+
+typedef struct {
+ DWORD *cmdBuff;
+ DWORD wrSize;
+ DWORD status;
+} T_MasterWBlock;
+
+typedef struct {
+ DWORD *resBuff;
+ DWORD baseAddr;
+ DWORD wrSize;
+ DWORD rdSize;
+ DWORD status;
+} T_MasterRBurst;
+
+typedef struct {
+ DWORD *cmdBuff;
+ DWORD baseAddr;
+ DWORD wrSize;
+ DWORD status;
+} T_MasterWBurst;
+
+typedef struct {
+ DWORD *cmdBuff;
+ DWORD SocAddr;
+ DWORD SocCntrl;
+ DWORD mask;
+ DWORD reqSize;
+ DWORD exeSize;
+ DWORD status;
+} T_Msg;
+
+typedef struct {
+ PBYTE buffer;
+ DWORD length;
+} T_WriteAtmData;
+//----------------------------------------------------------------------
+// Function prototypes
+//----------------------------------------------------------------------
+ST_STATUS
+PCI_init(
+ DWORD **CMDptrW1,
+ DWORD **CMDptrW2,
+ DWORD **CMDptrRd,
+ WORD **ITABLEptr,
+ WORD **IMASKptr
+ );
+
+ST_STATUS
+PCI_directRead(
+ WORD addr,
+ DWORD *data
+ );
+
+ST_STATUS
+PCI_directWrite(
+ WORD addr,
+ DWORD data
+ );
+
+ST_STATUS
+PCI_SlaveRMWrite(
+ T_SlaveMaskData *dataPtr
+ );
+
+ST_STATUS
+PCI_SlaveReadDirect(
+ T_SlaveDirData *dataPtr
+ );
+
+ST_STATUS
+PCI_SlaveWriteDirect(
+ T_SlaveDirData *dataPtr
+ );
+
+ST_STATUS
+PCI_SlaveReadIndirect(
+ T_SlaveIndData *dataPtr
+ );
+
+ST_STATUS
+PCI_SlaveWriteIndirect(
+ T_SlaveIndData *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterReadDirBlock(
+ T_MasterRBlock *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterWriteDirBlock(
+ T_MasterWBlock *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterReadIndBlock(
+ T_MasterRBlock *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterWriteIndBlock(
+ T_MasterWBlock *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterReadDirBurst(
+ T_MasterRBurst *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterWriteDirBurst(
+ T_MasterWBurst *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterReadIndBurst(
+ T_MasterRBurst *dataPtr
+ );
+
+ST_STATUS
+PCI_MasterWriteIndBurst(
+ T_MasterWBurst *dataPtr
+ );
+
+ST_STATUS
+PCI_MessageRead(
+ T_Msg *dataPtr
+ );
+
+ST_STATUS
+PCI_MessageWrite(
+ T_Msg *dataPtr
+ );
+
+ST_STATUS
+PCI_WaitForObc(
+ void
+ );
+
+ST_STATUS
+PCI_WriteAtm(
+ PBYTE buffer,
+ DWORD length
+ );
+
+ST_STATUS
+PCI_ReadAtm(
+ PBYTE buffer,
+ DWORD size,
+ DWORD *length
+ );
+
+ST_STATUS
+PCI_ReadConfigHeader (
+ PVOID Buffer,
+ DWORD Offset,
+ DWORD Count
+ );
+
+ST_STATUS
+PCI_WriteConfigHeader (
+ PVOID Buffer,
+ DWORD Offset,
+ DWORD Count
+ );
+
+ST_STATUS
+PCI_ReadDeviceSpecificConfig (
+ PVOID Buffer,
+ DWORD Offset,
+ DWORD Count
+ );
+
+ST_STATUS
+PCI_WriteDeviceSpecificConfig (
+ PVOID Buffer,
+ DWORD Offset,
+ DWORD Count
+ );
+//----------------------------------------------------------------------
+// USB hardware access interface
+//----------------------------------------------------------------------
+// structure definitions
+//----------------------------------------------------------------------
+//enum T_Bool {FALSE=0,TRUE=1};
+typedef enum {EP2,EP6} T_EpOut ;
+typedef enum {EP3,EP5,EP7} T_EpIn ;
+
+typedef struct {
+ BYTE addr;
+ short data;
+} T_RegData;
+
+typedef struct {
+ WORD *cmdBuff;
+ WORD wrSize;
+ WORD rdSize;
+} T_ReadData;
+
+typedef struct {
+ WORD *cmdBuff;
+ WORD frameSize;
+} T_ShortWrite;
+
+typedef struct {
+ WORD *cmdBuff;
+ WORD nFrames;
+ WORD frameSize;
+ WORD lastFrameSize;
+} T_LongWrite;
+
+typedef struct {
+ WORD ep0_size;
+ WORD ep1_size;
+ WORD ep2_size;
+ WORD ep3_size;
+ WORD ep4_size;
+ WORD ep5_size;
+ WORD ep6_size;
+ WORD ep7_size;
+} T_EpSettings;
+
+typedef struct {
+ WORD *CMDptrW1;
+ WORD *CMDptrW2;
+ WORD *CMDptrRd;
+ WORD *CMDptrW_I1;
+ WORD *CMDptrW_I2;
+ WORD *CMDptrRd_I;
+ WORD *ITABLEptr;
+ WORD *IMASKptr;
+ T_EpSettings ep_setting;
+} T_USBinit;
+
+typedef struct {
+ WORD *cmdBuff;
+ WORD wrSize;
+ WORD rdSize;
+ T_EpOut ep_out;
+ T_EpIn ep_in;
+} T_EpReadData;
+
+typedef struct {
+ T_ShortWrite wr;
+ T_EpOut ep_out;
+} T_EpShortWrite;
+
+typedef struct {
+ T_LongWrite wr;
+ T_EpOut ep_out;
+} T_EpLongWrite;
+
+//----------------------------------------------------------------------
+// Function prototypes
+//----------------------------------------------------------------------
+ST_STATUS
+USB_init(
+ WORD **CMDptrW1,
+ WORD **CMDptrW2,
+ WORD **CMDptrRd,
+ WORD **CMDptrW_I1,
+ WORD **CMDptrW_I2,
+ WORD **CMDptrRd_I,
+ WORD **ITABLEptr,
+ WORD **IMASKptr,
+ T_EpSettings *ep_setting
+ );
+
+ST_STATUS
+USB_controlRead(
+ BYTE addr,
+ WORD *data
+ );
+
+ST_STATUS
+USB_controlWrite(
+ BYTE addr,
+ WORD data
+ );
+
+ST_STATUS
+USB_S_Write(
+ T_ShortWrite *dataPtr,
+ T_EpOut ep_out
+ );
+
+ST_STATUS
+USB_L_Write(
+ T_LongWrite *dataPtr,
+ T_EpOut ep_out
+ );
+
+ST_STATUS
+USB_Read(
+ T_ReadData *dataPtr,
+ T_EpOut ep_out,
+ T_EpIn ep_in
+ );
+
+ST_STATUS
+USB_WriteAtm(
+ PBYTE buffer,
+ DWORD length
+ );
+
+ST_STATUS
+USB_ReadAtm(
+ PBYTE buffer,
+ DWORD size,
+ DWORD *length
+ );
+
+BOOL USB_checkIntContext(void);
+
+VOID WritePort(WORD ad,BYTE b);
+//----------------------------------------------------------------------
+// EOF
+//----------------------------------------------------------------------
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/hard.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/hard.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,327 @@
+//----------------------------------------------------------------------
+// Test driver for the STMicroelectronics ADSL Chip Taurus
+//----------------------------------------------------------------------
+// File: hard.h
+// Author: Christophe Piel
+// Copyright F.H.L.P. 2000
+// Copyright ST Microelectronics 2000
+//----------------------------------------------------------------------
+// Contains definitions of the hardware registers and configuration
+//----------------------------------------------------------------------
+#ifndef __HARD__H_
+#define __HARD__H_
+
+#define OBC_CMD_TIMEOUT 1000 // ms
+#define TOSCA_INTR_WDOG 200 // ms
+
+#define ATM_CELL_LENGTH 53
+
+
+// Interrupt Status Register bit description
+// -----------------------------------------
+#define ISR_TOIF 0x0001 // TOSCA Direct Interrupt Flag
+#define ISR_TOIE 0x0002 // TOSCA Direct Interrupt Enable
+#define ISR_TOIFS 0x0004 // TOSCA Delayed Interrupt
+#define ISR_TOIES 0x0008 // TOSCA Delayed Interrupt Enable
+#define ISR_TIMIF 0x0010 // Timer Interrupt Flag
+#define ISR_TIMIE 0x0020 // Timer Interrupt Enable
+#define ISR_OSIF 0x0040 // OBC Slave Interrupt Flag
+#define ISR_OSIE 0x0080 // OBC Slave Interrupt Enable
+#define ISR_OMIF 0x0100 // OBC Master Interrupt Flag
+#define ISR_OMIE 0x0200 // OBC Master Interrupt Enable
+#define ISR_GPIFA 0x0400 // GPIN[0] Interrupt Flag
+#define ISR_GPIEA 0x0800 // GPIN[0] Interrupt Enable
+#define ISR_GPIFB 0x1000 // GPIN[4] Interrupt Flag
+#define ISR_GPIEB 0x2000 // GPIN[4] Interrupt Enable
+
+#define ISR_IF 0x1555 // Mask for all interrupts flags
+
+
+#ifdef _PCI_DRIVER
+//----------------------------------------------------------------------
+// PCI interface hardware definitions
+//----------------------------------------------------------------------
+#define PCI_CELL_LENGTH 64
+
+#define PCI_US_BUF_SIZE (30*(PCI_CELL_LENGTH/sizeof(DWORD)))
+#define PCI_DS_BUF_SIZE (200*(PCI_CELL_LENGTH/sizeof(DWORD)))
+
+typedef struct {
+ DWORD CmdBufW1[512];
+ DWORD CmdBufW2[512];
+ DWORD CmdBufRd[1312];
+ DWORD AtmUsBuf[2*PCI_US_BUF_SIZE];
+ DWORD AtmDsBuf[4*PCI_DS_BUF_SIZE];
+} DMA_MEMORY, *PDMA_MEMORY;
+
+// PCI_BRIDGE Register Map
+// =======================
+#define PR_LACFW 0x0000 // Local Arbitrer Configuration Word
+#define PR_LACFW_SET 0x0004 // SET Local Arbitrer Configuration Word bits
+#define PR_LACFW_CLR 0x0008 // CLR Local Arbitrer Configuration Word bits
+#define PR_MWC 0x000C // Memory Write Control
+#define PR_MRC 0x0010 // Memory Read Control
+#define PR_PCFW 0x0014 // PCI Configuration Word Data Register
+#define PR_ISDR 0x0018 // PCI Interrupt Status & Data Register
+#define PR_RUNNING 0x001C // Reports status of PCI bus request
+
+// Down-Stream DMA
+
+#define PR_DS_PTR_1 0x0800 // Host Memory DS Start Pointer Buffer 1
+#define PR_DS_PTR_2 0x0804 // Host Memory DS Start Pointer Buffer 2
+#define PR_DS_SIZE_1 0x0808 // Set the Number of DMA data transfer 1
+#define PR_DS_SIZE_2 0x080C // Set the Number of DMA data transfer 1
+#define PR_DS_MOVED 0x0810 // Current number of double words transfered
+
+// Up-Stream DMA
+
+#define PR_US_PTR_1 0x1000 // Host Memory US Start Pointer Buffer 1
+#define PR_US_PTR_2 0x1004 // Host Memory US Start Pointer Buffer 2
+#define PR_US_SIZE_1 0x1008 // Set the Number of DMA data transfer 1
+#define PR_US_SIZE_2 0x100C // Set the Number of DMA data transfer 1
+#define PR_US_MOVED 0x1010 // Current number of double words transfered
+
+// OBC Write DMA
+
+#define PR_WR_PTR 0x1800 // Host Memory WR Start Pointer Buffer
+#define PR_WR_SIZE 0x1808 // Set the Status of DMA channel
+#define PR_WR_MOVED 0x1810 // Current number of double words transferred
+
+// OBC Read DMA
+
+#define PR_RD_PTR 0x2000 // Host Memory RD Start Pointer Buffer
+#define PR_RD_SIZE 0x2008 // Set the Status of DMA channel
+#define PR_RD_MOVED 0x2010 // Current number of double words transferred
+
+// Handshaking
+
+#define PR_DS_PTR_HS 0x2800 // Host Memory DS Handshaking 1 Location
+#define PR_US_PTR_HS 0x2804 // Host Memory US Handshaking 1 Location
+#define PR_OBC_PTR_HS 0x2808 // Host Memory OBC Handshaking Location
+#define PR_PATTERN 0x280C // Pattern used by handshake pointers
+
+// CFG_MEM Register Map
+// --------------------
+#define PR_C_ADR 0x4000 // SPI ADR & CONTROL Register
+#define PR_C_DATA 0x4004 // SPI DATA Register
+
+// ADSL uP Register Map: REGS
+// --------------------------
+#define PR_STATUS 0x8000 // Status Control Register
+#define PR_IDATA_1 0x8004 // Indirect Data 1 Register (LSB)
+#define PR_IDATA_2 0x8008 // Indirect Data 2 Register
+#define PR_IDATA_3 0x800C // Indirect Data 3 Register (MSB)
+#define PR_IDATA 0x8010 // Indirect Data 3 Register
+#define PR_IADR 0x8014 // Indirect Address Register
+#define PR_IMASKS 0x8018 // Mask to apply to Slave Indirect R/W
+#define PR_IRMW 0x801C // Mask to apply to Slave R/M/W access
+#define PR_IADR_TX 0x8020 // Indirect TX Reference Address Register
+#define PR_IADR_RX 0x8024 // Indirect RX Reference Address Register
+#define PR_IADR_MSG 0x8028 // Indirect MSG Reference Address Register
+#define PR_IADR_CHK 0x802C // Indirect Address Check Register
+#define PR_IADR_BURST 0x8030 // Burst Base Address Register
+#define PR_SIZE_BURST 0x8034 // Number of Burst accesses to be executed
+#define PR_IMASKM 0x8038 // Mask to apply to the Master Ind or Msg R/W
+#define PR_IADR_IRQ 0x803C // Indirect Address of Tosca IRQ Table
+#define PR_ITABLE 0x8040 // Interrupt Table Data Register
+#define PR_ISR 0x807C // Interrupt Status Register
+
+// ADSL uP Register Map: PERIPHERALs
+// ---------------------------------
+#define PR_GPIO_DATA 0x8080 // Status of the GPIO pins
+#define PR_GPIO_DIR 0x8084 // Direction of the GPIO pins
+#define PR_GPIO_PER 0x8088 // Persistency values of the GPIO pins
+#define PR_TIM_REG_A 0x808C // Timer A mode and preset value
+#define PR_TIM_REG_B 0x8090 // Timer B mode and preset value
+#define PR_AFE_TEST 0x8094 // AFE Feedback Control Register
+
+
+
+// PCI Interrupt Status & Data Register bit description
+// ----------------------------------------------------
+#define PISDR_DMA_DS1_IF 0x00000001 // DMA DS PTR1 Interrupt Flag
+#define PISDR_DMA_DS2_IF 0x00000002 // DMA DS PTR2 Interrupt Flag
+#define PISDR_DMA_DS_IF 0x00000003 // DMA DS PTRS Interrupt Flag
+#define PISDR_DMA_US1_IF 0x00000004 // DMA US PTR1 Interrupt Flag
+#define PISDR_DMA_US2_IF 0x00000008 // DMA US PTR2 Interrupt Flag
+#define PISDR_DMA_US_IF 0x0000000C // DMA US PTRS Interrupt Flag
+#define PISDR_DMA_OBC_IF 0x00000010 // DMA OBC Interrupt Flag
+#define PISDR_AIF1 0x00000020 // ADSL Interrupt 1 Flag
+#define PISDR_AIF2 0x00000040 // ADSL Interrupt 2 Flag
+#define PISDR_PEIF 0x00000080 // Parity Error Interrupt Flag
+#define PISDR_BEIF 0x00000100 // Bus Error Interrupt Flag
+#define PISDR_ACTDIF 0x00000200 // ACTD interrupt flag
+#define PISDR_DMA_DS1_IE 0x00000400 // DMA DS PTR1 Interrupt Enable
+#define PISDR_DMA_DS2_IE 0x00000800 // DMA DS PTR2 Interrupt Enable
+#define PISDR_DMA_DS_IE 0x00000C00 // DMA DS PTRS Interrupt Enable
+#define PISDR_DMA_US1_IE 0x00001000 // DMA US PTR1 Interrupt Enable
+#define PISDR_DMA_US2_IE 0x00002000 // DMA US PTR2 Interrupt Enable
+#define PISDR_DMA_US_IE 0x00003000 // DMA US PTRS Interrupt Enable
+#define PISDR_DMA_OBC_IE 0x00004000 // DMA OBC Interrupt Enable
+#define PISDR_AIE1 0x00008000 // ADSL Interrupt 1 Enable
+#define PISDR_AIE2 0x00010000 // ADSL Interrupt 2 Enable
+#define PISDR_PEIE 0x00020000 // Parity Error Interrupt Enable
+#define PISDR_BEIE 0x00040000 // Bus Error Interrupt Enable
+#define PISDR_ACTDIE 0x00080000 // ACTD Interrupt Flag Enable
+
+#define PISDR_IF 0x000003FF // Mask for all interrupts flags
+
+// Local Arbitrer Configuration Word bit description
+// -------------------------------------------------
+#define LACFW_W_DS_SIZE 0x0001 // DS ATM transfer length
+#define LACFW_W_US_SIZE 0x0002 // US ATM transfer length
+#define LACFW_W_WR_SIZE 0x000C // WR OBC transfer length
+#define LACFW_W_RD_SIZE 0x0030 // RD OBC transfer length
+#define LACFW_EDMA_DS1 0x0040 // Enable DS DMA pointer 1
+#define LACFW_EDMA_DS2 0x0080 // Enable DS DMA pointer 2
+#define LACFW_EDMA_DS 0x00C0 // Enable DS DMA pointers
+#define LACFW_EDMA_US1 0x0100 // Enable US DMA pointer 1
+#define LACFW_EDMA_US2 0x0200 // Enable US DMA pointer 2
+#define LACFW_EDMA_US 0x0300 // Enable US DMA pointers
+#define LACFW_EDMA_WROBC 0x0400 // Enable WR OBC DMA channel
+#define LACFW_EDMA_RDOBC 0x0800 // Enable RD OBC DMA channel
+#define LACFW_EHS_DS 0x1000 // Enable DS DMA Handshaking
+#define LACFW_EHS_US 0x2000 // Enable US DMS Handshaking
+#define LACFW_EHS_OBC 0x4000 // Enable OBC DMA Handshaking
+
+// Offset of Power Management Control/Status -PMCSR int PCI config space
+
+#define PCI_PMCSR 224
+
+#endif
+
+
+#ifdef _USB_DRIVER
+//----------------------------------------------------------------------
+// USB interface hardware definitions
+//----------------------------------------------------------------------
+#define USB_CELL_LENGTH 56
+
+#define ATM_DS_CELLS_PER_PKT 8 // ATM downstream cells per ISO packet (max alt 1)
+#define ATM_READS 8 // max ATM downstream URB outstanding
+#define ATM_DS_ISO_PACKETS 5 // ATM downstream ISO packets per URB
+#define USB_DS_BUF_SIZE (ATM_DS_CELLS_PER_PKT*ATM_READS*ATM_DS_ISO_PACKETS*(USB_CELL_LENGTH/sizeof(WORD)))
+// with bandwidth reduced to 1 cell per ISO packet we need more ISO packet
+#define MAX_ISO_PACKETS (ATM_DS_CELLS_PER_PKT*ATM_DS_ISO_PACKETS)
+
+#define ATM_US_CELLS_PER_PKT 3 // ATM upstream cells per ISO packet (max alt 1)
+#define ATM_WRITES 2 // max ATM upstream URB outstanding
+#define ATM_US_ISO_PACKETS 5 // ATM upstream ISO packets per URB
+#define USB_US_BUF_SIZE (ATM_US_CELLS_PER_PKT*ATM_WRITES*ATM_US_ISO_PACKETS*(USB_CELL_LENGTH/sizeof(WORD)))
+
+typedef struct {
+ WORD CmdBufW1[1024];
+ WORD CmdBufW2[1024];
+ WORD CmdBufRd[1024];
+
+ WORD CmdBufW_I1[1024];
+ WORD CmdBufW_I2[1024];
+ WORD CmdBufRd_I[1024];
+
+ WORD AtmUsBuf[USB_US_BUF_SIZE];
+ WORD AtmDsBuf[USB_DS_BUF_SIZE];
+ WORD IntBuf[2][17];
+} USB_MEMORY, *PUSB_MEMORY;
+
+// USB Endpoints
+// -------------
+enum {
+ USB_EP0,
+ EP_INTERRUPT,
+ EP_OBC_ISO_OUT,
+ EP_OBC_ISO_IN,
+ EP_ATM_ISO_OUT,
+ EP_ATM_ISO_IN,
+ EP_OBC_INT_OUT,
+ EP_OBC_INT_IN,
+ EP_MAX,
+};
+
+// USB_BRIDGE Register Map
+// =======================
+#define UR_CFW 0x00 // USB Configuration Word
+#define UR_ISDR 0x01 // USB Interrupt Status & Data Register
+#define UR_STAT 0x02 // USB Internal Status Register
+
+// CFG_MEM Register Map
+// --------------------
+#define UR_C_ADR 0x20 // SPI ADR & CONTROL Register
+#define UR_C_DATA 0x21 // SPI DATA Register
+
+// ADSL uP Register Map: REGS
+// --------------------------
+#define UR_STATUS 0x40 // Status Control Register
+#define UR_IDATA_1 0x41 // Indirect Data 1 Register (LSB)
+#define UR_IDATA_2 0x42 // Indirect Data 2 Register
+#define UR_IDATA_3 0x43 // Indirect Data 3 Register (MSB)
+#define UR_IDATA 0x44 // Indirect Data 3 Register
+#define UR_IADR 0x45 // Indirect Address Register
+#define UR_IMASKS 0x46 // Mask to apply to Slave Indirect R/W
+#define UR_IRMW 0x47 // Mask to apply to Slave R/M/W access
+#define UR_IADR_TX 0x48 // Indirect TX Reference Address Register
+#define UR_IADR_RX 0x49 // Indirect RX Reference Address Register
+#define UR_IADR_MSG 0x4A // Indirect MSG Reference Address Register
+#define UR_IADR_CHK 0x4B // Indirect Address Check Register
+#define UR_IADR_BURST 0x4C // Burst Base Address Register
+#define UR_SIZE_BURST 0x4D // Number of Burst accesses to be executed
+#define UR_IMASKM 0x4E // Mask to apply to the Master Ind or Msg R/W
+#define UR_IADR_IRQ 0x4F // Indirect Address of Tosca IRQ Table
+#define UR_ITABLE 0x50 // Interrupt Table Data Register
+#define UR_ISR 0x5F // Interrupt Status Register
+
+// ADSL uP Register Map: PERIPHERALs
+// ---------------------------------
+#define UR_GPIO_DATA 0x60 // Status of the GPIO pins
+#define UR_GPIO_DIR 0x61 // Direction of the GPIO pins
+#define UR_GPIO_PER 0x62 // Persistency values of the GPIO pins
+#define UR_TIM_REG_A 0x63 // Timer A mode and preset value
+#define UR_TIM_REG_B 0x64 // Timer B mode and preset value
+#define UR_AFE_TEST 0x65 // AFE Feedback Control Register
+
+// USB insterrupt status register bitfields
+// ----------------------------------------
+#define UISDR_TIRQ1 0x0001 // ADSL uP interrupt flag 1
+#define UISDR_TIRQ2 0x0002 // ADSL uP interrupt flag 2
+#define UISDR_UTIRQ1 0x0004 // UTOPIA rising edge FIFO interrupt flag
+#define UISDR_UTIRQ2 0x0008 // UTOPIA falling edge FIFO interrupt flag
+#define UISDR_ERR_ATM 0x0010 // ATM operation Error flag
+#define UISDR_ERR_OBC 0x0020 // WR OBC operation Error flag
+#define UISDR_ERR_PIPE 0x0040 // WR OBC Access Error flag
+#define UISDR_ACTDIF 0x0080 // ACTD interrupt flag
+#define UISDR_INT_LO 0x0100 // INT_LO flag
+#define UISDR_TIE1 0x0200 // Enable ADSL uP interrupt 1
+#define UISDR_TIE2 0x0400 // Enable ADSL uP interrupt 2
+#define UISDR_IE 0x0800 // Enable Error interrupts
+#define UISDR_LOE 0x1000 // Enable INT_LO interrupts
+#define UISDR_UTIE1 0x2000 // Enable UTOPIA FIFO interrupts
+#define UISDR_UTIE2 0x4000 // Enable UTOPIA FIFO interrupts
+#define UISDR_ACTDIE 0x8000 // Enable ACTD interrupts
+
+#define UISDR_IF 0x018F // Mask for all interrupts flags
+#define UISDR_ERF 0x0070 // Mask for all Error flags
+#define UISDR_IEF 0xFE00 // Mask for all Enable flags
+
+
+// Control COMMAND bitfields
+// -------------------------
+#define CTRL_FIRST 0x0001 // First control command in pipe
+#define CTRL_LASTI 0x0002 // Last Frame of control cmds in pipe
+#define CTRL_SET_OBCI 0x0004 // Connect WR OBC FIFO to EP6
+#define CTRL_RST_OBCI 0x0008 // Connect WR OBC FIFO to EP2
+#define CTRL_SET_OBCO 0x0010 // Connect RD OBC FIFO to EP7
+#define CTRL_RST_OBCO 0x0020 // Connect RD OBC FIFO to EP3
+#define CTRL_SET_ATM 0x0040 // Connect RD OBC FIFO to EP5
+#define CTRL_RST_ATM 0x0080 // Connect RD OBC FIFO to EP3/EP7
+#define CTRL_EWRITE 0x0100 // Enable Write Command
+#define CTRL_LINK 0x0200 // Next DWORD is another control command
+#define CTRL_ADR 0xFC00 // Mask for ADR field
+
+// LED bitfields
+// -------------
+#define LED_POWER 0x0800
+#define LED_SHOWTIME 0x0200
+#define LED_INIT 0x0400
+
+#endif
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/rapi.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/rapi.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,280 @@
+//----------------------------------------------------------------------
+// Driver for the STMicroelectronics ADSL Chip Taurus
+//----------------------------------------------------------------------
+// File: rapi.h
+// Author: Christophe Piel
+// Copyright F.H.L.P. 2000
+// Copyright ST Microelectronics 2000
+//----------------------------------------------------------------------
+// provides definitions for Operating System API to the Taurus chip
+//----------------------------------------------------------------------
+#ifndef __rapi__h_
+#define __rapi__h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ enum {
+ _SM_WAIT=0,
+ _SM_NOWAIT=1
+ };
+
+void setShowtime(void); // Set showtime FLAG to TRUE
+void resetShowtime(void); // Set showtime FLAG to FALSE
+void setAtmRate( // reports ATM cell rates
+ unsigned short upRate,
+ unsigned short downRate
+ );
+
+//----------------------------------------------------------------------
+// INTERRUPT MANAGEMENT
+//----------------------------------------------------------------------
+typedef void (*ITHANDLER)(DWORD);
+
+#define ERR_BSP_ILL_INTR 8
+
+DWORD
+board_set_intr_handler(
+ DWORD intr,
+ ITHANDLER p_handler,
+ DWORD devNumber
+ );
+
+DWORD
+board_reset_intr_handler(
+ DWORD intr
+ );
+
+DWORD
+board_clear_intr_pending(
+ DWORD intr
+ );
+
+DWORD
+board_mask_intr(
+ DWORD intr
+ );
+
+DWORD
+board_unmask_intr(
+ DWORD intr
+ );
+
+void
+board_disable_intrs(
+ void
+ );
+
+void
+board_enable_intrs(
+ void
+ );
+
+//----------------------------------------------------------------------
+// TASK MANAGEMENT
+//----------------------------------------------------------------------
+#define XPRIO_EVENT_HDLR 200
+#define XPRIO_CRITICAL_APPL 150
+#define XPRIO_OAM_APLL 100
+#define XPRIO_BACKGRND_APPL 50
+
+typedef void (*START_FUNC)(DWORD,DWORD,DWORD,DWORD);
+
+// Creates a task
+// --------------
+DWORD xt_create(
+ char name[4],
+ DWORD prio,
+ DWORD sstack,
+ DWORD ustack,
+ DWORD flags,
+ DWORD *tid
+ );
+
+// Starts a task
+// -------------
+DWORD xt_start(
+ DWORD tid,
+ DWORD mode,
+ START_FUNC start_addr,
+ DWORD targs[4]
+ );
+
+// Disables task scheduling
+// ------------------------
+void xt_entercritical(void);
+
+// Enables task scheduling
+// -----------------------
+void xt_exitcritical(void);
+
+// Waits until all tasks terminate
+// -------------------------------
+void xt_waitexit(void);
+//----------------------------------------------------------------------
+// MEMORY MANAGEMENT
+//----------------------------------------------------------------------
+
+// Allocates a memory buffer
+// -------------------------
+DWORD xm_getmem(
+ DWORD size,
+ PVOID *bufaddr
+ );
+
+// Release a memory buffer
+// -----------------------
+DWORD xm_retmem(
+ PVOID bufaddr
+ );
+//----------------------------------------------------------------------
+// INTER TASK COMMUNICATION AND SYNCHRONIZATION (SEMAPHORE)
+//----------------------------------------------------------------------
+
+// Creates a semaphore
+// -------------------
+DWORD xsm_create(
+ char name[4],
+ DWORD count,
+ DWORD flags,
+ DWORD *smid
+ );
+
+// Gets a semaphore ident
+// ----------------------
+DWORD xsm_ident(
+ char name[4],
+ DWORD node,
+ DWORD *smid
+ );
+
+// Allows a task to acquire a semaphore
+// ------------------------------------
+DWORD xsm_p(
+ DWORD smid,
+ DWORD flags,
+ DWORD timeout
+ );
+
+// Releases a semaphore
+// --------------------
+DWORD xsm_v(
+ DWORD smid
+ );
+//----------------------------------------------------------------------
+// INTER TASK COMMUNICATION AND SYNCHRONIZATION (QUEUE)
+//----------------------------------------------------------------------
+
+// Creates a message queue
+// -----------------------
+DWORD xq_create(
+ char name[4],
+ DWORD count,
+ DWORD flags,
+ DWORD *qid
+ );
+
+// Receives a message from a queue
+// -------------------------------
+DWORD xq_receive(
+ DWORD qid,
+ DWORD flags,
+ DWORD timeout,
+ DWORD msg_buf[4]
+ );
+
+// Sends a message to a queue
+// --------------------------
+DWORD xq_send(
+ DWORD qid,
+ DWORD msg_buf[4]
+ );
+//----------------------------------------------------------------------
+// TIMER MANAGEMENT
+//----------------------------------------------------------------------
+typedef enum {
+ E_XTM_ONE_SHOT = 1,
+ E_XTM_PERIODIC = 2,
+}
+T_timer_mode;
+
+#define XMID_TIMER_EX 1
+
+// Starts a timer
+// --------------
+DWORD xtm_startmsgtimer(
+ DWORD qid,
+ T_timer_mode mode,
+ DWORD interval,
+ DWORD userdata,
+ BYTE owner_ctrl,
+ DWORD *tmid
+ );
+
+// Stops a timer
+// -------------
+DWORD xtm_stopmsgtimer(
+ DWORD tmid
+ );
+//----------------------------------------------------------------------
+// TIME FUNCTIONS
+//----------------------------------------------------------------------
+
+// Wake up after n milliseconds
+// ----------------------------
+DWORD xtm_wkafter(
+ DWORD ms
+ );
+
+// Returns system time in ms.
+// --------------------------
+DWORD xtm_gettime(
+ void
+ );
+
+// Returns in ms the difference between two times
+// ----------------------------------------------
+DWORD xtm_timediff(
+ DWORD time1,
+ DWORD time2
+ );
+
+// Returns the elapsed time since the given time
+// ---------------------------------------------
+DWORD xtm_elapse(
+ DWORD time
+ );
+
+// Gets a time stamp in ms and s.
+// -----------------------------
+DWORD xtm_gettimestamp(
+ DWORD *microseconds,
+ DWORD *seconds
+ );
+//----------------------------------------------------------------------
+// MISCELLANEOUS
+//----------------------------------------------------------------------
+//#define dbg_print DbgPrint
+//DWORD __cdecl DbgPrint(char *fmt,...);
+
+extern DWORD tosca_hardITABLE[14];
+extern WORD tosca_softITABLE[28]; // TOSCA Interrupt table visible to MSW
+extern int rapi_init(void);
+extern void rapi_exit(void);
+#define rapi_lock()
+#define rapi_unlock()
+ //#define rapi_lock() do_rapi_lock(__FUNCTION__)
+ //#define rapi_unlock() do_rapi_unlock(__FUNCTION__)
+extern void do_rapi_lock(const char *func);
+extern void do_rapi_unlock(const char *func);
+extern void tosca_interrupt(void);
+
+//----------------------------------------------------------------------
+// END
+//----------------------------------------------------------------------
+#ifdef __cplusplus
+} //extern "C"
+#endif
+
+#endif // __rapi__h_
Added: dists/trunk/modules/unicorn/unicorn/include/tracetool.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/tracetool.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+#define PRINT_DETAIL PRINT_INFO
+#define PRINTT_RMESSAGE PRINT_INFO
+#define PRINTT_CMESSAGE PRINT_INFO
+
+#ifdef DEBUG
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int PRINT_INFO(const char *format, ...);
+extern int PRINT_WARNING(const char *format, ...);
+extern int PRINT_ERROR(const char *format, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#else
+
+#define PRINT_INFO(fmt,arg...) do {} while (0)
+#define PRINT_WARNING(fmt,arg...) do {} while (0)
+#define PRINT_ERROR(fmt,arg...) do {} while (0)
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/types.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/types.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,48 @@
+#ifndef __TYPES_H__
+#define __TYPES_H__
+
+#ifndef FAR
+#define FAR
+#endif
+#ifndef VOID
+#define VOID void
+#endif
+#ifndef CALLBACK
+#define CALLBACK _stdcall
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+typedef unsigned char BYTE, *PBYTE, *PUCHAR, FAR *LPBYTE, BOOL;
+typedef unsigned short WORD, *PWORD, FAR *LPWORD;
+typedef unsigned long DWORD, *PDWORD, FAR * LPDWORD;
+typedef unsigned int UINT;
+typedef unsigned long ULONG;
+typedef long int LONG;
+typedef unsigned long long ULONGLONG;
+typedef char *PSTR, FAR *LPSTR;
+typedef const char *PCSTR, FAR *LPCSTR;
+typedef void *PVOID, FAR *LPVOID;
+typedef int BOOLEAN;
+#ifndef __cplusplus
+typedef int bool;
+#endif
+
+
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+#ifndef MIN
+#define MIN(a,b) (((a)>(b))?(b):(a))
+#endif
+
+#ifndef offsetof
+#define offsetof(typ,id) (unsigned)&(((typ*)0)->id)
+#endif
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/unicorn.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/unicorn.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,139 @@
+#ifndef __unicorn_h__
+#define __unicorn_h__
+
+#define MAX_DEVICES 1
+
+#define UNICORN_ATM_NAME "atm0"
+#define UNICORN_ETH_NAME "dsl0"
+
+#define ATM_MSW_CTL _IOW('a',ATMIOC_PHYPRV+0,struct atmif_sioc)
+#define ETH_MSW_CTL SIOCDEVPRIVATE
+
+
+typedef struct {
+ unsigned long code;
+ unsigned long subcode;
+ unsigned long retcode;
+ void *buffer;
+ unsigned long length;
+} T_MswCtrl;
+
+typedef struct {
+ unsigned long State;
+ unsigned long Report;
+ unsigned long Failure;
+ unsigned long TimeCnctd;
+ unsigned long long RcvdCells;
+ unsigned long long SentCells;
+} T_StateInfo;
+
+#define ATM_OAM_F4 0xF4
+#define ATM_OAM_F5 0xF5
+
+typedef struct {
+ int type;
+ int vpi;
+ int vci;
+} T_atm_channel;
+
+typedef struct {
+ unsigned long tx_LB;
+ unsigned long rx_AIS;
+ unsigned long rx_RDI;
+ unsigned long rx_CC;
+ unsigned long rx_ne_LB;
+ unsigned long rx_fe_LB;
+} T_oam_stats;
+
+// holds the global ADSL status returned to the ATM driver
+typedef enum {
+ ADSL_STATUS_NOHARDWARE, // No hardware detected
+ ADSL_STATUS_NOLINK, // Hardware detected / No link
+ ADSL_STATUS_ATMREADY // Hardware detected / On line
+} ADSL_STATUS;
+
+// code 0-31 for MSW
+#define MSW_CTL_INIT 0 // For msw_init()
+#define MSW_CTL_EXIT 1 // For msw_exit()
+#define MSW_CTL_START 2 // For msw_start()
+#define MSW_CTL_STOP 3 // For msw_stop()
+#define MSW_CTL_SET_CONFIG 4 // For AMSW_ANT_getModemConfiguration()
+#define MSW_CTL_GET_CONFIG 5 // For AMSW_ANT_setModemConfiguration()
+#define MSW_CTL_REQ_CHANGE 6 // For AMSW_ANT_requestModemStateChange
+#define MSW_CTL_GET_DATA 7 // For AMSW_ANT_getData()
+#define MSW_CTL_GET_STATE 8 // For AMSW_ANT_getModemState()
+#define MSW_CTL_DYING_GASP 9 // For AMSW_ANT_dyingGasp()
+#define MSW_CTL_WAIT_EVENT 10 // Wait for MSW event
+#define MSW_CTL_CANCEL_WAIT 11 // Cancel wait event ioctl
+#define MSW_CTL_VERSION_INFO 12 // Get the driver version
+#define MSW_CTL_STATE_INFO 13 // Get last status information from MSW
+#define MSW_CTL_SPY 14 // Execute a SPY command
+#define MSW_CTL_SETCARRIERCONSTELLATION 15 // to select the Constellation to re
+
+#define MSW_CTL_SET_DEBUG_LEVEL 16 // set DebugLevel
+#define MSW_CTL_SET_MSW_DEBUG_LEVEL 17 // set MswDebugLevel
+
+// code 32-63 for NET
+#define NET_CTL_SET_VPI_VCI 32
+#define NET_CTL_GET_VPI_VCI 33
+#define NET_CTL_TX_OAM_CELL 34
+#define NET_CTL_GET_OAM_STATS 35
+#define NET_CTL_RESET_OAM_STATS 36
+
+struct unicorn_dev;
+
+/*
+ Called by ATM driver to get a pointer to the next cell to transmit or receive.
+*/
+typedef unsigned char * (*unicorn_getcell_t)(struct unicorn_dev *dev);
+
+/*
+ Called by ATM driver start transmitting cells.
+*/
+typedef int (*unicorn_start_transmit_t)(struct unicorn_dev *dev);
+
+/*
+ Called by ATM driver for MSW ioctl's.
+*/
+typedef int (*unicorn_msw_control_t)(struct unicorn_dev *dev,T_MswCtrl *ctrl);
+
+/*
+ Called by ATM driver to get the ADSL status
+*/
+typedef ADSL_STATUS (*unicorn_get_adsl_status_t)(struct unicorn_dev *dev);
+
+/*
+ Called by ATM driver to get the ADSL link speed in Kbits/sec
+*/
+typedef int (*unicorn_get_adsl_linkspeed_t)(struct unicorn_dev *dev,
+ unsigned long *us_rate,unsigned long *ds_rate);
+
+/*
+ Entrypoints for the USB/PCI driver
+*/
+typedef struct unicorn_entrypoints {
+ struct unicorn_dev *dev; /* Private data for USB/PCI driver */
+ unicorn_getcell_t snd_getcell;
+ unicorn_getcell_t rcv_getcell;
+ unicorn_start_transmit_t start_transmit;
+ unicorn_msw_control_t msw_control;
+ unicorn_get_adsl_status_t get_adsl_status;
+ unicorn_get_adsl_linkspeed_t get_adsl_linkspeed;
+} unicorn_entrypoints_t;
+
+/*
+ Called by BUS driver when driver loaded (attached)
+*/
+extern int unicorn_attach(struct unicorn_entrypoints *entrypoints);
+
+/*
+ Called by BUS driver when driver unloaded (detached)
+*/
+extern int unicorn_detach(void);
+
+/*
+ Called by BUS driver when HW timer expires
+*/
+extern int unicorn_timer(void);
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/include/verstr.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/include/verstr.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,3 @@
+#ifndef VERSTR
+#define VERSTR "$Revision: 0.5.0 $ time " __TIME__ " " __DATE__
+#endif
Added: dists/trunk/modules/unicorn/unicorn/libm/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,39 @@
+#make parameters
+
+SINGLE_PRECISION=1
+DOUBLE_PRECISION=1
+
+CC=gcc
+LD=ld
+
+CFLAGS = -O2 -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -Wno-comment
+
+OBJS :=
+ifdef SINGLE_PRECISION
+OBJS += e_powf.o e_log10f.o e_logf.o e_sqrtf.o s_ceilf.o s_floorf.o s_isinf.o
+OBJS += s_fabsf.o
+OBJS += s_scalbnf.o s_copysignf.o s_truncf.o s_sinf.o k_sinf.o k_cosf.o e_rem_pio2f.o k_rem_pio2f.o
+endif
+ifdef DOUBLE_PRECISION
+OBJS += e_pow.o e_log10.o e_log.o e_sqrt.o s_ceil.o s_floor.o
+OBJS += s_fabs.o
+OBJS += s_scalbn.o s_copysign.o s_trunc.o s_sin.o k_sin.o k_cos.o e_rem_pio2.o k_rem_pio2.o
+endif
+
+modules: libm
+
+libm: $(OBJS) libm.a
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+libm.a: $(OBJS)
+ $(LD) -r -o libm.a $(OBJS)
+
+modules_install: modules
+
+clean:
+ /bin/rm -f *~
+ /bin/rm -f *.s
+ /bin/rm -f *.o
+ /bin/rm -f *.a
Added: dists/trunk/modules/unicorn/unicorn/libm/e_log.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_log.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,204 @@
+/* @(#)e_log.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+/* Modified by Naohiko Shimizu/Tokai University, Japan 1997/08/25,
+ for performance improvement on pipelined processors.
+*/
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $";
+#endif
+
+/* __ieee754_log(x)
+ * Return the logarithm of x
+ *
+ * Method :
+ * 1. Argument Reduction: find k and f such that
+ * x = 2^k * (1+f),
+ * where sqrt(2)/2 < 1+f < sqrt(2) .
+ *
+ * 2. Approximation of log(1+f).
+ * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
+ * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
+ * = 2s + s*R
+ * We use a special Reme algorithm on [0,0.1716] to generate
+ * a polynomial of degree 14 to approximate R The maximum error
+ * of this polynomial approximation is bounded by 2**-58.45. In
+ * other words,
+ * 2 4 6 8 10 12 14
+ * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s
+ * (the values of Lg1 to Lg7 are listed in the program)
+ * and
+ * | 2 14 | -58.45
+ * | Lg1*s +...+Lg7*s - R(z) | <= 2
+ * | |
+ * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
+ * In order to guarantee error in log below 1ulp, we compute log
+ * by
+ * log(1+f) = f - s*(f - R) (if f is not too large)
+ * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy)
+ *
+ * 3. Finally, log(x) = k*ln2 + log(1+f).
+ * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
+ * Here ln2 is split into two floating point number:
+ * ln2_hi + ln2_lo,
+ * where n*ln2_hi is always exact for |n| < 2000.
+ *
+ * Special cases:
+ * log(x) is NaN with signal if x < 0 (including -INF) ;
+ * log(+INF) is +INF; log(0) is -INF with signal;
+ * log(NaN) is that NaN with no signal.
+ *
+ * Accuracy:
+ * according to an error analysis, the error is always less than
+ * 1 ulp (unit in the last place).
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include <math.h>
+#include "math_private.h"
+#define half Lg[8]
+#define two Lg[9]
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
+ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
+two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
+ Lg[] = {0.0,
+ 6.666666666666735130e-01, /* 3FE55555 55555593 */
+ 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
+ 2.857142874366239149e-01, /* 3FD24924 94229359 */
+ 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
+ 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
+ 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
+ 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */
+ 0.5,
+ 2.0};
+#ifdef __STDC__
+static const double zero = 0.0;
+#else
+static double zero = 0.0;
+#endif
+
+#ifdef __STDC__
+ double log(double x)
+#else
+ double log(x)
+ double x;
+#endif
+{
+ double hfsq,f,s,z,R,w,dk,t11,t12,t21,t22,w2,zw2;
+#ifdef DO_NOT_USE_THIS
+ double t1,t2;
+#endif
+ int32_t k,hx,i,j;
+ u_int32_t lx;
+
+ EXTRACT_WORDS(hx,lx,x);
+
+
+ k=0;
+ if (hx < 0x00100000) { /* x < 2**-1022 */
+ if (((hx&0x7fffffff)|lx)==0)
+ {
+ return -two54/(x-x); /* log(+-0)=-inf */
+ }
+ if (hx<0)
+ {
+ return (x-x)/(x-x); /* log(-#) = NaN */
+ }
+ k -= 54; x *= two54; /* subnormal number, scale up x */
+ GET_HIGH_WORD(hx,x);
+ }
+ if (hx >= 0x7ff00000)
+ {
+ return x+x;
+ }
+ k += (hx>>20)-1023;
+ hx &= 0x000fffff;
+ i = (hx+0x95f64)&0x100000;
+ SET_HIGH_WORD(x,hx|(i^0x3ff00000)); /* normalize x or x/2 */
+ k += (i>>20);
+ f = x-1.0;
+ if((0x000fffff&(2+hx))<3) { /* |f| < 2**-20 */
+ if(f==zero)
+ {
+ if(k==0)
+ {
+ return zero;
+ }
+ else
+ {
+ dk=(double)k;
+ return dk*ln2_hi+dk*ln2_lo;
+ }
+ }
+ R = f*f*(half-0.33333333333333333*f);
+ if(k==0)
+ {
+ return f-R;
+ }
+ else
+ {
+ dk=(double)k;
+ return dk*ln2_hi-((R-dk*ln2_lo)-f);
+ }
+ }
+ s = f/(two+f);
+ dk = (double)k;
+ z = s*s;
+ i = hx-0x6147a;
+ w = z*z;
+ j = 0x6b851-hx;
+#ifdef DO_NOT_USE_THIS
+ t1= w*(Lg2+w*(Lg4+w*Lg6));
+ t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+ R = t2+t1;
+#else
+ t21 = Lg[5]+w*Lg[7]; w2=w*w;
+ t22 = Lg[1]+w*Lg[3]; zw2=z*w2;
+ t11 = Lg[4]+w*Lg[6];
+ t12 = w*Lg[2];
+ R = t12 + w2*t11 + z*t22 + zw2*t21;
+#endif
+ i |= j;
+ if(i>0)
+ {
+ hfsq=0.5*f*f;
+ if(k==0)
+ {
+ return f-(hfsq-s*(hfsq+R));
+ }
+ else
+ {
+ return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
+ }
+ }
+ else
+ {
+ if(k==0)
+ {
+ return f-s*(f-R);
+ }
+ else
+ {
+ return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
+ }
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_log10.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_log10.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,107 @@
+/* @(#)e_log10.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $";
+#endif
+
+/* __ieee754_log10(x)
+ * Return the base 10 logarithm of x
+ *
+ * Method :
+ * Let log10_2hi = leading 40 bits of log10(2) and
+ * log10_2lo = log10(2) - log10_2hi,
+ * ivln10 = 1/log(10) rounded.
+ * Then
+ * n = ilogb(x),
+ * if(n<0) n = n+1;
+ * x = scalbn(x,-n);
+ * log10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
+ *
+ * Note 1:
+ * To guarantee log10(10**n)=n, where 10**n is normal, the rounding
+ * mode must set to Round-to-Nearest.
+ * Note 2:
+ * [1/log(10)] rounded to 53 bits has error .198 ulps;
+ * log10 is monotonic at all binary break points.
+ *
+ * Special cases:
+ * log10(x) is NaN with signal if x < 0;
+ * log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
+ * log10(NaN) is that NaN with no signal;
+ * log10(10**N) = N for N=0,1,...,22.
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following constants.
+ * The decimal values may be used, provided that the compiler will convert
+ * from decimal to binary accurately enough to produce the hexadecimal values
+ * shown.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
+ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
+log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
+log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
+
+#ifdef __STDC__
+static const double zero = 0.0;
+#else
+static double zero = 0.0;
+#endif
+
+#ifdef __STDC__
+ double log10(double x)
+#else
+ double log10(x)
+ double x;
+#endif
+{
+ double y,z;
+ int32_t i,k,hx;
+ u_int32_t lx;
+ EXTRACT_WORDS(hx,lx,x);
+
+ k=0;
+ if (hx < 0x00100000) { /* x < 2**-1022 */
+ if (((hx&0x7fffffff)|lx)==0)
+ {
+ return -two54/(x-x); /* log(+-0)=-inf */
+ }
+ if (hx<0)
+ {
+ return (x-x)/(x-x); /* log(-#) = NaN */
+ }
+ k -= 54; x *= two54; /* subnormal number, scale up x */
+ GET_HIGH_WORD(hx,x);
+ }
+ if (hx >= 0x7ff00000)
+ {
+ return x+x;
+ }
+ k += (hx>>20)-1023;
+ i = ((u_int32_t)k&0x80000000)>>31;
+ hx = (hx&0x000fffff)|((0x3ff-i)<<20);
+ y = (double)(k+i);
+ SET_HIGH_WORD(x,hx);
+
+ z = y*log10_2lo + ivln10*log(x);
+ return z+y*log10_2hi;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/libm/e_log10f.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_log10f.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,66 @@
+/* e_log10f.c -- float version of e_log10.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_log10f.c,v 1.5 1995/05/10 20:45:53 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+two25 = 3.3554432000e+07, /* 0x4c000000 */
+ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */
+log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */
+log10_2lo = 7.9034151668e-07; /* 0x355427db */
+
+#ifdef __STDC__
+static const float zero = 0.0;
+#else
+static float zero = 0.0;
+#endif
+
+#ifdef __STDC__
+ float log10f(float x)
+#else
+ float log10f(x)
+ float x;
+#endif
+{
+ float y,z;
+ int32_t i,k,hx;
+ GET_FLOAT_WORD(hx,x);
+
+ k=0;
+ if (hx < 0x00800000) { /* x < 2**-126 */
+ if ((hx&0x7fffffff)==0)
+ return -two25/(x-x); /* log(+-0)=-inf */
+ if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
+ k -= 25; x *= two25; /* subnormal number, scale up x */
+ GET_FLOAT_WORD(hx,x);
+ }
+ if (hx >= 0x7f800000) return x+x;
+ k += (hx>>23)-127;
+ i = ((u_int32_t)k&0x80000000)>>31;
+ hx = (hx&0x007fffff)|((0x7f-i)<<23);
+ y = (float)(k+i);
+ SET_FLOAT_WORD(x,hx);
+ z = y*log10_2lo + ivln10*logf(x);
+ return z+y*log10_2hi;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_logf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_logf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,98 @@
+/* e_logf.c -- float version of e_log.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_logf.c,v 1.4 1995/05/10 20:45:54 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
+ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
+two25 = 3.355443200e+07, /* 0x4c000000 */
+Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
+Lg2 = 4.0000000596e-01, /* 3ECCCCCD */
+Lg3 = 2.8571429849e-01, /* 3E924925 */
+Lg4 = 2.2222198546e-01, /* 3E638E29 */
+Lg5 = 1.8183572590e-01, /* 3E3A3325 */
+Lg6 = 1.5313838422e-01, /* 3E1CD04F */
+Lg7 = 1.4798198640e-01; /* 3E178897 */
+
+#ifdef __STDC__
+static const float zero = 0.0;
+#else
+static float zero = 0.0;
+#endif
+
+#ifdef __STDC__
+ float logf(float x)
+#else
+ float logf(x)
+ float x;
+#endif
+{
+ float hfsq,f,s,z,R,w,t1,t2,dk;
+ int32_t k,ix,i,j;
+ GET_FLOAT_WORD(ix,x);
+
+ k=0;
+ if (ix < 0x00800000) { /* x < 2**-126 */
+ if ((ix&0x7fffffff)==0)
+ return -two25/(x-x); /* log(+-0)=-inf */
+ if (ix<0) return (x-x)/(x-x); /* log(-#) = NaN */
+ k -= 25; x *= two25; /* subnormal number, scale up x */
+ GET_FLOAT_WORD(ix,x);
+ }
+ if (ix >= 0x7f800000) return x+x;
+ k += (ix>>23)-127;
+ ix &= 0x007fffff;
+ i = (ix+(0x95f64<<3))&0x800000;
+ SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */
+ k += (i>>23);
+ f = x-(float)1.0;
+ if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */
+ if(f==zero) {
+ if(k==0) return zero; else {dk=(float)k;
+ return dk*ln2_hi+dk*ln2_lo;}
+ }
+ R = f*f*((float)0.5-(float)0.33333333333333333*f);
+ if(k==0) return f-R; else {dk=(float)k;
+ return dk*ln2_hi-((R-dk*ln2_lo)-f);}
+ }
+ s = f/((float)2.0+f);
+ dk = (float)k;
+ z = s*s;
+ i = ix-(0x6147a<<3);
+ w = z*z;
+ j = (0x6b851<<3)-ix;
+ t1= w*(Lg2+w*(Lg4+w*Lg6));
+ t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+ i |= j;
+ R = t2+t1;
+ if(i>0) {
+ hfsq=(float)0.5*f*f;
+ if(k==0) return f-(hfsq-s*(hfsq+R)); else
+ return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
+ } else {
+ if(k==0) return f-s*(f-R); else
+ return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_pow.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_pow.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,402 @@
+/* @(#)e_pow.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+/* Modified by Naohiko Shimizu/Tokai University, Japan 1997/08/25,
+ for performance improvement on pipelined processors.
+*/
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_pow.c,v 1.9 1995/05/12 04:57:32 jtc Exp $";
+#endif
+
+/* __ieee754_pow(x,y) return x**y
+ *
+ * n
+ * Method: Let x = 2 * (1+f)
+ * 1. Compute and return log2(x) in two pieces:
+ * log2(x) = w1 + w2,
+ * where w1 has 53-24 = 29 bit trailing zeros.
+ * 2. Perform y*log2(x) = n+y' by simulating muti-precision
+ * arithmetic, where |y'|<=0.5.
+ * 3. Return x**y = 2**n*exp(y'*log2)
+ *
+ * Special cases:
+ * 1. (anything) ** 0 is 1
+ * 2. (anything) ** 1 is itself
+ * 3. (anything) ** NAN is NAN
+ * 4. NAN ** (anything except 0) is NAN
+ * 5. +-(|x| > 1) ** +INF is +INF
+ * 6. +-(|x| > 1) ** -INF is +0
+ * 7. +-(|x| < 1) ** +INF is +0
+ * 8. +-(|x| < 1) ** -INF is +INF
+ * 9. +-1 ** +-INF is NAN
+ * 10. +0 ** (+anything except 0, NAN) is +0
+ * 11. -0 ** (+anything except 0, NAN, odd integer) is +0
+ * 12. +0 ** (-anything except 0, NAN) is +INF
+ * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF
+ * 14. -0 ** (odd integer) = -( +0 ** (odd integer) )
+ * 15. +INF ** (+anything except 0,NAN) is +INF
+ * 16. +INF ** (-anything except 0,NAN) is +0
+ * 17. -INF ** (anything) = -0 ** (-anything)
+ * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer)
+ * 19. (-anything except 0 and inf) ** (non-integer) is NAN
+ *
+ * Accuracy:
+ * pow(x,y) returns x**y nearly rounded. In particular
+ * pow(integer,integer)
+ * always returns the correct integer provided it is
+ * representable.
+ *
+ * Constants :
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "math.h"
+#include "math_private.h"
+#define zero C[0]
+#define one C[1]
+#define two C[2]
+#define two53 C[3]
+#define huge C[4]
+#define tiny C[5]
+#define L1 C[6]
+#define L2 C[7]
+#define L3 C[8]
+#define L4 C[9]
+#define L5 C[10]
+#define L6 C[11]
+#define P1 C[12]
+#define P2 C[13]
+#define P3 C[14]
+#define P4 C[15]
+#define P5 C[16]
+#define lg2 C[17]
+#define lg2_h C[18]
+#define lg2_l C[19]
+#define ovt C[20]
+#define cp C[21]
+#define cp_h C[22]
+#define cp_l C[23]
+#define ivln2 C[24]
+#define ivln2_h C[25]
+#define ivln2_l C[26]
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+bp[] = {1.0, 1.5,},
+dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */
+dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */
+C[] = {
+0.0,
+1.0,
+2.0,
+9007199254740992.0 ,
+1.0e300,
+1.0e-300,
+5.99999999999994648725e-01 ,
+4.28571428578550184252e-01 ,
+3.33333329818377432918e-01 ,
+2.72728123808534006489e-01 ,
+2.30660745775561754067e-01 ,
+2.06975017800338417784e-01 ,
+1.66666666666666019037e-01 ,
+-2.77777777770155933842e-03 ,
+6.61375632143793436117e-05 ,
+-1.65339022054652515390e-06 ,
+4.13813679705723846039e-08 ,
+6.93147180559945286227e-01 ,
+6.93147182464599609375e-01 ,
+-1.90465429995776804525e-09 ,
+8.0085662595372944372e-0017 ,
+9.61796693925975554329e-01 ,
+9.61796700954437255859e-01 ,
+-7.02846165095275826516e-09 ,
+1.44269504088896338700e+00 ,
+1.44269502162933349609e+00 ,
+1.92596299112661746887e-08 };
+
+#ifdef __STDC__
+ double pow(double x, double y)
+#else
+ double pow(x,y)
+ double x, y;
+#endif
+{
+ double z,ax,z_h,z_l,p_h,p_l;
+ double y1,t1,t2,r,s,t,u,v,w, t12,t14,r_1,r_2,r_3;
+ int32_t i,j,k,yisint,n;
+ int32_t hx,hy,ix,iy;
+ u_int32_t lx,ly;
+ EXTRACT_WORDS(hx,lx,x);
+ EXTRACT_WORDS(hy,ly,y);
+ ix = hx&0x7fffffff; iy = hy&0x7fffffff;
+
+ /* y==zero: x**0 = 1 */
+ if((iy|ly)==0)
+ {
+ return C[1];
+ }
+
+ /* +-NaN return x+y */
+ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||
+ iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0)))
+ {
+ return x+y;
+ }
+ /* determine if y is an odd int when x < 0
+ * yisint = 0 ... y is not an integer
+ * yisint = 1 ... y is an odd int
+ * yisint = 2 ... y is an even int
+ */
+ yisint = 0;
+ if(hx<0) {
+ if(iy>=0x43400000) yisint = 2; /* even integer y */
+ else if(iy>=0x3ff00000) {
+ k = (iy>>20)-0x3ff; /* exponent */
+ if(k>20) {
+ j = ly>>(52-k);
+ if((u_int32_t)(j<<(52-k))==ly) yisint = 2-(j&1);
+ } else if(ly==0) {
+ j = iy>>(20-k);
+ if((int32_t)(j<<(20-k))==iy) yisint = 2-(j&1);
+ }
+ }
+ }
+
+ /* special value of y */
+ if(ly==0) {
+ if (iy==0x7ff00000) { /* y is +-inf */
+ if(((ix-0x3ff00000)|lx)==0)
+ {
+ return y - y; /* inf**+-1 is NaN */
+ }
+ else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */
+ {
+ return (hy>=0)? y: C[0];
+ }
+ else /* (|x|<1)**-,+inf = inf,0 */
+ {
+ return (hy<0)?-y: C[0];
+ }
+ }
+
+ if(iy==0x3ff00000)
+ { /* y is +-1 */
+ if(hy<0)
+ {
+ return C[1]/x;
+ }
+ else
+ {
+ return x;
+ }
+ }
+ if(hy==0x40000000)
+ {
+ return x*x; /* y is 2 */
+ }
+ if(hy==0x3fe00000)
+ { /* y is 0.5 */
+ if(hx>=0) /* x >= +0 */
+ {
+ return (sqrt(x));
+ }
+ }
+ }
+ ax = fabs(x);
+ /* special value of x */
+ if(lx==0) {
+ if(ix==0x7ff00000||ix==0||ix==0x3ff00000){
+ z = ax; /*x is +-0,+-inf,+-1*/
+ if(hy<0) z = C[1]/z; /* z = (1/|x|) */
+ if(hx<0) {
+ if(((ix-0x3ff00000)|yisint)==0) {
+ z = (z-z)/(z-z); /* (-1)**non-int is NaN */
+ } else if(yisint==1)
+ z = -z; /* (x<0)**odd = -(|x|**odd) */
+ }
+ return z;
+ }
+ }
+
+ /* (x<0)**(non-int) is NaN */
+ if(((((u_int32_t)hx>>31)-1)|yisint)==0)
+ {
+ return (x-x)/(x-x);
+ }
+
+ /* |y| is huge */
+ if(iy>0x41e00000) { /* if |y| > 2**31 */
+ if(iy>0x43f00000){ /* if |y| > 2**64, must o/uflow */
+ if(ix<=0x3fefffff)
+ {
+ return (hy<0)? C[4]*C[4]:C[5]*C[5];
+ }
+ if(ix>=0x3ff00000)
+ {
+ return (hy>0)? C[4]*C[4]:C[5]*C[5];
+ }
+ }
+ /* over/underflow if x is not close to one */
+ if(ix<0x3fefffff)
+ {
+ return (hy<0)? C[4]*C[4]:C[5]*C[5];
+ }
+ if(ix>0x3ff00000)
+ {
+ return (hy>0)? C[4]*C[4]:C[5]*C[5];
+ }
+ /* now |1-x| is tiny <= 2**-20, suffice to compute
+ log(x) by x-x^2/2+x^3/3-x^4/4 */
+ t = x-1; /* t has 20 trailing zeros */
+ w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25));
+ u = C[25]*t; /* ivln2_h has 21 sig. bits */
+ v = t*C[26]-w*C[24];
+ t1 = u+v;
+ SET_LOW_WORD(t1,0);
+ t2 = v-(t1-u);
+ } else {
+ double s2,s_h,s_l,t_h,t_l,s22,s24,s26,r1,r2,r3;
+ n = 0;
+ /* take care subnormal number */
+ if(ix<0x00100000)
+ {ax *= C[3]; n -= 53; GET_HIGH_WORD(ix,ax); }
+ n += ((ix)>>20)-0x3ff;
+ j = ix&0x000fffff;
+ /* determine interval */
+ ix = j|0x3ff00000; /* normalize ix */
+ if(j<=0x3988E) k=0; /* |x|<sqrt(3/2) */
+ else if(j<0xBB67A) k=1; /* |x|<sqrt(3) */
+ else {k=0;n+=1;ix -= 0x00100000;}
+ SET_HIGH_WORD(ax,ix);
+
+ /* compute s = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
+ u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
+ v = C[1]/(ax+bp[k]);
+ s = u*v;
+ s_h = s;
+ SET_LOW_WORD(s_h,0);
+ /* t_h=ax+bp[k] High */
+ t_h = C[0];
+ SET_HIGH_WORD(t_h,((ix>>1)|0x20000000)+0x00080000+(k<<18));
+ t_l = ax - (t_h-bp[k]);
+ s_l = v*((u-s_h*t_h)-s_h*t_l);
+ /* compute log(ax) */
+ s2 = s*s;
+#ifdef DO_NOT_USE_THIS
+ r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));
+#else
+ r1 = C[10]+s2*C[11]; s22=s2*s2;
+ r2 = C[8]+s2*C[9]; s24=s22*s22;
+ r3 = C[6]+s2*C[7]; s26=s24*s22;
+ r = r3*s22 + r2*s24 + r1*s26;
+#endif
+ r += s_l*(s_h+s);
+ s2 = s_h*s_h;
+ t_h = 3.0+s2+r;
+ SET_LOW_WORD(t_h,0);
+ t_l = r-((t_h-3.0)-s2);
+ /* u+v = s*(1+...) */
+ u = s_h*t_h;
+ v = s_l*t_h+t_l*s;
+ /* 2/(3log2)*(s+...) */
+ p_h = u+v;
+ SET_LOW_WORD(p_h,0);
+ p_l = v-(p_h-u);
+ z_h = C[22]*p_h; /* cp_h+cp_l = 2/(3*log2) */
+ z_l = C[23]*p_h+p_l*C[21]+dp_l[k];
+ /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */
+ t = (double)n;
+ t1 = (((z_h+z_l)+dp_h[k])+t);
+ SET_LOW_WORD(t1,0);
+ t2 = z_l-(((t1-t)-dp_h[k])-z_h);
+ }
+
+ s = C[1]; /* s (sign of result -ve**odd) = -1 else = 1 */
+ if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
+ s = -C[1];/* (-ve)**(odd int) */
+
+ /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
+ y1 = y;
+ SET_LOW_WORD(y1,0);
+ p_l = (y-y1)*t1+y*t2;
+ p_h = y1*t1;
+ z = p_l+p_h;
+ EXTRACT_WORDS(j,i,z);
+ if (j>=0x40900000) { /* z >= 1024 */
+ if(((j-0x40900000)|i)!=0) /* if z > 1024 */
+ {
+ return s*C[4]*C[4]; /* overflow */
+ }
+ else
+ {
+ if(p_l+C[20]>z-p_h)
+ {
+ return s*C[4]*C[4]; /* overflow */
+ }
+ }
+ } else if((j&0x7fffffff)>=0x4090cc00 ) { /* z <= -1075 */
+ if(((j-0xc090cc00)|i)!=0) /* z < -1075 */
+ {
+ return s*C[5]*C[5]; /* underflow */
+ }
+ else
+ {
+ if(p_l<=z-p_h)
+ {
+ return s*C[5]*C[5]; /* underflow */
+ }
+ }
+ }
+ /*
+ * compute 2**(p_h+p_l)
+ */
+ i = j&0x7fffffff;
+ k = (i>>20)-0x3ff;
+ n = 0;
+ if(i>0x3fe00000) { /* if |z| > 0.5, set n = [z+0.5] */
+ n = j+(0x00100000>>(k+1));
+ k = ((n&0x7fffffff)>>20)-0x3ff; /* new k for n */
+ t = C[0];
+ SET_HIGH_WORD(t,n&~(0x000fffff>>k));
+ n = ((n&0x000fffff)|0x00100000)>>(20-k);
+ if(j<0) n = -n;
+ p_h -= t;
+ }
+ t = p_l+p_h;
+ SET_LOW_WORD(t,0);
+ u = t*C[18];
+ v = (p_l-(t-p_h))*C[17]+t*C[19];
+ z = u+v;
+ w = v-(z-u);
+ t = z*z;
+#ifdef DO_NOT_USE_THIS
+ t1 = z - t*(C[12]+t*(C[13]+t*(C[14]+t*(C[15]+t*C[16]))));
+#else
+ r_1 = C[15]+t*C[16]; t12 = t*t;
+ r_2 = C[13]+t*C[14]; t14 = t12*t12;
+ r_3 = t*C[12];
+ t1 = z - r_3 - t12*r_2 - t14*r_1;
+#endif
+ r = (z*t1)/(t1-C[2])-(w+z*w);
+ z = C[1]-(r-z);
+ GET_HIGH_WORD(j,z);
+ j += (n<<20);
+ if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */
+ else SET_HIGH_WORD(z,j);
+ return s*z;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_powf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_powf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,262 @@
+/* e_powf.c -- float version of e_pow.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_powf.c,v 1.7 1996/04/08 15:43:44 phil Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+static const float huge = 1.0e+30, tiny = 1.0e-30;
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+bp[] = {1.0, 1.5,},
+dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */
+dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */
+zero = 0.0,
+one = 1.0,
+two = 2.0,
+two24 = 16777216.0, /* 0x4b800000 */
+ /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
+L1 = 6.0000002384e-01, /* 0x3f19999a */
+L2 = 4.2857143283e-01, /* 0x3edb6db7 */
+L3 = 3.3333334327e-01, /* 0x3eaaaaab */
+L4 = 2.7272811532e-01, /* 0x3e8ba305 */
+L5 = 2.3066075146e-01, /* 0x3e6c3255 */
+L6 = 2.0697501302e-01, /* 0x3e53f142 */
+P1 = 1.6666667163e-01, /* 0x3e2aaaab */
+P2 = -2.7777778450e-03, /* 0xbb360b61 */
+P3 = 6.6137559770e-05, /* 0x388ab355 */
+P4 = -1.6533901999e-06, /* 0xb5ddea0e */
+P5 = 4.1381369442e-08, /* 0x3331bb4c */
+lg2 = 6.9314718246e-01, /* 0x3f317218 */
+lg2_h = 6.93145752e-01, /* 0x3f317200 */
+lg2_l = 1.42860654e-06, /* 0x35bfbe8c */
+ovt = 4.2995665694e-08, /* -(128-log2(ovfl+.5ulp)) */
+cp = 9.6179670095e-01, /* 0x3f76384f =2/(3ln2) */
+cp_h = 9.6179199219e-01, /* 0x3f763800 =head of cp */
+cp_l = 4.7017383622e-06, /* 0x369dc3a0 =tail of cp_h */
+ivln2 = 1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
+ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
+ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
+
+#ifdef __STDC__
+ float powf(float x, float y)
+#else
+ float powf(x,y)
+ float x, y;
+#endif
+{
+ union{float f; int i;} tmpfx;
+ union{float f; int i;} tmpfy;
+
+ float z,ax,z_h,z_l,p_h,p_l;
+ float y1,t1,t2,r,s,t,u,v,w;
+ int32_t i,j,k,yisint,n;
+ int32_t hx,hy,ix,iy,is;
+ tmpfx.f = x;
+ tmpfy.f = y;
+ GET_FLOAT_WORD(hx,x);
+ GET_FLOAT_WORD(hy,y);
+ ix = hx&0x7fffffff; iy = hy&0x7fffffff;
+
+
+ /* y==zero: x**0 = 1 */
+ if(iy==0) return one;
+
+ /* x==+-1 */
+ if(x == 1.0) return one;
+ if(x == -1.0 && isinf(y)) return one;
+
+ /* +-NaN return x+y */
+ if(ix > 0x7f800000 ||
+ iy > 0x7f800000)
+ return x+y;
+
+ /* determine if y is an odd int when x < 0
+ * yisint = 0 ... y is not an integer
+ * yisint = 1 ... y is an odd int
+ * yisint = 2 ... y is an even int
+ */
+ yisint = 0;
+ if(hx<0) {
+ if(iy>=0x4b800000) yisint = 2; /* even integer y */
+ else if(iy>=0x3f800000) {
+ k = (iy>>23)-0x7f; /* exponent */
+ j = iy>>(23-k);
+ if((j<<(23-k))==iy) yisint = 2-(j&1);
+ }
+ }
+
+ /* special value of y */
+ if (iy==0x7f800000) { /* y is +-inf */
+ if (ix==0x3f800000)
+ return y - y; /* inf**+-1 is NaN */
+ else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */
+ return (hy>=0)? y: zero;
+ else /* (|x|<1)**-,+inf = inf,0 */
+ return (hy<0)?-y: zero;
+ }
+ if(iy==0x3f800000) { /* y is +-1 */
+ if(hy<0) return one/x; else return x;
+ }
+ if(hy==0x40000000) return x*x; /* y is 2 */
+ if(hy==0x3f000000) { /* y is 0.5 */
+ if(hx>=0) /* x >= +0 */
+ return sqrtf(x);
+ }
+
+ ax = fabsf(x);
+ /* special value of x */
+ if(ix==0x7f800000||ix==0||ix==0x3f800000){
+ z = ax; /*x is +-0,+-inf,+-1*/
+ if(hy<0) z = one/z; /* z = (1/|x|) */
+ if(hx<0) {
+ if(((ix-0x3f800000)|yisint)==0) {
+ z = (z-z)/(z-z); /* (-1)**non-int is NaN */
+ } else if(yisint==1)
+ z = -z; /* (x<0)**odd = -(|x|**odd) */
+ }
+ return z;
+ }
+
+ /* (x<0)**(non-int) is NaN */
+ if(((((u_int32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
+
+ /* |y| is huge */
+ if(iy>0x4d000000) { /* if |y| > 2**27 */
+ /* over/underflow if x is not close to one */
+ if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
+ if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
+ /* now |1-x| is tiny <= 2**-20, suffice to compute
+ log(x) by x-x^2/2+x^3/3-x^4/4 */
+ t = x-1; /* t has 20 trailing zeros */
+ w = (t*t)*((float)0.5-t*((float)0.333333333333-t*(float)0.25));
+ u = ivln2_h*t; /* ivln2_h has 16 sig. bits */
+ v = t*ivln2_l-w*ivln2;
+ t1 = u+v;
+ GET_FLOAT_WORD(is,t1);
+ SET_FLOAT_WORD(t1,is&0xfffff000);
+ t2 = v-(t1-u);
+ } else {
+ float s2,s_h,s_l,t_h,t_l;
+ n = 0;
+ /* take care subnormal number */
+ if(ix<0x00800000)
+ {ax *= two24; n -= 24; GET_FLOAT_WORD(ix,ax); }
+ n += ((ix)>>23)-0x7f;
+ j = ix&0x007fffff;
+ /* determine interval */
+ ix = j|0x3f800000; /* normalize ix */
+ if(j<=0x1cc471) k=0; /* |x|<sqrt(3/2) */
+ else if(j<0x5db3d7) k=1; /* |x|<sqrt(3) */
+ else {k=0;n+=1;ix -= 0x00800000;}
+ SET_FLOAT_WORD(ax,ix);
+
+ /* compute s = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
+ u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
+ v = one/(ax+bp[k]);
+ s = u*v;
+ s_h = s;
+ GET_FLOAT_WORD(is,s_h);
+ SET_FLOAT_WORD(s_h,is&0xfffff000);
+ /* t_h=ax+bp[k] High */
+ SET_FLOAT_WORD(t_h,((ix>>1)|0x20000000)+0x0040000+(k<<21));
+ t_l = ax - (t_h-bp[k]);
+ s_l = v*((u-s_h*t_h)-s_h*t_l);
+ /* compute log(ax) */
+ s2 = s*s;
+ r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));
+ r += s_l*(s_h+s);
+ s2 = s_h*s_h;
+ t_h = (float)3.0+s2+r;
+ GET_FLOAT_WORD(is,t_h);
+ SET_FLOAT_WORD(t_h,is&0xfffff000);
+ t_l = r-((t_h-(float)3.0)-s2);
+ /* u+v = s*(1+...) */
+ u = s_h*t_h;
+ v = s_l*t_h+t_l*s;
+ /* 2/(3log2)*(s+...) */
+ p_h = u+v;
+ GET_FLOAT_WORD(is,p_h);
+ SET_FLOAT_WORD(p_h,is&0xfffff000);
+ p_l = v-(p_h-u);
+ z_h = cp_h*p_h; /* cp_h+cp_l = 2/(3*log2) */
+ z_l = cp_l*p_h+p_l*cp+dp_l[k];
+ /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */
+ t = (float)n;
+ t1 = (((z_h+z_l)+dp_h[k])+t);
+ GET_FLOAT_WORD(is,t1);
+ SET_FLOAT_WORD(t1,is&0xfffff000);
+ t2 = z_l-(((t1-t)-dp_h[k])-z_h);
+ }
+
+ s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
+ if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
+ s = -one; /* (-ve)**(odd int) */
+
+ /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
+ GET_FLOAT_WORD(is,y);
+ SET_FLOAT_WORD(y1,is&0xfffff000);
+ p_l = (y-y1)*t1+y*t2;
+ p_h = y1*t1;
+ z = p_l+p_h;
+ GET_FLOAT_WORD(j,z);
+ if (j>0x43000000) /* if z > 128 */
+ return s*huge*huge; /* overflow */
+ else if (j==0x43000000) { /* if z == 128 */
+ if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
+ }
+ else if ((j&0x7fffffff)>0x43160000) /* z <= -150 */
+ return s*tiny*tiny; /* underflow */
+ else if ((u_int32_t) j==0xc3160000){ /* z == -150 */
+ if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
+ }
+ /*
+ * compute 2**(p_h+p_l)
+ */
+ i = j&0x7fffffff;
+ k = (i>>23)-0x7f;
+ n = 0;
+ if(i>0x3f000000) { /* if |z| > 0.5, set n = [z+0.5] */
+ n = j+(0x00800000>>(k+1));
+ k = ((n&0x7fffffff)>>23)-0x7f; /* new k for n */
+ SET_FLOAT_WORD(t,n&~(0x007fffff>>k));
+ n = ((n&0x007fffff)|0x00800000)>>(23-k);
+ if(j<0) n = -n;
+ p_h -= t;
+ }
+ t = p_l+p_h;
+ GET_FLOAT_WORD(is,t);
+ SET_FLOAT_WORD(t,is&0xfffff000);
+ u = t*lg2_h;
+ v = (p_l-(t-p_h))*lg2+t*lg2_l;
+ z = u+v;
+ w = v-(z-u);
+ t = z*z;
+ t1 = z - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
+ r = (z*t1)/(t1-two)-(w+z*w);
+ z = one-(r-z);
+ GET_FLOAT_WORD(j,z);
+ j += (n<<23);
+ if((j>>23)<=0) z = __scalbnf(z,n); /* subnormal output */
+ else SET_FLOAT_WORD(z,j);
+ return s*z;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,191 @@
+/* @(#)e_rem_pio2.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $";
+#endif
+
+/* __ieee754_rem_pio2(x,y)
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
+ * use __kernel_rem_pio2()
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+/*
+ * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
+ */
+#ifdef __STDC__
+static const int32_t two_over_pi[] = {
+#else
+static int32_t two_over_pi[] = {
+#endif
+0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
+0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
+0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
+0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
+0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
+0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
+0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
+0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
+0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
+0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
+0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
+};
+
+#ifdef __STDC__
+static const int32_t npio2_hw[] = {
+#else
+static int32_t npio2_hw[] = {
+#endif
+0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
+0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
+0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
+0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
+0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,
+0x404858EB, 0x404921FB,
+};
+
+/*
+ * invpio2: 53 bits of 2/pi
+ * pio2_1: first 33 bit of pi/2
+ * pio2_1t: pi/2 - pio2_1
+ * pio2_2: second 33 bit of pi/2
+ * pio2_2t: pi/2 - (pio2_1+pio2_2)
+ * pio2_3: third 33 bit of pi/2
+ * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
+ */
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
+half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
+invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
+pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
+pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
+pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
+pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
+pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
+pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
+
+#ifdef __STDC__
+ int32_t __ieee754_rem_pio2(double x, double *y)
+#else
+ int32_t __ieee754_rem_pio2(x,y)
+ double x,y[];
+#endif
+{
+ double z,w,t,r,fn;
+ double tx[3];
+ int32_t e0,i,j,nx,n,ix,hx;
+ u_int32_t low;
+
+ GET_HIGH_WORD(hx,x); /* high word of x */
+ ix = hx&0x7fffffff;
+ if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */
+ {y[0] = x; y[1] = 0; return 0;}
+ if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */
+ if(hx>0) {
+ z = x - pio2_1;
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ y[0] = z - pio2_1t;
+ y[1] = (z-y[0])-pio2_1t;
+ } else { /* near pi/2, use 33+33+53 bit pi */
+ z -= pio2_2;
+ y[0] = z - pio2_2t;
+ y[1] = (z-y[0])-pio2_2t;
+ }
+ return 1;
+ } else { /* negative x */
+ z = x + pio2_1;
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ y[0] = z + pio2_1t;
+ y[1] = (z-y[0])+pio2_1t;
+ } else { /* near pi/2, use 33+33+53 bit pi */
+ z += pio2_2;
+ y[0] = z + pio2_2t;
+ y[1] = (z-y[0])+pio2_2t;
+ }
+ return -1;
+ }
+ }
+ if(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */
+ #ifdef FPWORKAROUND
+ double ans;
+ double * pans;
+ pans = &ans;
+ fabs(x, pans);
+ t = ans;
+ #else
+ t = fabs(x);
+ #endif
+ n = (int32_t) (t*invpio2+half);
+ fn = (double)n;
+ r = t-fn*pio2_1;
+ w = fn*pio2_1t; /* 1st round good to 85 bit */
+ if(n<32&&ix!=npio2_hw[n-1]) {
+ y[0] = r-w; /* quick check no cancellation */
+ } else {
+ u_int32_t high;
+ j = ix>>20;
+ y[0] = r-w;
+ GET_HIGH_WORD(high,y[0]);
+ i = j-((high>>20)&0x7ff);
+ if(i>16) { /* 2nd iteration needed, good to 118 */
+ t = r;
+ w = fn*pio2_2;
+ r = t-w;
+ w = fn*pio2_2t-((t-r)-w);
+ y[0] = r-w;
+ GET_HIGH_WORD(high,y[0]);
+ i = j-((high>>20)&0x7ff);
+ if(i>49) { /* 3rd iteration need, 151 bits acc */
+ t = r; /* will cover all possible cases */
+ w = fn*pio2_3;
+ r = t-w;
+ w = fn*pio2_3t-((t-r)-w);
+ y[0] = r-w;
+ }
+ }
+ }
+ y[1] = (r-y[0])-w;
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ else return n;
+ }
+ /*
+ * all other (large) arguments
+ */
+ if(ix>=0x7ff00000) { /* x is inf or NaN */
+ y[0]=y[1]=x-x; return 0;
+ }
+ /* set z = scalbn(|x|,ilogb(x)-23) */
+ GET_LOW_WORD(low,x);
+ SET_LOW_WORD(z,low);
+ e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
+ SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
+ for(i=0;i<2;i++) {
+ tx[i] = (double)((int32_t)(z));
+ z = (z-tx[i])*two24;
+ }
+ tx[2] = z;
+ nx = 3;
+ while(tx[nx-1]==zero) nx--; /* skip zero term */
+ n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ return n;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2f.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_rem_pio2f.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,196 @@
+/* e_rem_pio2f.c -- float version of e_rem_pio2.c
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_rem_pio2f.c,v 1.5 1995/05/10 20:46:03 jtc Exp $";
+#endif
+
+/* __ieee754_rem_pio2f(x,y)
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
+ * use __kernel_rem_pio2f()
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+/*
+ * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
+ */
+#ifdef __STDC__
+static const int32_t two_over_pi[] = {
+#else
+static int32_t two_over_pi[] = {
+#endif
+0xA2, 0xF9, 0x83, 0x6E, 0x4E, 0x44, 0x15, 0x29, 0xFC,
+0x27, 0x57, 0xD1, 0xF5, 0x34, 0xDD, 0xC0, 0xDB, 0x62,
+0x95, 0x99, 0x3C, 0x43, 0x90, 0x41, 0xFE, 0x51, 0x63,
+0xAB, 0xDE, 0xBB, 0xC5, 0x61, 0xB7, 0x24, 0x6E, 0x3A,
+0x42, 0x4D, 0xD2, 0xE0, 0x06, 0x49, 0x2E, 0xEA, 0x09,
+0xD1, 0x92, 0x1C, 0xFE, 0x1D, 0xEB, 0x1C, 0xB1, 0x29,
+0xA7, 0x3E, 0xE8, 0x82, 0x35, 0xF5, 0x2E, 0xBB, 0x44,
+0x84, 0xE9, 0x9C, 0x70, 0x26, 0xB4, 0x5F, 0x7E, 0x41,
+0x39, 0x91, 0xD6, 0x39, 0x83, 0x53, 0x39, 0xF4, 0x9C,
+0x84, 0x5F, 0x8B, 0xBD, 0xF9, 0x28, 0x3B, 0x1F, 0xF8,
+0x97, 0xFF, 0xDE, 0x05, 0x98, 0x0F, 0xEF, 0x2F, 0x11,
+0x8B, 0x5A, 0x0A, 0x6D, 0x1F, 0x6D, 0x36, 0x7E, 0xCF,
+0x27, 0xCB, 0x09, 0xB7, 0x4F, 0x46, 0x3F, 0x66, 0x9E,
+0x5F, 0xEA, 0x2D, 0x75, 0x27, 0xBA, 0xC7, 0xEB, 0xE5,
+0xF1, 0x7B, 0x3D, 0x07, 0x39, 0xF7, 0x8A, 0x52, 0x92,
+0xEA, 0x6B, 0xFB, 0x5F, 0xB1, 0x1F, 0x8D, 0x5D, 0x08,
+0x56, 0x03, 0x30, 0x46, 0xFC, 0x7B, 0x6B, 0xAB, 0xF0,
+0xCF, 0xBC, 0x20, 0x9A, 0xF4, 0x36, 0x1D, 0xA9, 0xE3,
+0x91, 0x61, 0x5E, 0xE6, 0x1B, 0x08, 0x65, 0x99, 0x85,
+0x5F, 0x14, 0xA0, 0x68, 0x40, 0x8D, 0xFF, 0xD8, 0x80,
+0x4D, 0x73, 0x27, 0x31, 0x06, 0x06, 0x15, 0x56, 0xCA,
+0x73, 0xA8, 0xC9, 0x60, 0xE2, 0x7B, 0xC0, 0x8C, 0x6B,
+};
+
+/* This array is like the one in e_rem_pio2.c, but the numbers are
+ single precision and the last 8 bits are forced to 0. */
+#ifdef __STDC__
+static const int32_t npio2_hw[] = {
+#else
+static int32_t npio2_hw[] = {
+#endif
+0x3fc90f00, 0x40490f00, 0x4096cb00, 0x40c90f00, 0x40fb5300, 0x4116cb00,
+0x412fed00, 0x41490f00, 0x41623100, 0x417b5300, 0x418a3a00, 0x4196cb00,
+0x41a35c00, 0x41afed00, 0x41bc7e00, 0x41c90f00, 0x41d5a000, 0x41e23100,
+0x41eec200, 0x41fb5300, 0x4203f200, 0x420a3a00, 0x42108300, 0x4216cb00,
+0x421d1400, 0x42235c00, 0x4229a500, 0x422fed00, 0x42363600, 0x423c7e00,
+0x4242c700, 0x42490f00
+};
+
+/*
+ * invpio2: 24 bits of 2/pi
+ * pio2_1: first 17 bit of pi/2
+ * pio2_1t: pi/2 - pio2_1
+ * pio2_2: second 17 bit of pi/2
+ * pio2_2t: pi/2 - (pio2_1+pio2_2)
+ * pio2_3: third 17 bit of pi/2
+ * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
+ */
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+zero = 0.0000000000e+00, /* 0x00000000 */
+half = 5.0000000000e-01, /* 0x3f000000 */
+two8 = 2.5600000000e+02, /* 0x43800000 */
+invpio2 = 6.3661980629e-01, /* 0x3f22f984 */
+pio2_1 = 1.5707855225e+00, /* 0x3fc90f80 */
+pio2_1t = 1.0804334124e-05, /* 0x37354443 */
+pio2_2 = 1.0804273188e-05, /* 0x37354400 */
+pio2_2t = 6.0770999344e-11, /* 0x2e85a308 */
+pio2_3 = 6.0770943833e-11, /* 0x2e85a300 */
+pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
+
+#ifdef __STDC__
+ int32_t __ieee754_rem_pio2f(float x, float *y)
+#else
+ int32_t __ieee754_rem_pio2f(x,y)
+ float x,y[];
+#endif
+{
+ float z,w,t,r,fn;
+ float tx[3];
+ int32_t e0,i,j,nx,n,ix,hx;
+
+ GET_FLOAT_WORD(hx,x);
+ ix = hx&0x7fffffff;
+ if(ix<=0x3f490fd8) /* |x| ~<= pi/4 , no need for reduction */
+ {y[0] = x; y[1] = 0; return 0;}
+ if(ix<0x4016cbe4) { /* |x| < 3pi/4, special case with n=+-1 */
+ if(hx>0) {
+ z = x - pio2_1;
+ if((ix&0xfffffff0)!=0x3fc90fd0) { /* 24+24 bit pi OK */
+ y[0] = z - pio2_1t;
+ y[1] = (z-y[0])-pio2_1t;
+ } else { /* near pi/2, use 24+24+24 bit pi */
+ z -= pio2_2;
+ y[0] = z - pio2_2t;
+ y[1] = (z-y[0])-pio2_2t;
+ }
+ return 1;
+ } else { /* negative x */
+ z = x + pio2_1;
+ if((ix&0xfffffff0)!=0x3fc90fd0) { /* 24+24 bit pi OK */
+ y[0] = z + pio2_1t;
+ y[1] = (z-y[0])+pio2_1t;
+ } else { /* near pi/2, use 24+24+24 bit pi */
+ z += pio2_2;
+ y[0] = z + pio2_2t;
+ y[1] = (z-y[0])+pio2_2t;
+ }
+ return -1;
+ }
+ }
+ if(ix<=0x43490f80) { /* |x| ~<= 2^7*(pi/2), medium size */
+ t = fabsf(x);
+ n = (int32_t) (t*invpio2+half);
+ fn = (float)n;
+ r = t-fn*pio2_1;
+ w = fn*pio2_1t; /* 1st round good to 40 bit */
+ if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) {
+ y[0] = r-w; /* quick check no cancellation */
+ } else {
+ u_int32_t high;
+ j = ix>>23;
+ y[0] = r-w;
+ GET_FLOAT_WORD(high,y[0]);
+ i = j-((high>>23)&0xff);
+ if(i>8) { /* 2nd iteration needed, good to 57 */
+ t = r;
+ w = fn*pio2_2;
+ r = t-w;
+ w = fn*pio2_2t-((t-r)-w);
+ y[0] = r-w;
+ GET_FLOAT_WORD(high,y[0]);
+ i = j-((high>>23)&0xff);
+ if(i>25) { /* 3rd iteration need, 74 bits acc */
+ t = r; /* will cover all possible cases */
+ w = fn*pio2_3;
+ r = t-w;
+ w = fn*pio2_3t-((t-r)-w);
+ y[0] = r-w;
+ }
+ }
+ }
+ y[1] = (r-y[0])-w;
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ else return n;
+ }
+ /*
+ * all other (large) arguments
+ */
+ if(ix>=0x7f800000) { /* x is inf or NaN */
+ y[0]=y[1]=x-x; return 0;
+ }
+ /* set z = scalbn(|x|,ilogb(x)-7) */
+ e0 = (ix>>23)-134; /* e0 = ilogb(z)-7; */
+ SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23)));
+ for(i=0;i<2;i++) {
+ tx[i] = (float)((int32_t)(z));
+ z = (z-tx[i])*two8;
+ }
+ tx[2] = z;
+ nx = 3;
+ while(tx[nx-1]==zero) nx--; /* skip zero term */
+ n = __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ return n;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/e_sqrt.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_sqrt.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,454 @@
+/* @(#)e_sqrt.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
+#endif
+
+/* __ieee754_sqrt(x)
+ * Return correctly rounded sqrt.
+ * ------------------------------------------
+ * | Use the hardware sqrt if you have one |
+ * ------------------------------------------
+ * Method:
+ * Bit by bit method using integer arithmetic. (Slow, but portable)
+ * 1. Normalization
+ * Scale x to y in [1,4) with even powers of 2:
+ * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then
+ * sqrt(x) = 2^k * sqrt(y)
+ * 2. Bit by bit computation
+ * Let q = sqrt(y) truncated to i bit after binary point (q = 1),
+ * i 0
+ * i+1 2
+ * s = 2*q , and y = 2 * ( y - q ). (1)
+ * i i i i
+ *
+ * To compute q from q , one checks whether
+ * i+1 i
+ *
+ * -(i+1) 2
+ * (q + 2 ) <= y. (2)
+ * i
+ * -(i+1)
+ * If (2) is false, then q = q ; otherwise q = q + 2 .
+ * i+1 i i+1 i
+ *
+ * With some algebraic manipulation, it is not difficult to see
+ * that (2) is equivalent to
+ * -(i+1)
+ * s + 2 <= y (3)
+ * i i
+ *
+ * The advantage of (3) is that s and y can be computed by
+ * i i
+ * the following recurrence formula:
+ * if (3) is false
+ *
+ * s = s , y = y ; (4)
+ * i+1 i i+1 i
+ *
+ * otherwise,
+ * -i -(i+1)
+ * s = s + 2 , y = y - s - 2 (5)
+ * i+1 i i+1 i i
+ *
+ * One may easily use induction to prove (4) and (5).
+ * Note. Since the left hand side of (3) contain only i+2 bits,
+ * it does not necessary to do a full (53-bit) comparison
+ * in (3).
+ * 3. Final rounding
+ * After generating the 53 bits result, we compute one more bit.
+ * Together with the remainder, we can decide whether the
+ * result is exact, bigger than 1/2ulp, or less than 1/2ulp
+ * (it will never equal to 1/2ulp).
+ * The rounding mode can be detected by checking whether
+ * huge + tiny is equal to huge, and whether huge - tiny is
+ * equal to huge for some floating point number "huge" and "tiny".
+ *
+ * Special cases:
+ * sqrt(+-0) = +-0 ... exact
+ * sqrt(inf) = inf
+ * sqrt(-ve) = NaN ... with invalid signal
+ * sqrt(NaN) = NaN ... with invalid signal for signaling NaN
+ *
+ * Other methods : see the appended file at the end of the program below.
+ *---------------
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double one = 1.0, tiny=1.0e-300;
+#else
+static double one = 1.0, tiny=1.0e-300;
+#endif
+
+double sqrt(double x)
+{
+ double z;
+ int32_t sign = (int)0x80000000;
+ int32_t ix0,s0,q,m,t,i;
+ u_int32_t r,t1,s1,ix1,q1;
+
+ EXTRACT_WORDS(ix0,ix1,x);
+
+ /* take care of Inf and NaN */
+ if((ix0&0x7ff00000)==0x7ff00000) {
+ return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
+ sqrt(-inf)=sNaN */
+ }
+ /* take care of zero */
+ if(ix0<=0) {
+ if(((ix0&(~sign))|ix1)==0)
+ {
+ return x;/* sqrt(+-0) = +-0 */
+ }
+ else if(ix0<0)
+ {
+ return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
+ }
+ }
+ /* normalize x */
+ m = (ix0>>20);
+ if(m==0) { /* subnormal x */
+ while(ix0==0) {
+ m -= 21;
+ ix0 |= (ix1>>11); ix1 <<= 21;
+ }
+ for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1;
+ m -= i-1;
+ ix0 |= (ix1>>(32-i));
+ ix1 <<= i;
+ }
+ m -= 1023; /* unbias exponent */
+ ix0 = (ix0&0x000fffff)|0x00100000;
+ if(m&1){ /* odd m, double x to make it even */
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ }
+ m >>= 1; /* m = [m/2] */
+
+ /* generate sqrt(x) bit by bit */
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */
+ r = 0x00200000; /* r = moving bit from right to left */
+
+ while(r!=0) {
+ t = s0+r;
+ if(t<=ix0) {
+ s0 = t+r;
+ ix0 -= t;
+ q += r;
+ }
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ r>>=1;
+ }
+
+ r = sign;
+ while(r!=0) {
+ t1 = s1+r;
+ t = s0;
+ if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
+ s1 = t1+r;
+ if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
+ ix0 -= t;
+ if (ix1 < t1) ix0 -= 1;
+ ix1 -= t1;
+ q1 += r;
+ }
+ ix0 += ix0 + ((ix1&sign)>>31);
+ ix1 += ix1;
+ r>>=1;
+ }
+
+ /* use floating add to find out rounding direction */
+ if((ix0|ix1)!=0) {
+ z = one-tiny; /* trigger inexact flag */
+ if (z>=one) {
+ z = one+tiny;
+ if (q1==(u_int32_t)0xffffffff) { q1=0; q += 1;}
+ else if (z>one) {
+ if (q1==(u_int32_t)0xfffffffe) q+=1;
+ q1+=2;
+ } else
+ q1 += (q1&1);
+ }
+ }
+ ix0 = (q>>1)+0x3fe00000;
+ ix1 = q1>>1;
+ if ((q&1)==1) ix1 |= sign;
+ ix0 += (m <<20);
+
+ INSERT_WORDS(z,ix0,ix1);
+
+ return z;
+}
+
+/*
+Other methods (use floating-point arithmetic)
+-------------
+(This is a copy of a drafted paper by Prof W. Kahan
+and K.C. Ng, written in May, 1986)
+
+ Two algorithms are given here to implement sqrt(x)
+ (IEEE double precision arithmetic) in software.
+ Both supply sqrt(x) correctly rounded. The first algorithm (in
+ Section A) uses newton iterations and involves four divisions.
+ The second one uses reciproot iterations to avoid division, but
+ requires more multiplications. Both algorithms need the ability
+ to chop results of arithmetic operations instead of round them,
+ and the INEXACT flag to indicate when an arithmetic operation
+ is executed exactly with no roundoff error, all part of the
+ standard (IEEE 754-1985). The ability to perform shift, add,
+ subtract and logical AND operations upon 32-bit words is needed
+ too, though not part of the standard.
+
+A. sqrt(x) by Newton Iteration
+
+ (1) Initial approximation
+
+ Let x0 and x1 be the leading and the trailing 32-bit words of
+ a floating point number x (in IEEE double format) respectively
+
+ 1 11 52 ...widths
+ ------------------------------------------------------
+ x: |s| e | f |
+ ------------------------------------------------------
+ msb lsb msb lsb ...order
+
+
+ ------------------------ ------------------------
+ x0: |s| e | f1 | x1: | f2 |
+ ------------------------ ------------------------
+
+ By performing shifts and subtracts on x0 and x1 (both regarded
+ as integers), we obtain an 8-bit approximation of sqrt(x) as
+ follows.
+
+ k := (x0>>1) + 0x1ff80000;
+ y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits
+ Here k is a 32-bit integer and T1[] is an integer array containing
+ correction terms. Now magically the floating value of y (y's
+ leading 32-bit word is y0, the value of its trailing word is 0)
+ approximates sqrt(x) to almost 8-bit.
+
+ Value of T1:
+ static int T1[32]= {
+ 0, 1024, 3062, 5746, 9193, 13348, 18162, 23592,
+ 29598, 36145, 43202, 50740, 58733, 67158, 75992, 85215,
+ 83599, 71378, 60428, 50647, 41945, 34246, 27478, 21581,
+ 16499, 12183, 8588, 5674, 3403, 1742, 661, 130,};
+
+ (2) Iterative refinement
+
+ Apply Heron's rule three times to y, we have y approximates
+ sqrt(x) to within 1 ulp (Unit in the Last Place):
+
+ y := (y+x/y)/2 ... almost 17 sig. bits
+ y := (y+x/y)/2 ... almost 35 sig. bits
+ y := y-(y-x/y)/2 ... within 1 ulp
+
+
+ Remark 1.
+ Another way to improve y to within 1 ulp is:
+
+ y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x)
+ y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x)
+
+ 2
+ (x-y )*y
+ y := y + 2* ---------- ...within 1 ulp
+ 2
+ 3y + x
+
+
+ This formula has one division fewer than the one above; however,
+ it requires more multiplications and additions. Also x must be
+ scaled in advance to avoid spurious overflow in evaluating the
+ expression 3y*y+x. Hence it is not recommended uless division
+ is slow. If division is very slow, then one should use the
+ reciproot algorithm given in section B.
+
+ (3) Final adjustment
+
+ By twiddling y's last bit it is possible to force y to be
+ correctly rounded according to the prevailing rounding mode
+ as follows. Let r and i be copies of the rounding mode and
+ inexact flag before entering the square root program. Also we
+ use the expression y+-ulp for the next representable floating
+ numbers (up and down) of y. Note that y+-ulp = either fixed
+ point y+-1, or multiply y by nextafter(1,+-inf) in chopped
+ mode.
+
+ I := FALSE; ... reset INEXACT flag I
+ R := RZ; ... set rounding mode to round-toward-zero
+ z := x/y; ... chopped quotient, possibly inexact
+ If(not I) then { ... if the quotient is exact
+ if(z=y) {
+ I := i; ... restore inexact flag
+ R := r; ... restore rounded mode
+ return sqrt(x):=y.
+ } else {
+ z := z - ulp; ... special rounding
+ }
+ }
+ i := TRUE; ... sqrt(x) is inexact
+ If (r=RN) then z=z+ulp ... rounded-to-nearest
+ If (r=RP) then { ... round-toward-+inf
+ y = y+ulp; z=z+ulp;
+ }
+ y := y+z; ... chopped sum
+ y0:=y0-0x00100000; ... y := y/2 is correctly rounded.
+ I := i; ... restore inexact flag
+ R := r; ... restore rounded mode
+ return sqrt(x):=y.
+
+ (4) Special cases
+
+ Square root of +inf, +-0, or NaN is itself;
+ Square root of a negative number is NaN with invalid signal.
+
+
+B. sqrt(x) by Reciproot Iteration
+
+ (1) Initial approximation
+
+ Let x0 and x1 be the leading and the trailing 32-bit words of
+ a floating point number x (in IEEE double format) respectively
+ (see section A). By performing shifs and subtracts on x0 and y0,
+ we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
+
+ k := 0x5fe80000 - (x0>>1);
+ y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
+
+ Here k is a 32-bit integer and T2[] is an integer array
+ containing correction terms. Now magically the floating
+ value of y (y's leading 32-bit word is y0, the value of
+ its trailing word y1 is set to zero) approximates 1/sqrt(x)
+ to almost 7.8-bit.
+
+ Value of T2:
+ static int T2[64]= {
+ 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866,
+ 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,
+ 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,
+ 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,
+ 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,
+ 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,
+ 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,
+ 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd,};
+
+ (2) Iterative refinement
+
+ Apply Reciproot iteration three times to y and multiply the
+ result by x to get an approximation z that matches sqrt(x)
+ to about 1 ulp. To be exact, we will have
+ -1ulp < sqrt(x)-z<1.0625ulp.
+
+ ... set rounding mode to Round-to-nearest
+ y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
+ y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
+ ... special arrangement for better accuracy
+ z := x*y ... 29 bits to sqrt(x), with z*y<1
+ z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
+
+ Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that
+ (a) the term z*y in the final iteration is always less than 1;
+ (b) the error in the final result is biased upward so that
+ -1 ulp < sqrt(x) - z < 1.0625 ulp
+ instead of |sqrt(x)-z|<1.03125ulp.
+
+ (3) Final adjustment
+
+ By twiddling y's last bit it is possible to force y to be
+ correctly rounded according to the prevailing rounding mode
+ as follows. Let r and i be copies of the rounding mode and
+ inexact flag before entering the square root program. Also we
+ use the expression y+-ulp for the next representable floating
+ numbers (up and down) of y. Note that y+-ulp = either fixed
+ point y+-1, or multiply y by nextafter(1,+-inf) in chopped
+ mode.
+
+ R := RZ; ... set rounding mode to round-toward-zero
+ switch(r) {
+ case RN: ... round-to-nearest
+ if(x<= z*(z-ulp)...chopped) z = z - ulp; else
+ if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp;
+ break;
+ case RZ:case RM: ... round-to-zero or round-to--inf
+ R:=RP; ... reset rounding mod to round-to-+inf
+ if(x<z*z ... rounded up) z = z - ulp; else
+ if(x>=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp;
+ break;
+ case RP: ... round-to-+inf
+ if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else
+ if(x>z*z ...chopped) z = z+ulp;
+ break;
+ }
+
+ Remark 3. The above comparisons can be done in fixed point. For
+ example, to compare x and w=z*z chopped, it suffices to compare
+ x1 and w1 (the trailing parts of x and w), regarding them as
+ two's complement integers.
+
+ ...Is z an exact square root?
+ To determine whether z is an exact square root of x, let z1 be the
+ trailing part of z, and also let x0 and x1 be the leading and
+ trailing parts of x.
+
+ If ((z1&0x03ffffff)!=0) ... not exact if trailing 26 bits of z!=0
+ I := 1; ... Raise Inexact flag: z is not exact
+ else {
+ j := 1 - [(x0>>20)&1] ... j = logb(x) mod 2
+ k := z1 >> 26; ... get z's 25-th and 26-th
+ fraction bits
+ I := i or (k&j) or ((k&(j+j+1))!=(x1&3));
+ }
+ R:= r ... restore rounded mode
+ return sqrt(x):=z.
+
+ If multiplication is cheaper then the foregoing red tape, the
+ Inexact flag can be evaluated by
+
+ I := i;
+ I := (z*z!=x) or I.
+
+ Note that z*z can overwrite I; this value must be sensed if it is
+ True.
+
+ Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be
+ zero.
+
+ --------------------
+ z1: | f2 |
+ --------------------
+ bit 31 bit 0
+
+ Further more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd
+ or even of logb(x) have the following relations:
+
+ -------------------------------------------------
+ bit 27,26 of z1 bit 1,0 of x1 logb(x)
+ -------------------------------------------------
+ 00 00 odd and even
+ 01 01 even
+ 10 10 odd
+ 10 00 even
+ 11 01 even
+ -------------------------------------------------
+
+ (4) Special cases (see (4) of Section A).
+
+ */
Added: dists/trunk/modules/unicorn/unicorn/libm/e_sqrtf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/e_sqrtf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,97 @@
+/* e_sqrtf.c -- float version of e_sqrt.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: e_sqrtf.c,v 1.4 1995/05/10 20:46:19 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float one = 1.0, tiny=1.0e-30;
+#else
+static float one = 1.0, tiny=1.0e-30;
+#endif
+
+#ifdef __STDC__
+ float sqrtf(float x)
+#else
+ float sqrtf(x)
+ float x;
+#endif
+{
+ float z;
+ int32_t sign = (int)0x80000000;
+ int32_t ix,s,q,m,t,i;
+ u_int32_t r;
+
+ GET_FLOAT_WORD(ix,x);
+
+ /* take care of Inf and NaN */
+ if((ix&0x7f800000)==0x7f800000) {
+ return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
+ sqrt(-inf)=sNaN */
+ }
+ /* take care of zero */
+ if(ix<=0) {
+ if((ix&(~sign))==0) return x;/* sqrt(+-0) = +-0 */
+ else if(ix<0)
+ return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
+ }
+ /* normalize x */
+ m = (ix>>23);
+ if(m==0) { /* subnormal x */
+ for(i=0;(ix&0x00800000)==0;i++) ix<<=1;
+ m -= i-1;
+ }
+ m -= 127; /* unbias exponent */
+ ix = (ix&0x007fffff)|0x00800000;
+ if(m&1) /* odd m, double x to make it even */
+ ix += ix;
+ m >>= 1; /* m = [m/2] */
+
+ /* generate sqrt(x) bit by bit */
+ ix += ix;
+ q = s = 0; /* q = sqrt(x) */
+ r = 0x01000000; /* r = moving bit from right to left */
+
+ while(r!=0) {
+ t = s+r;
+ if(t<=ix) {
+ s = t+r;
+ ix -= t;
+ q += r;
+ }
+ ix += ix;
+ r>>=1;
+ }
+
+ /* use floating add to find out rounding direction */
+ if(ix!=0) {
+ z = one-tiny; /* trigger inexact flag */
+ if (z>=one) {
+ z = one+tiny;
+ if (z>one)
+ q += 2;
+ else
+ q += (q&1);
+ }
+ }
+ ix = (q>>1)+0x3f000000;
+ ix += (m <<23);
+ SET_FLOAT_WORD(z,ix);
+ return z;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_cos.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_cos.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,107 @@
+/* @(#)k_cos.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+/* Modified by Naohiko Shimizu/Tokai University, Japan 1997/08/25,
+ for performance improvement on pipelined processors.
+*/
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_cos.c,v 1.8 1995/05/10 20:46:22 jtc Exp $";
+#endif
+
+/*
+ * __kernel_cos( x, y )
+ * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ *
+ * Algorithm
+ * 1. Since cos(-x) = cos(x), we need only to consider positive x.
+ * 2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0.
+ * 3. cos(x) is approximated by a polynomial of degree 14 on
+ * [0,pi/4]
+ * 4 14
+ * cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x
+ * where the remez error is
+ *
+ * | 2 4 6 8 10 12 14 | -58
+ * |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x +C6*x )| <= 2
+ * | |
+ *
+ * 4 6 8 10 12 14
+ * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then
+ * cos(x) = 1 - x*x/2 + r
+ * since cos(x+y) ~ cos(x) - sin(x)*y
+ * ~ cos(x) - x*y,
+ * a correction term is necessary in cos(x) and hence
+ * cos(x+y) = 1 - (x*x/2 - (r - x*y))
+ * For better accuracy when x > 0.3, let qx = |x|/4 with
+ * the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125.
+ * Then
+ * cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)).
+ * Note that 1-qx and (x*x/2-qx) is EXACT here, and the
+ * magnitude of the latter is at least a quarter of x*x/2,
+ * thus, reducing the rounding error in the subtraction.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+C[] = {
+ 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+ 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */
+ -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */
+ 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */
+ -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
+ 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
+ -1.13596475577881948265e-11}; /* 0xBDA8FAE9, 0xBE8838D4 */
+
+#ifdef __STDC__
+ double __kernel_cos(double x, double y)
+#else
+ double __kernel_cos(x, y)
+ double x,y;
+#endif
+{
+ double a,hz,z,r,qx,r1,r2,r3,z1,z2,z3;
+ int32_t ix;
+ z = x*x;
+ GET_HIGH_WORD(ix,x);
+ ix &= 0x7fffffff; /* ix = |x|'s high word*/
+ if(ix<0x3e400000) { /* if x < 2**27 */
+ if(((int)x)==0) return C[0]; /* generate inexact */
+ }
+#ifdef DO_NOT_USE_THIS
+ r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
+#else
+ r1=z*C[6];r1=r1+C[5];z1=z*z;
+ r2=z*C[4];r2=r2+C[3];z2=z1*z;
+ r3=z*C[2];r3=r3+C[1];z3=z2*z1;
+ r=z3*r1+z2*r2+z*r3;
+#endif
+ if(ix < 0x3FD33333) /* if |x| < 0.3 */
+ return C[0] - (0.5*z - (z*r - x*y));
+ else {
+ if(ix > 0x3fe90000) { /* x > 0.78125 */
+ qx = 0.28125;
+ } else {
+ INSERT_WORDS(qx,ix-0x00200000,0); /* x/4 */
+ }
+ hz = 0.5*z-qx;
+ a = C[0]-qx;
+ return a - (hz - (z*r-x*y));
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_cosf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_cosf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,64 @@
+/* k_cosf.c -- float version of k_cos.c
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_cosf.c,v 1.4 1995/05/10 20:46:23 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+one = 1.0000000000e+00, /* 0x3f800000 */
+C1 = 4.1666667908e-02, /* 0x3d2aaaab */
+C2 = -1.3888889225e-03, /* 0xbab60b61 */
+C3 = 2.4801587642e-05, /* 0x37d00d01 */
+C4 = -2.7557314297e-07, /* 0xb493f27c */
+C5 = 2.0875723372e-09, /* 0x310f74f6 */
+C6 = -1.1359647598e-11; /* 0xad47d74e */
+
+#ifdef __STDC__
+ float __kernel_cosf(float x, float y)
+#else
+ float __kernel_cosf(x, y)
+ float x,y;
+#endif
+{
+ float a,hz,z,r,qx;
+ int32_t ix;
+ GET_FLOAT_WORD(ix,x);
+ ix &= 0x7fffffff; /* ix = |x|'s high word*/
+ if(ix<0x32000000) { /* if x < 2**27 */
+ if(((int)x)==0) return one; /* generate inexact */
+ }
+ z = x*x;
+ r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
+ if(ix < 0x3e99999a) /* if |x| < 0.3 */
+ return one - ((float)0.5*z - (z*r - x*y));
+ else {
+ if(ix > 0x3f480000) { /* x > 0.78125 */
+ qx = (float)0.28125;
+ } else {
+ SET_FLOAT_WORD(qx,ix-0x01000000); /* x/4 */
+ }
+ hz = (float)0.5*z-qx;
+ a = one-qx;
+ return a - (hz - (z*r-x*y));
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,320 @@
+/* @(#)k_rem_pio2.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $";
+#endif
+
+/*
+ * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
+ * double x[],y[]; int e0,nx,prec; int ipio2[];
+ *
+ * __kernel_rem_pio2 return the last three digits of N with
+ * y = x - N*pi/2
+ * so that |y| < pi/2.
+ *
+ * The method is to compute the integer (mod 8) and fraction parts of
+ * (2/pi)*x without doing the full multiplication. In general we
+ * skip the part of the product that are known to be a huge integer (
+ * more accurately, = 0 mod 8 ). Thus the number of operations are
+ * independent of the exponent of the input.
+ *
+ * (2/pi) is represented by an array of 24-bit integers in ipio2[].
+ *
+ * Input parameters:
+ * x[] The input value (must be positive) is broken into nx
+ * pieces of 24-bit integers in double precision format.
+ * x[i] will be the i-th 24 bit of x. The scaled exponent
+ * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
+ * match x's up to 24 bits.
+ *
+ * Example of breaking a double positive z into x[0]+x[1]+x[2]:
+ * e0 = ilogb(z)-23
+ * z = scalbn(z,-e0)
+ * for i = 0,1,2
+ * x[i] = floor(z)
+ * z = (z-x[i])*2**24
+ *
+ *
+ * y[] ouput result in an array of double precision numbers.
+ * The dimension of y[] is:
+ * 24-bit precision 1
+ * 53-bit precision 2
+ * 64-bit precision 2
+ * 113-bit precision 3
+ * The actual value is the sum of them. Thus for 113-bit
+ * precision, one may have to do something like:
+ *
+ * long double t,w,r_head, r_tail;
+ * t = (long double)y[2] + (long double)y[1];
+ * w = (long double)y[0];
+ * r_head = t+w;
+ * r_tail = w - (r_head - t);
+ *
+ * e0 The exponent of x[0]
+ *
+ * nx dimension of x[]
+ *
+ * prec an integer indicating the precision:
+ * 0 24 bits (single)
+ * 1 53 bits (double)
+ * 2 64 bits (extended)
+ * 3 113 bits (quad)
+ *
+ * ipio2[]
+ * integer array, contains the (24*i)-th to (24*i+23)-th
+ * bit of 2/pi after binary point. The corresponding
+ * floating value is
+ *
+ * ipio2[i] * 2^(-24(i+1)).
+ *
+ * External function:
+ * double scalbn(), floor();
+ *
+ *
+ * Here is the description of some local variables:
+ *
+ * jk jk+1 is the initial number of terms of ipio2[] needed
+ * in the computation. The recommended value is 2,3,4,
+ * 6 for single, double, extended,and quad.
+ *
+ * jz local integer variable indicating the number of
+ * terms of ipio2[] used.
+ *
+ * jx nx - 1
+ *
+ * jv index for pointing to the suitable ipio2[] for the
+ * computation. In general, we want
+ * ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8
+ * is an integer. Thus
+ * e0-3-24*jv >= 0 or (e0-3)/24 >= jv
+ * Hence jv = max(0,(e0-3)/24).
+ *
+ * jp jp+1 is the number of terms in PIo2[] needed, jp = jk.
+ *
+ * q[] double array with integral value, representing the
+ * 24-bits chunk of the product of x and 2/pi.
+ *
+ * q0 the corresponding exponent of q[0]. Note that the
+ * exponent for q[i] would be q0-24*i.
+ *
+ * PIo2[] double precision array, obtained by cutting pi/2
+ * into 24 bits chunks.
+ *
+ * f[] ipio2[] in floating point
+ *
+ * iq[] integer array by breaking up q[] in 24-bits chunk.
+ *
+ * fq[] final product of x*(2/pi) in fq[0],..,fq[jk]
+ *
+ * ih integer. If >0 it indicates q[] is >= 0.5, hence
+ * it also indicates the *sign* of the result.
+ *
+ */
+
+
+/*
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
+#else
+static int init_jk[] = {2,3,4,6};
+#endif
+
+#ifdef __STDC__
+static const double PIo2[] = {
+#else
+static double PIo2[] = {
+#endif
+ 1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
+ 7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
+ 5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
+ 3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */
+ 1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */
+ 1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */
+ 2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */
+ 2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
+};
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+zero = 0.0,
+one = 1.0,
+two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
+twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
+
+#ifdef __STDC__
+ int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
+#else
+ int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
+ double x[], y[]; int e0,nx,prec; int32_t ipio2[];
+#endif
+{
+ int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
+ double z,fw,f[20],fq[20],q[20];
+
+ /* initialize jk*/
+ jk = init_jk[prec];
+ jp = jk;
+
+ /* determine jx,jv,q0, note that 3>q0 */
+ jx = nx-1;
+ jv = (e0-3)/24; if(jv<0) jv=0;
+ q0 = e0-24*(jv+1);
+
+ /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
+ j = jv-jx; m = jx+jk;
+ for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];
+
+ /* compute q[0],q[1],...q[jk] */
+ for (i=0;i<=jk;i++) {
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ }
+
+ jz = jk;
+recompute:
+ /* distill q[] into iq[] reversingly */
+ for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
+ fw = (double)((int32_t)(twon24* z));
+ iq[i] = (int32_t)(z-two24*fw);
+ z = q[j-1]+fw;
+ }
+
+ /* compute n */
+ z = __scalbn(z,q0); /* actual value of z */
+ z -= 8.0*__floor(z*0.125); /* trim off integer >= 8 */
+ n = (int32_t) z;
+ z -= (double)n;
+ ih = 0;
+ if(q0>0) { /* need iq[jz-1] to determine n */
+ i = (iq[jz-1]>>(24-q0)); n += i;
+ iq[jz-1] -= i<<(24-q0);
+ ih = iq[jz-1]>>(23-q0);
+ }
+ else if(q0==0) ih = iq[jz-1]>>23;
+ else if(z>=0.5) ih=2;
+
+ if(ih>0) { /* q > 0.5 */
+ n += 1; carry = 0;
+ for(i=0;i<jz ;i++) { /* compute 1-q */
+ j = iq[i];
+ if(carry==0) {
+ if(j!=0) {
+ carry = 1; iq[i] = 0x1000000- j;
+ }
+ } else iq[i] = 0xffffff - j;
+ }
+ if(q0>0) { /* rare case: chance is 1 in 12 */
+ switch(q0) {
+ case 1:
+ iq[jz-1] &= 0x7fffff; break;
+ case 2:
+ iq[jz-1] &= 0x3fffff; break;
+ }
+ }
+ if(ih==2) {
+ z = one - z;
+ if(carry!=0) z -= __scalbn(one,q0);
+ }
+ }
+
+ /* check if recomputation is needed */
+ if(z==zero) {
+ j = 0;
+ for (i=jz-1;i>=jk;i--) j |= iq[i];
+ if(j==0) { /* need recomputation */
+ for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
+
+ for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
+ f[jx+i] = (double) ipio2[jv+i];
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+ q[i] = fw;
+ }
+ jz += k;
+ goto recompute;
+ }
+ }
+
+ /* chop off zero terms */
+ if(z==0.0) {
+ jz -= 1; q0 -= 24;
+ while(iq[jz]==0) { jz--; q0-=24;}
+ } else { /* break z into 24-bit if necessary */
+ z = __scalbn(z,-q0);
+ if(z>=two24) {
+ fw = (double)((int32_t)(twon24*z));
+ iq[jz] = (int32_t)(z-two24*fw);
+ jz += 1; q0 += 24;
+ iq[jz] = (int32_t) fw;
+ } else iq[jz] = (int32_t) z ;
+ }
+
+ /* convert integer "bit" chunk to floating-point value */
+ fw = __scalbn(one,q0);
+ for(i=jz;i>=0;i--) {
+ q[i] = fw*(double)iq[i]; fw*=twon24;
+ }
+
+ /* compute PIo2[0,...,jp]*q[jz,...,0] */
+ for(i=jz;i>=0;i--) {
+ for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
+ fq[jz-i] = fw;
+ }
+
+ /* compress fq[] into y[] */
+ switch(prec) {
+ case 0:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ break;
+ case 1:
+ case 2:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ fw = fq[0]-fw;
+ for (i=1;i<=jz;i++) fw += fq[i];
+ y[1] = (ih==0)? fw: -fw;
+ break;
+ case 3: /* painful */
+ for (i=jz;i>0;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (i=jz;i>1;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
+ if(ih==0) {
+ y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
+ } else {
+ y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
+ }
+ }
+ return n&7;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2f.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_rem_pio2f.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,213 @@
+/* k_rem_pio2f.c -- float version of k_rem_pio2.c
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_rem_pio2f.c,v 1.4 1995/05/10 20:46:28 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+/* In the float version, the input parameter x contains 8 bit
+ integers, not 24 bit integers. 113 bit precision is not supported. */
+
+#ifdef __STDC__
+static const int init_jk[] = {4,7,9}; /* initial value for jk */
+#else
+static int init_jk[] = {4,7,9};
+#endif
+
+#ifdef __STDC__
+static const float PIo2[] = {
+#else
+static float PIo2[] = {
+#endif
+ 1.5703125000e+00, /* 0x3fc90000 */
+ 4.5776367188e-04, /* 0x39f00000 */
+ 2.5987625122e-05, /* 0x37da0000 */
+ 7.5437128544e-08, /* 0x33a20000 */
+ 6.0026650317e-11, /* 0x2e840000 */
+ 7.3896444519e-13, /* 0x2b500000 */
+ 5.3845816694e-15, /* 0x27c20000 */
+ 5.6378512969e-18, /* 0x22d00000 */
+ 8.3009228831e-20, /* 0x1fc40000 */
+ 3.2756352257e-22, /* 0x1bc60000 */
+ 6.3331015649e-25, /* 0x17440000 */
+};
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+zero = 0.0,
+one = 1.0,
+two8 = 2.5600000000e+02, /* 0x43800000 */
+twon8 = 3.9062500000e-03; /* 0x3b800000 */
+
+#ifdef __STDC__
+ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32_t *ipio2)
+#else
+ int __kernel_rem_pio2f(x,y,e0,nx,prec,ipio2)
+ float x[], y[]; int e0,nx,prec; int32_t ipio2[];
+#endif
+{
+ int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
+ float z,fw,f[20],fq[20],q[20];
+
+ /* initialize jk*/
+ jk = init_jk[prec];
+ jp = jk;
+
+ /* determine jx,jv,q0, note that 3>q0 */
+ jx = nx-1;
+ jv = (e0-3)/8; if(jv<0) jv=0;
+ q0 = e0-8*(jv+1);
+
+ /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
+ j = jv-jx; m = jx+jk;
+ for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (float) ipio2[j];
+
+ /* compute q[0],q[1],...q[jk] */
+ for (i=0;i<=jk;i++) {
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ }
+
+ jz = jk;
+recompute:
+ /* distill q[] into iq[] reversingly */
+ for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
+ fw = (float)((int32_t)(twon8* z));
+ iq[i] = (int32_t)(z-two8*fw);
+ z = q[j-1]+fw;
+ }
+
+ /* compute n */
+ z = __scalbnf(z,q0); /* actual value of z */
+ z -= (float)8.0*__floorf(z*(float)0.125); /* trim off integer >= 8 */
+ n = (int32_t) z;
+ z -= (float)n;
+ ih = 0;
+ if(q0>0) { /* need iq[jz-1] to determine n */
+ i = (iq[jz-1]>>(8-q0)); n += i;
+ iq[jz-1] -= i<<(8-q0);
+ ih = iq[jz-1]>>(7-q0);
+ }
+ else if(q0==0) ih = iq[jz-1]>>8;
+ else if(z>=(float)0.5) ih=2;
+
+ if(ih>0) { /* q > 0.5 */
+ n += 1; carry = 0;
+ for(i=0;i<jz ;i++) { /* compute 1-q */
+ j = iq[i];
+ if(carry==0) {
+ if(j!=0) {
+ carry = 1; iq[i] = 0x100- j;
+ }
+ } else iq[i] = 0xff - j;
+ }
+ if(q0>0) { /* rare case: chance is 1 in 12 */
+ switch(q0) {
+ case 1:
+ iq[jz-1] &= 0x7f; break;
+ case 2:
+ iq[jz-1] &= 0x3f; break;
+ }
+ }
+ if(ih==2) {
+ z = one - z;
+ if(carry!=0) z -= __scalbnf(one,q0);
+ }
+ }
+
+ /* check if recomputation is needed */
+ if(z==zero) {
+ j = 0;
+ for (i=jz-1;i>=jk;i--) j |= iq[i];
+ if(j==0) { /* need recomputation */
+ for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
+
+ for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
+ f[jx+i] = (float) ipio2[jv+i];
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+ q[i] = fw;
+ }
+ jz += k;
+ goto recompute;
+ }
+ }
+
+ /* chop off zero terms */
+ if(z==(float)0.0) {
+ jz -= 1; q0 -= 8;
+ while(iq[jz]==0) { jz--; q0-=8;}
+ } else { /* break z into 8-bit if necessary */
+ z = __scalbnf(z,-q0);
+ if(z>=two8) {
+ fw = (float)((int32_t)(twon8*z));
+ iq[jz] = (int32_t)(z-two8*fw);
+ jz += 1; q0 += 8;
+ iq[jz] = (int32_t) fw;
+ } else iq[jz] = (int32_t) z ;
+ }
+
+ /* convert integer "bit" chunk to floating-point value */
+ fw = __scalbnf(one,q0);
+ for(i=jz;i>=0;i--) {
+ q[i] = fw*(float)iq[i]; fw*=twon8;
+ }
+
+ /* compute PIo2[0,...,jp]*q[jz,...,0] */
+ for(i=jz;i>=0;i--) {
+ for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
+ fq[jz-i] = fw;
+ }
+
+ /* compress fq[] into y[] */
+ switch(prec) {
+ case 0:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ break;
+ case 1:
+ case 2:
+ fw = 0.0;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
+ fw = fq[0]-fw;
+ for (i=1;i<=jz;i++) fw += fq[i];
+ y[1] = (ih==0)? fw: -fw;
+ break;
+ case 3: /* painful */
+ for (i=jz;i>0;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (i=jz;i>1;i--) {
+ fw = fq[i-1]+fq[i];
+ fq[i] += fq[i-1]-fw;
+ fq[i-1] = fw;
+ }
+ for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
+ if(ih==0) {
+ y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
+ } else {
+ y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
+ }
+ }
+ return n&7;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_sin.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_sin.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,91 @@
+/* @(#)k_sin.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+/* Modified by Naohiko Shimizu/Tokai University, Japan 1997/08/25,
+ for performance improvement on pipelined processors.
+*/
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_sin.c,v 1.8 1995/05/10 20:46:31 jtc Exp $";
+#endif
+
+/* __kernel_sin( x, y, iy)
+ * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ * Input iy indicates whether y is 0. (if iy=0, y assume to be 0).
+ *
+ * Algorithm
+ * 1. Since sin(-x) = -sin(x), we need only to consider positive x.
+ * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.
+ * 3. sin(x) is approximated by a polynomial of degree 13 on
+ * [0,pi/4]
+ * 3 13
+ * sin(x) ~ x + S1*x + ... + S6*x
+ * where
+ *
+ * |sin(x) 2 4 6 8 10 12 | -58
+ * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2
+ * | x |
+ *
+ * 4. sin(x+y) = sin(x) + sin'(x')*y
+ * ~ sin(x) + (1-x*x/2)*y
+ * For better accuracy, let
+ * 3 2 2 2 2
+ * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
+ * then 3 2
+ * sin(x) = x + (S1*x + (x *(r-y/2)+y))
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+S[] = {
+ 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
+ -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */
+ 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
+ -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */
+ 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
+ -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
+ 1.58969099521155010221e-10}; /* 0x3DE5D93A, 0x5ACFD57C */
+
+#ifdef __STDC__
+ double __kernel_sin(double x, double y, int iy)
+#else
+ double __kernel_sin(x, y, iy)
+ double x,y; int iy; /* iy=0 if y is zero */
+#endif
+{
+ double z,r,v,z1,r1,r2;
+ int32_t ix;
+ GET_HIGH_WORD(ix,x);
+ ix &= 0x7fffffff; /* high word of x */
+ if(ix<0x3e400000) /* |x| < 2**-27 */
+ {if((int)x==0) return x;} /* generate inexact */
+ z = x*x;
+ v = z*x;
+#ifdef DO_NOT_USE_THIS
+ r = S2+z*(S3+z*(S4+z*(S5+z*S6)));
+ if(iy==0) return x+v*(S1+z*r);
+ else return x-((z*(half*y-v*r)-y)-v*S1);
+#else
+ r1 = S[5]+z*S[6]; z1 = z*z*z;
+ r2 = S[3]+z*S[4];
+ r = S[2] + z*r2 + z1*r1;
+ if(iy==0) return x+v*(S[1]+z*r);
+ else return x-((z*(S[0]*y-v*r)-y)-v*S[1]);
+#endif
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/k_sinf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/k_sinf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,54 @@
+/* k_sinf.c -- float version of k_sin.c
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: k_sinf.c,v 1.4 1995/05/10 20:46:33 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+half = 5.0000000000e-01,/* 0x3f000000 */
+S1 = -1.6666667163e-01, /* 0xbe2aaaab */
+S2 = 8.3333337680e-03, /* 0x3c088889 */
+S3 = -1.9841270114e-04, /* 0xb9500d01 */
+S4 = 2.7557314297e-06, /* 0x3638ef1b */
+S5 = -2.5050759689e-08, /* 0xb2d72f34 */
+S6 = 1.5896910177e-10; /* 0x2f2ec9d3 */
+
+#ifdef __STDC__
+ float __kernel_sinf(float x, float y, int iy)
+#else
+ float __kernel_sinf(x, y, iy)
+ float x,y; int iy; /* iy=0 if y is zero */
+#endif
+{
+ float z,r,v;
+ int32_t ix;
+ GET_FLOAT_WORD(ix,x);
+ ix &= 0x7fffffff; /* high word of x */
+ if(ix<0x32000000) /* |x| < 2**-27 */
+ {if((int)x==0) return x;} /* generate inexact */
+ z = x*x;
+ v = z*x;
+ r = S2+z*(S3+z*(S4+z*(S5+z*S6)));
+ if(iy==0) return x+v*(S1+z*r);
+ else return x-((z*(half*y-v*r)-y)-v*S1);
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/math.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/math.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,287 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.9 2000/03/27 02:04:45 obrien Exp $
+ */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+/*
+ * ANSI/POSIX
+ */
+extern char __infinity[];
+#define HUGE_VAL (*(double *) __infinity)
+
+/*
+ * XOPEN/SVID
+ */
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log 2e */
+#define M_LOG10E 0.43429448190325182765 /* log 10e */
+#define M_LN2 0.69314718055994530942 /* log e2 */
+#define M_LN10 2.30258509299404568402 /* log e10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define MAXFLOAT ((float)3.40282346638528860e+38)
+extern int signgam;
+
+#if !defined(_XOPEN_SOURCE)
+enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix};
+
+#define _LIB_VERSION_TYPE enum fdversion
+#define _LIB_VERSION _fdlib_version
+
+/* if global variable _LIB_VERSION is not desirable, one may
+ * change the following to be a constant by:
+ * #define _LIB_VERSION_TYPE const enum version
+ * In that case, after one initializes the value _LIB_VERSION (see
+ * s_lib_version.c) during compile time, it cannot be modified
+ * in the middle of a program
+ */
+extern _LIB_VERSION_TYPE _LIB_VERSION;
+
+#define _IEEE_ fdlibm_ieee
+#define _SVID_ fdlibm_svid
+#define _XOPEN_ fdlibm_xopen
+#define _POSIX_ fdlibm_posix
+
+/* We have a problem when using C++ since `exception' is a reserved
+ name in C++. */
+#ifndef __cplusplus
+struct exception {
+ int type;
+ char *name;
+ double arg1;
+ double arg2;
+ double retval;
+};
+#endif
+
+#define HUGE MAXFLOAT
+
+/*
+ * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
+ * (one may replace the following line by "#include <values.h>")
+ */
+
+#define X_TLOSS 1.41484755040568800000e+16
+
+#define DOMAIN 1
+#define SING 2
+#define OVERFLOW 3
+#define UNDERFLOW 4
+#define TLOSS 5
+#define PLOSS 6
+
+#endif /* !_XOPEN_SOURCE */
+#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
+
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+/*
+ * ANSI/POSIX
+ */
+extern double fabs __P((double));
+extern double scalbn __P((double, int));
+extern double __copysign __P((double, double));
+extern float copysignf __P((float, float));
+extern double floor __P((double));
+extern float floorf __P((float));
+extern double scalb __P((double, double));
+/*
+extern double acos __P((double));
+extern double asin __P((double));
+extern double atan __P((double));
+extern double atan2 __P((double, double));
+extern double cos __P((double));
+extern double sin __P((double, double *));
+extern double tan __P((double));
+
+extern double cosh __P((double));
+extern double sinh __P((double));
+extern double tanh __P((double));
+
+extern double exp __P((double));
+extern double frexp __P((double, int *));
+extern double ldexp __P((double, int));
+extern double log __P((double));
+extern double log10 __P((double, double *));
+extern double modf __P((double, double *));
+
+extern double pow __P((double, double));
+extern double sqrt __P((double, double *));
+
+extern double ceil __P((double, double *));
+//extern double fabs __P((double, double *));
+extern double fabs __P((double));
+extern double floor __P((double, double *));
+extern double fmod __P((double, double));
+*/
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+extern double erf __P((double));
+extern double erfc __P((double));
+extern double gamma __P((double));
+extern double hypot __P((double, double));
+extern int isinf __P((double));
+extern int isnan __P((double));
+extern int finite __P((double));
+extern double j0 __P((double));
+extern double j1 __P((double));
+extern double jn __P((int, double));
+extern double lgamma __P((double));
+extern double y0 __P((double));
+extern double y1 __P((double));
+extern double yn __P((int, double));
+
+#if !defined(_XOPEN_SOURCE)
+extern double acosh __P((double));
+extern double asinh __P((double));
+extern double atanh __P((double));
+extern double cbrt __P((double));
+extern double logb __P((double));
+extern double nextafter __P((double, double));
+extern double remainder __P((double, double));
+extern double scalb __P((double, double));
+
+#ifndef __cplusplus
+extern int matherr __P((struct exception *));
+#endif
+
+/*
+ * IEEE Test Vector
+ */
+extern double significand __P((double));
+
+/*
+ * Functions callable from C, intended to support IEEE arithmetic.
+ */
+extern double copysign __P((double, double));
+extern int ilogb __P((double));
+extern double rint __P((double));
+extern double scalbn __P((double, int));
+
+/*
+ * BSD math library entry points
+ */
+extern double cabs();
+extern double drem __P((double, double));
+extern double expm1 __P((double));
+extern double log1p __P((double));
+
+/*
+ * Reentrant version of gamma & lgamma; passes signgam back by reference
+ * as the second argument; user must allocate space for signgam.
+ */
+#ifdef _REENTRANT
+extern double gamma_r __P((double, int *));
+extern double lgamma_r __P((double, int *));
+#endif /* _REENTRANT */
+
+
+/* float versions of ANSI/POSIX functions */
+extern float acosf __P((float));
+extern float asinf __P((float));
+extern float atanf __P((float));
+extern float atan2f __P((float, float));
+extern float cosf __P((float));
+extern float sinf __P((float));
+extern float tanf __P((float));
+
+extern float coshf __P((float));
+extern float sinhf __P((float));
+extern float tanhf __P((float));
+
+extern float expf __P((float));
+extern float frexpf __P((float, int *));
+extern float ldexpf __P((float, int));
+extern float logf __P((float));
+extern float log10f __P((float));
+extern float modff __P((float, float *));
+
+extern float powf __P((float, float));
+extern float sqrtf __P((float));
+
+extern float ceilf __P((float));
+extern float fabsf __P((float));
+extern float floorf __P((float));
+extern float fmodf __P((float, float));
+
+extern float erff __P((float));
+extern float erfcf __P((float));
+extern float gammaf __P((float));
+extern float hypotf __P((float, float));
+extern int isnanf __P((float));
+extern int finitef __P((float));
+extern float j0f __P((float));
+extern float j1f __P((float));
+extern float jnf __P((int, float));
+extern float lgammaf __P((float));
+extern float y0f __P((float));
+extern float y1f __P((float));
+extern float ynf __P((int, float));
+
+extern float acoshf __P((float));
+extern float asinhf __P((float));
+extern float atanhf __P((float));
+extern float cbrtf __P((float));
+extern float logbf __P((float));
+extern float nextafterf __P((float, float));
+extern float remainderf __P((float, float));
+extern float scalbf __P((float, float));
+
+/*
+ * float version of IEEE Test Vector
+ */
+extern float significandf __P((float));
+
+/*
+ * Float versions of functions callable from C, intended to support
+ * IEEE arithmetic.
+ */
+extern float copysignf __P((float, float));
+extern int ilogbf __P((float));
+extern float rintf __P((float));
+extern float scalbnf __P((float, int));
+
+/*
+ * float versions of BSD math library entry points
+ */
+extern float cabsf ();
+extern float dremf __P((float, float));
+extern float expm1f __P((float));
+extern float log1pf __P((float));
+
+/*
+ * Float versions of reentrant version of gamma & lgamma; passes
+ * signgam back by reference as the second argument; user must
+ * allocate space for signgam.
+ */
+#ifdef _REENTRANT
+extern float gammaf_r __P((float, int *));
+extern float lgammaf_r __P((float, int *));
+#endif /* _REENTRANT */
+
+#endif /* !_XOPEN_SOURCE */
+#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
+__END_DECLS
+
+#endif /* _MATH_H_ */
Added: dists/trunk/modules/unicorn/unicorn/libm/math_private.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/math_private.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,177 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math_private.h,v 1.8 2001/10/08 08:29:52 dfr Exp $
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define _MATH_PRIVATE_H_
+
+#include <sys/types.h>
+
+/* The original fdlibm code used statements like:
+ n0 = ((*(int*)&one)>>29)^1; * index of high word *
+ ix0 = *(n0+(int*)&x); * high word of x *
+ ix1 = *((1-n0)+(int*)&x); * low word of x *
+ to dig two 32 bit words out of the 64 bit IEEE floating point
+ value. That is non-ANSI, and, moreover, the gcc instruction
+ scheduler gets it wrong. We instead use the following macros.
+ Unlike the original code, we determine the endianness at compile
+ time, not at run time; I don't see much benefit to selecting
+ endianness at run time. */
+
+/* A union which permits us to convert between a double and two 32 bit
+ ints. */
+
+#if (BYTE_ORDER == BIG_ENDIAN) || defined(arm32)
+
+typedef union
+{
+ double value;
+ struct
+ {
+ u_int32_t msw;
+ u_int32_t lsw;
+ } parts;
+} ieee_double_shape_type;
+
+#endif
+
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(arm32)
+
+typedef union
+{
+ double value;
+ struct
+ {
+ u_int32_t lsw;
+ u_int32_t msw;
+ } parts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double. */
+
+#define EXTRACT_WORDS(ix0,ix1,d) \
+do { \
+ ieee_double_shape_type ew_u; \
+ ew_u.value = (d); \
+ (ix0) = ew_u.parts.msw; \
+ (ix1) = ew_u.parts.lsw; \
+} while (0)
+
+/* Get the more significant 32 bit int from a double. */
+
+#define GET_HIGH_WORD(i,d) \
+do { \
+ ieee_double_shape_type gh_u; \
+ gh_u.value = (d); \
+ (i) = gh_u.parts.msw; \
+} while (0)
+
+/* Get the less significant 32 bit int from a double. */
+
+#define GET_LOW_WORD(i,d) \
+do { \
+ ieee_double_shape_type gl_u; \
+ gl_u.value = (d); \
+ (i) = gl_u.parts.lsw; \
+} while (0)
+
+/* Set a double from two 32 bit ints. */
+
+#define INSERT_WORDS(d,ix0,ix1) \
+do { \
+ ieee_double_shape_type iw_u; \
+ iw_u.parts.msw = (ix0); \
+ iw_u.parts.lsw = (ix1); \
+ (d) = iw_u.value; \
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int. */
+
+#define SET_HIGH_WORD(d,v) \
+do { \
+ ieee_double_shape_type sh_u; \
+ sh_u.value = (d); \
+ sh_u.parts.msw = (v); \
+ (d) = sh_u.value; \
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int. */
+
+#define SET_LOW_WORD(d,v) \
+do { \
+ ieee_double_shape_type sl_u; \
+ sl_u.value = (d); \
+ sl_u.parts.lsw = (v); \
+ (d) = sl_u.value; \
+} while (0)
+
+/* A union which permits us to convert between a float and a 32 bit
+ int. */
+
+typedef union
+{
+ float value;
+ /* FIXME: Assumes 32 bit int. */
+ unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float. */
+
+#define GET_FLOAT_WORD(i,d) \
+do { \
+ ieee_float_shape_type gf_u; \
+ gf_u.value = (d); \
+ (i) = gf_u.word; \
+} while (0)
+
+/* Set a float from a 32 bit int. */
+
+#define SET_FLOAT_WORD(d,i) \
+do { \
+ ieee_float_shape_type sf_u; \
+ sf_u.word = (i); \
+ (d) = sf_u.value; \
+} while (0)
+
+/* ieee style elementary functions */
+
+/* single precision */
+extern float powf __P((float,float));
+extern float sqrtf __P((float));
+extern float logf __P((float));
+extern float fabsf __P((float));
+extern float __kernel_sinf __P((float,float,int));
+extern float __kernel_cosf __P((float,float));
+extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const int*));
+extern int __ieee754_rem_pio2f __P((float,float*));
+extern float __scalbnf __P((float, int));
+extern float __floorf __P((float));
+
+/* double precision */
+extern double pow __P((double,double));
+extern double sqrt __P((double));
+extern double log __P((double));
+extern double fabs __P((double));
+extern double __kernel_sin __P((double,double,int));
+extern double __kernel_cos __P((double,double));
+extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));
+extern int __ieee754_rem_pio2 __P((double,double*));
+extern double __scalbn __P((double, int));
+extern double __floor __P((double x));
+extern int isinf __P((double));
+
+#endif /* _MATH_PRIVATE_H_ */
Added: dists/trunk/modules/unicorn/unicorn/libm/s_ceil.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_ceil.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,87 @@
+/* @(#)s_ceil.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_ceil.c,v 1.8 1995/05/10 20:46:53 jtc Exp $";
+#endif
+
+/*
+ * ceil(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to ceil(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double huge = 1.0e300;
+#else
+static double huge = 1.0e300;
+#endif
+
+#ifdef __STDC__
+ double ceil(double x)
+#else
+ double ceil(x)
+ double x;
+#endif
+{
+ int32_t i0,i1,j0;
+ u_int32_t i,j;
+ EXTRACT_WORDS(i0,i1,x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=0x80000000;i1=0;}
+ else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
+ }
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0>0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((u_int32_t)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0>0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1 + (1<<(52-j0));
+ if(j<i1) i0+=1; /* got a carry */
+ i1 = j;
+ }
+ }
+ i1 &= (~i);
+ }
+ }
+ INSERT_WORDS(x,i0,i1);
+ return x;
+}
+/*
+weak_alias (__ceil, ceil)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ceil, __ceill)
+weak_alias (__ceil, ceill)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_ceilf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_ceilf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,61 @@
+/* s_ceilf.c -- float version of s_ceil.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_ceilf.c,v 1.4 1995/05/10 20:46:55 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float huge = 1.0e30;
+#else
+static float huge = 1.0e30;
+#endif
+
+#ifdef __STDC__
+ float ceilf(float x)
+#else
+ float ceilf(x)
+ float x;
+#endif
+{
+ int32_t i0,j0;
+ u_int32_t i;
+
+ GET_FLOAT_WORD(i0,x);
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=0x80000000;}
+ else if(i0!=0) { i0=0x3f800000;}
+ }
+ } else {
+ i = (0x007fffff)>>j0;
+ if((i0&i)==0) return x; /* x is integral */
+ if(huge+x>(float)0.0) { /* raise inexact flag */
+ if(i0>0) i0 += (0x00800000)>>j0;
+ i0 &= (~i);
+ }
+ }
+ } else {
+ if(j0==0x80) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ }
+ SET_FLOAT_WORD(x,i0);
+ return x;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/s_copysign.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_copysign.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,45 @@
+/* @(#)s_copysign.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $";
+#endif
+
+/*
+ * copysign(double x, double y)
+ * copysign(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ double __copysign(double x, double y)
+#else
+ double __copysign(x,y)
+ double x,y;
+#endif
+{
+ u_int32_t hx,hy;
+ GET_HIGH_WORD(hx,x);
+ GET_HIGH_WORD(hy,y);
+ SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
+ return x;
+}
+/*
+weak_alias (__copysign, copysign)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__copysign, __copysignl)
+weak_alias (__copysign, copysignl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_copysignf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_copysignf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,46 @@
+/* s_copysignf.c -- float version of s_copysign.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_copysignf.c,v 1.4 1995/05/10 20:46:59 jtc Exp $";
+#endif
+
+/*
+ * copysignf(float x, float y)
+ * copysignf(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ float __copysignf(float x, float y)
+#else
+ float __copysignf(x,y)
+ float x,y;
+#endif
+{
+ u_int32_t ix,iy;
+ GET_FLOAT_WORD(ix,x);
+ GET_FLOAT_WORD(iy,y);
+ SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000));
+ return x;
+}
+/* weak_alias (__copysignf, copysignf) */
+float copysignf(float x, float y)
+{
+ return (__copysignf(x, y));
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/s_fabs.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_fabs.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,35 @@
+/* @(#)s_fabs.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $";
+#endif
+
+/*
+ * fabs(x) returns the absolute value of x.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ double fabs(double x)
+#else
+ double fabs(x)
+ double x;
+#endif
+{
+ u_int32_t high;
+ GET_HIGH_WORD(high,x);
+ SET_HIGH_WORD(x,high&0x7fffffff);
+ return x;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/s_fabsf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_fabsf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,38 @@
+/* s_fabsf.c -- float version of s_fabs.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_fabsf.c,v 1.4 1995/05/10 20:47:15 jtc Exp $";
+#endif
+
+/*
+ * fabsf(x) returns the absolute value of x.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ float fabsf(float x)
+#else
+ float fabsf(x)
+ float x;
+#endif
+{
+ u_int32_t ix;
+ GET_FLOAT_WORD(ix,x);
+ SET_FLOAT_WORD(x,ix&0x7fffffff);
+ return x;
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/s_floor.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_floor.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,161 @@
+/* @(#)s_floor.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $";
+#endif
+
+/*
+ * floor(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to floor(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double huge = 1.0e300;
+#else
+static double huge = 1.0e300;
+#endif
+
+#ifdef __STDC__
+ double floor(double x)
+#else
+ double floor(x)
+ double x;
+#endif
+{
+
+ int32_t i0,i1,j0;
+ u_int32_t i,j;
+ EXTRACT_WORDS(i0,i1,x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=i1=0;}
+ else if(((i0&0x7fffffff)|i1)!=0)
+ { i0=0xbff00000;i1=0;}
+ }
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((u_int32_t)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1+(1<<(52-j0));
+ if(j<i1) i0 +=1 ; /* got a carry */
+ i1=j;
+ }
+ }
+ i1 &= (~i);
+ }
+ }
+
+ INSERT_WORDS(x,i0,i1);
+
+/*
+ unsigned int * px;
+ px = (unsigned int*)&x;
+ int ci;
+ for (ci=0; ci<2; ci++)
+ {
+ printk("%x\n",px[ci]);
+ }
+ printk("\n");
+*/
+ return x;
+}
+
+#ifdef __STDC__
+ double __floor(double x)
+#else
+ double __floor(x)
+ double x;
+#endif
+{
+ int32_t i0,i1,j0;
+ u_int32_t i,j;
+ EXTRACT_WORDS(i0,i1,x);
+ j0 = ((i0>>20)&0x7ff)-0x3ff;
+ if(j0<20) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=i1=0;}
+ else if(((i0&0x7fffffff)|i1)!=0)
+ { i0=0xbff00000;i1=0;}
+ }
+ } else {
+ i = (0x000fffff)>>j0;
+ if(((i0&i)|i1)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
+ }
+ }
+ } else if (j0>51) {
+ if(j0==0x400) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ } else {
+ i = ((u_int32_t)(0xffffffff))>>(j0-20);
+ if((i1&i)==0) return x; /* x is integral */
+ if(huge+x>0.0) { /* raise inexact flag */
+ if(i0<0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1+(1<<(52-j0));
+ if(j<i1) i0 +=1 ; /* got a carry */
+ i1=j;
+ }
+ }
+ i1 &= (~i);
+ }
+ }
+ INSERT_WORDS(x,i0,i1);
+
+/*
+ unsigned int * px;
+ px = (unsigned int*)&x;
+ int ci;
+ for (ci=0; ci<2; ci++)
+ {
+ printk("%x\n",px[ci]);
+ }
+ printk("\n");
+*/
+ return x;
+}
+
+/*
+weak_alias (__floor, floor)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__floor, __floorl)
+weak_alias (__floor, floorl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_floorf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_floorf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,71 @@
+/* s_floorf.c -- float version of s_floor.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_floorf.c,v 1.4 1995/05/10 20:47:22 jtc Exp $";
+#endif
+
+/*
+ * floorf(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to floorf(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float huge = 1.0e30;
+#else
+static float huge = 1.0e30;
+#endif
+
+#ifdef __STDC__
+ float __floorf(float x)
+#else
+ float __floorf(x)
+ float x;
+#endif
+{
+ int32_t i0,j0;
+ u_int32_t i;
+ GET_FLOAT_WORD(i0,x);
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=0;}
+ else if((i0&0x7fffffff)!=0)
+ { i0=0xbf800000;}
+ }
+ } else {
+ i = (0x007fffff)>>j0;
+ if((i0&i)==0) return x; /* x is integral */
+ if(huge+x>(float)0.0) { /* raise inexact flag */
+ if(i0<0) i0 += (0x00800000)>>j0;
+ i0 &= (~i);
+ }
+ }
+ } else {
+ if(j0==0x80) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ }
+ SET_FLOAT_WORD(x,i0);
+ return x;
+}
+/* weak_alias (__floorf, floorf) */
Added: dists/trunk/modules/unicorn/unicorn/libm/s_isinf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_isinf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,43 @@
+/*
+ * Written by J.T. Conklin <jtc at netbsd.org>.
+ * Changed to return -1 for -Inf by Ulrich Drepper <drepper at cygnus.com>.
+ * Public domain.
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_isinf.c,v 1.3 1995/05/11 23:20:14 jtc Exp $";
+#endif
+
+/*
+ * isinf(x) returns 1 is x is inf, -1 if x is -inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+int
+__isinf (double x)
+{
+ int32_t hx,lx;
+ EXTRACT_WORDS(hx,lx,x);
+ lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
+ lx |= -lx;
+ return ~(lx >> 31) & (hx >> 30);
+}
+
+int isinf (double x)
+{
+ int32_t hx,lx;
+ EXTRACT_WORDS(hx,lx,x);
+ lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
+ lx |= -lx;
+ return ~(lx >> 31) & (hx >> 30);
+}
+
+/*weak_alias (__isinf, isinf)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isinf, __isinfl)
+weak_alias (__isinf, isinfl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_scalbn.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_scalbn.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,103 @@
+/* @(#)s_scalbn.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $";
+#endif
+
+/*
+ * scalbn (double x, int n)
+ * scalbn(x,n) returns x* 2**n computed by exponent
+ * manipulation rather than by actually performing an
+ * exponentiation or a multiplication.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const double
+#else
+static double
+#endif
+two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
+twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
+huge = 1.0e+300,
+tiny = 1.0e-300;
+
+#ifdef __STDC__
+ double scalbn (double x, int n)
+#else
+ double scalbn (x,n)
+ double x; int n;
+#endif
+{
+ int32_t k,hx,lx;
+ EXTRACT_WORDS(hx,lx,x);
+ k = (hx&0x7ff00000)>>20; /* extract exponent */
+ if (k==0) { /* 0 or subnormal x */
+ if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */
+ x *= two54;
+ GET_HIGH_WORD(hx,x);
+ k = ((hx&0x7ff00000)>>20) - 54;
+ }
+ if (k==0x7ff) return x+x; /* NaN or Inf */
+ k = k+n;
+ if (n> 50000 || k > 0x7fe)
+ return huge*__copysign(huge,x); /* overflow */
+ if (n< -50000) return tiny*__copysign(tiny,x); /*underflow*/
+ if (k > 0) /* normal result */
+ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;}
+ if (k <= -54)
+ return tiny*__copysign(tiny,x); /*underflow*/
+ k += 54; /* subnormal result */
+ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
+ return x*twom54;
+}
+
+#ifdef __STDC__
+ double __scalbn (double x, int n)
+#else
+ double __scalbn (x,n)
+ double x; int n;
+#endif
+{
+ int32_t k,hx,lx;
+ EXTRACT_WORDS(hx,lx,x);
+ k = (hx&0x7ff00000)>>20; /* extract exponent */
+ if (k==0) { /* 0 or subnormal x */
+ if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */
+ x *= two54;
+ GET_HIGH_WORD(hx,x);
+ k = ((hx&0x7ff00000)>>20) - 54;
+ }
+ if (k==0x7ff) return x+x; /* NaN or Inf */
+ k = k+n;
+ if (n> 50000 || k > 0x7fe)
+ return huge*__copysign(huge,x); /* overflow */
+ if (n< -50000) return tiny*__copysign(tiny,x); /*underflow*/
+ if (k > 0) /* normal result */
+ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;}
+ if (k <= -54)
+ return tiny*__copysign(tiny,x); /*underflow*/
+ k += 54; /* subnormal result */
+ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
+ return x*twom54;
+}
+
+/*
+weak_alias (__scalbn, scalbn)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__scalbn, __scalbnl)
+weak_alias (__scalbn, scalbnl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_scalbnf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_scalbnf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,64 @@
+/* s_scalbnf.c -- float version of s_scalbn.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_scalbnf.c,v 1.4 1995/05/10 20:48:10 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const float
+#else
+static float
+#endif
+two25 = 3.355443200e+07, /* 0x4c000000 */
+twom25 = 2.9802322388e-08, /* 0x33000000 */
+huge = 1.0e+30,
+tiny = 1.0e-30;
+
+#ifdef __STDC__
+ float __scalbnf (float x, int n)
+#else
+ float __scalbnf (x,n)
+ float x; int n;
+#endif
+{
+ int32_t k,ix;
+ GET_FLOAT_WORD(ix,x);
+ k = (ix&0x7f800000)>>23; /* extract exponent */
+ if (k==0) { /* 0 or subnormal x */
+ if ((ix&0x7fffffff)==0) return x; /* +-0 */
+ x *= two25;
+ GET_FLOAT_WORD(ix,x);
+ k = ((ix&0x7f800000)>>23) - 25;
+ }
+ if (k==0xff) return x+x; /* NaN or Inf */
+ k = k+n;
+ if (n> 50000 || k > 0xfe)
+ return huge*copysignf(huge,x); /* overflow */
+ if (n< -50000)
+ return tiny*copysignf(tiny,x); /*underflow*/
+ if (k > 0) /* normal result */
+ {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;}
+ if (k <= -25)
+ return tiny*copysignf(tiny,x); /*underflow*/
+ k += 25; /* subnormal result */
+ SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23));
+ return x*twom25;
+}
+/* weak_alias (__scalbnf, scalbnf) */
+
Added: dists/trunk/modules/unicorn/unicorn/libm/s_sin.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_sin.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,98 @@
+/* @(#)s_sin.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_sin.c,v 1.7 1995/05/10 20:48:15 jtc Exp $";
+#endif
+
+/* sin(x)
+ * Return sine function of x.
+ *
+ * kernel function:
+ * __kernel_sin ... sine function on [-pi/4,pi/4]
+ * __kernel_cos ... cose function on [-pi/4,pi/4]
+ * __ieee754_rem_pio2 ... argument reduction routine
+ *
+ * Method.
+ * Let S,C and T denote the sin, cos and tan respectively on
+ * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ * in [-pi/4 , +pi/4], and let n = k mod 4.
+ * We have
+ *
+ * n sin(x) cos(x) tan(x)
+ * ----------------------------------------------------------
+ * 0 S C T
+ * 1 C -S -1/T
+ * 2 -S -C T
+ * 3 -C S -1/T
+ * ----------------------------------------------------------
+ *
+ * Special cases:
+ * Let trig be any of sin, cos, or tan.
+ * trig(+-INF) is NaN, with signals;
+ * trig(NaN) is that NaN;
+ *
+ * Accuracy:
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ double sin(double x)
+#else
+ double sin(x)
+ double x;
+#endif
+{
+ double y[2],z=0.0;
+ int32_t n, ix;
+
+ /* High word of x. */
+ GET_HIGH_WORD(ix,x);
+
+ /* |x| ~< pi/4 */
+ ix &= 0x7fffffff;
+ if(ix <= 0x3fe921fb)
+ {
+ return __kernel_sin(x,z,0);
+ }
+
+ /* sin(Inf or NaN) is NaN */
+ else if (ix>=0x7ff00000)
+ {
+ return x-x;
+ }
+
+ /* argument reduction needed */
+ else {
+ n = __ieee754_rem_pio2(x,y);
+ switch(n&3) {
+ case 0:
+ return __kernel_sin(y[0],y[1],1);
+ case 1:
+ return __kernel_cos(y[0],y[1]);
+ case 2:
+ return -__kernel_sin(y[0],y[1],1);
+ default:
+ return -__kernel_cos(y[0],y[1]);
+ }
+ }
+}
+/*
+weak_alias (__sin, sin)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__sin, __sinl)
+weak_alias (__sin, sinl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_sinf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_sinf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,53 @@
+/* s_sinf.c -- float version of s_sin.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian at cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_sinf.c,v 1.4 1995/05/10 20:48:16 jtc Exp $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ float sinf(float x)
+#else
+ float sinf(x)
+ float x;
+#endif
+{
+ float y[2],z=0.0;
+ int32_t n, ix;
+
+ GET_FLOAT_WORD(ix,x);
+
+ /* |x| ~< pi/4 */
+ ix &= 0x7fffffff;
+ if(ix <= 0x3f490fd8) return __kernel_sinf(x,z,0);
+
+ /* sin(Inf or NaN) is NaN */
+ else if (ix>=0x7f800000) return x-x;
+
+ /* argument reduction needed */
+ else {
+ n = __ieee754_rem_pio2f(x,y);
+ switch(n&3) {
+ case 0: return __kernel_sinf(y[0],y[1],1);
+ case 1: return __kernel_cosf(y[0],y[1]);
+ case 2: return -__kernel_sinf(y[0],y[1],1);
+ default:
+ return -__kernel_cosf(y[0],y[1]);
+ }
+ }
+}
Added: dists/trunk/modules/unicorn/unicorn/libm/s_trunc.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_trunc.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,63 @@
+/* Truncate argument to nearest integral value not larger than the argument.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+double
+__trunc (double x)
+{
+ int32_t i0, j0;
+ u_int32_t i1;
+ int sx;
+
+ EXTRACT_WORDS (i0, i1, x);
+ sx = i0 & 0x80000000;
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+ {
+ if (j0 < 0)
+ /* The magnitude of the number is < 1 so the result is +-0. */
+ INSERT_WORDS (x, sx, 0);
+ else
+ INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> j0)), 0);
+ }
+ else if (j0 > 51)
+ {
+ if (j0 == 0x400)
+ /* x is inf or NaN. */
+ return x + x;
+ }
+ else
+ {
+ INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (j0 - 20)));
+ }
+
+ return x;
+}
+/*
+weak_alias (__trunc, trunc)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__trunc, __truncl)
+weak_alias (__trunc, truncl)
+#endif
+*/
Added: dists/trunk/modules/unicorn/unicorn/libm/s_truncf.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/libm/s_truncf.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,52 @@
+/* Truncate argument to nearest integral value not larger than the argument.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+float
+__truncf (float x)
+{
+ int32_t i0, j0;
+ int sx;
+
+ GET_FLOAT_WORD (i0, x);
+ sx = i0 & 0x80000000;
+ j0 = ((i0 >> 23) & 0xff) - 0x7f;
+ if (j0 < 23)
+ {
+ if (j0 < 0)
+ /* The magnitude of the number is < 1 so the result is +-0. */
+ SET_FLOAT_WORD (x, sx);
+ else
+ SET_FLOAT_WORD (x, sx | (i0 & ~(0x007fffff >> j0)));
+ }
+ else
+ {
+ if (j0 == 0x80)
+ /* x is inf or NaN. */
+ return x + x;
+ }
+
+ return x;
+}
+// weak_alias (__truncf, truncf)
Added: dists/trunk/modules/unicorn/unicorn/msw/.crc.o.cmd
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/.crc.o.cmd Wed Dec 27 00:14:01 2006
@@ -0,0 +1,9 @@
+cmd_/home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.o := gcc -Wp,-MD,/home/fisaksen/src/unicorn/unicorn_usb/../msw/.crc.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.2/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i386 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -DVERS=0x093 -D_USB_DRIVER -DDEBUG=1 -I/home/fisaksen/src/unicorn/unicorn_usb/../include -I/home/fisaksen/src/unicorn/unicorn_usb/../ -DMODULE -DKBUILD_BASENAME=crc -c -o /home/fisaksen/src/unicorn/unicorn_usb/../msw/.tmp_crc.o /home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.c
+
+deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.o := \
+ /home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.c \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/crc.h \
+
+/home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.o: $(deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.o)
+
+$(deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/crc.o):
Added: dists/trunk/modules/unicorn/unicorn/msw/.linrapi.o.cmd
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/.linrapi.o.cmd Wed Dec 27 00:14:01 2006
@@ -0,0 +1,188 @@
+cmd_/home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.o := gcc -Wp,-MD,/home/fisaksen/src/unicorn/unicorn_usb/../msw/.linrapi.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.2/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i386 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -DVERS=0x093 -D_USB_DRIVER -DDEBUG=1 -I/home/fisaksen/src/unicorn/unicorn_usb/../include -I/home/fisaksen/src/unicorn/unicorn_usb/../ -DMODULE -DKBUILD_BASENAME=linrapi -c -o /home/fisaksen/src/unicorn/unicorn_usb/../msw/.tmp_linrapi.o /home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.c
+
+deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.o := \
+ /home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.c \
+ $(wildcard include/config/modversions.h) \
+ $(wildcard include/config/smp.h) \
+ include/linux/config.h \
+ $(wildcard include/config/h.h) \
+ include/linux/version.h \
+ include/linux/kernel.h \
+ $(wildcard include/config/debug/spinlock/sleep.h) \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/sysctl.h) \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ include/linux/linkage.h \
+ include/asm/linkage.h \
+ $(wildcard include/config/x86/alignment/16.h) \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ include/linux/compiler-gcc4.h \
+ include/linux/compiler-gcc.h \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ include/linux/posix_types.h \
+ include/asm/posix_types.h \
+ include/asm/types.h \
+ $(wildcard include/config/highmem64g.h) \
+ $(wildcard include/config/lbd.h) \
+ include/linux/bitops.h \
+ include/asm/bitops.h \
+ include/asm/byteorder.h \
+ $(wildcard include/config/x86/bswap.h) \
+ include/linux/byteorder/little_endian.h \
+ include/linux/byteorder/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ include/asm-generic/bug.h \
+ include/linux/list.h \
+ include/linux/prefetch.h \
+ include/asm/processor.h \
+ $(wildcard include/config/x86/ht.h) \
+ $(wildcard include/config/mk8.h) \
+ $(wildcard include/config/mk7.h) \
+ include/asm/vm86.h \
+ include/asm/math_emu.h \
+ include/asm/sigcontext.h \
+ include/asm/segment.h \
+ include/asm/page.h \
+ $(wildcard include/config/x86/use/3dnow.h) \
+ $(wildcard include/config/x86/pae.h) \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/highmem4g.h) \
+ $(wildcard include/config/discontigmem.h) \
+ include/asm/cpufeature.h \
+ include/asm/msr.h \
+ include/asm/system.h \
+ $(wildcard include/config/x86/cmpxchg.h) \
+ $(wildcard include/config/x86/oostore.h) \
+ include/linux/cache.h \
+ include/asm/cache.h \
+ $(wildcard include/config/x86/l1/cache/shift.h) \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/asm/semaphore.h \
+ include/asm/atomic.h \
+ $(wildcard include/config/m386.h) \
+ include/linux/wait.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/lockmeter.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ include/linux/thread_info.h \
+ include/asm/thread_info.h \
+ $(wildcard include/config/4kstacks.h) \
+ $(wildcard include/config/debug/stack/usage.h) \
+ include/linux/stringify.h \
+ include/asm/current.h \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/asm/timex.h \
+ $(wildcard include/config/x86/elan.h) \
+ $(wildcard include/config/x86/tsc.h) \
+ $(wildcard include/config/x86/generic.h) \
+ include/linux/timer.h \
+ include/linux/slab.h \
+ $(wildcard include/config/.h) \
+ $(wildcard include/config/numa.h) \
+ include/linux/gfp.h \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ include/linux/numa.h \
+ include/linux/init.h \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ include/linux/cpumask.h \
+ $(wildcard include/config/hotplug/cpu.h) \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ include/asm/string.h \
+ include/linux/smp.h \
+ include/asm/topology.h \
+ include/asm-generic/topology.h \
+ include/linux/kmalloc_sizes.h \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/large/allocs.h) \
+ include/linux/sched.h \
+ $(wildcard include/config/keys.h) \
+ $(wildcard include/config/inotify.h) \
+ $(wildcard include/config/schedstats.h) \
+ $(wildcard include/config/bsd/process/acct.h) \
+ $(wildcard include/config/cpusets.h) \
+ $(wildcard include/config/security.h) \
+ $(wildcard include/config/magic/sysrq.h) \
+ $(wildcard include/config/pm.h) \
+ include/asm/param.h \
+ include/linux/capability.h \
+ include/linux/timex.h \
+ $(wildcard include/config/time/interpolation.h) \
+ include/linux/time.h \
+ include/linux/seqlock.h \
+ include/linux/jiffies.h \
+ include/asm/div64.h \
+ include/linux/rbtree.h \
+ include/linux/errno.h \
+ include/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/nodemask.h \
+ include/asm/ptrace.h \
+ $(wildcard include/config/frame/pointer.h) \
+ include/asm/mmu.h \
+ include/asm/cputime.h \
+ include/asm-generic/cputime.h \
+ include/linux/sem.h \
+ $(wildcard include/config/sysvipc.h) \
+ include/linux/ipc.h \
+ include/asm/ipcbuf.h \
+ include/asm/sembuf.h \
+ include/linux/signal.h \
+ include/asm/signal.h \
+ include/asm-generic/signal.h \
+ include/asm/siginfo.h \
+ include/asm-generic/siginfo.h \
+ include/linux/securebits.h \
+ include/linux/fs_struct.h \
+ include/linux/completion.h \
+ include/linux/pid.h \
+ include/linux/percpu.h \
+ include/linux/seccomp.h \
+ $(wildcard include/config/seccomp.h) \
+ include/asm/seccomp.h \
+ include/linux/unistd.h \
+ include/asm/unistd.h \
+ include/linux/param.h \
+ include/linux/resource.h \
+ include/asm/resource.h \
+ include/asm-generic/resource.h \
+ include/linux/aio.h \
+ include/linux/workqueue.h \
+ include/linux/aio_abi.h \
+ include/linux/delay.h \
+ include/asm/delay.h \
+ include/linux/smp_lock.h \
+ $(wildcard include/config/lock/kernel.h) \
+ $(wildcard include/config/preempt/bkl.h) \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/types.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/hal.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/hard.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../amu/amas.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/tracetool.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/rapi.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/debug.h \
+
+/home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.o: $(deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.o)
+
+$(deps_/home/fisaksen/src/unicorn/unicorn_usb/../msw/linrapi.o):
Added: dists/trunk/modules/unicorn/unicorn/msw/crc.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/crc.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,199 @@
+#include "crc.h"
+
+//-----------------------------------------------------------------------------
+// 32 bit CRC support routines
+//
+// CRC Routines from net/wan/sbni.c)
+// table generated by Rocksoft^tm Model CRC Algorithm Table Generation Program V1.0
+//
+//-----------------------------------------------------------------------------
+#define CRC32_REMAINDER 0xCBF43926
+#define CRC32(c,crc) (crc32tab[((unsigned long)(crc>>24) ^ (c)) & 0xff] ^ (((crc) << 8)))
+const unsigned long crc32tab[256] =
+{
+ 0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L,
+ 0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L,
+ 0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L,
+ 0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL,
+ 0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L,
+ 0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L,
+ 0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L,
+ 0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL,
+ 0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L,
+ 0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L,
+ 0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L,
+ 0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL,
+ 0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L,
+ 0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L,
+ 0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L,
+ 0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL,
+ 0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL,
+ 0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L,
+ 0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L,
+ 0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL,
+ 0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL,
+ 0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L,
+ 0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L,
+ 0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL,
+ 0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL,
+ 0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L,
+ 0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L,
+ 0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL,
+ 0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL,
+ 0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L,
+ 0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L,
+ 0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL,
+ 0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L,
+ 0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL,
+ 0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL,
+ 0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L,
+ 0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L,
+ 0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL,
+ 0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL,
+ 0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L,
+ 0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L,
+ 0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL,
+ 0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL,
+ 0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L,
+ 0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L,
+ 0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL,
+ 0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL,
+ 0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L,
+ 0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L,
+ 0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL,
+ 0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L,
+ 0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L,
+ 0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L,
+ 0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL,
+ 0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L,
+ 0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L,
+ 0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L,
+ 0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL,
+ 0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L,
+ 0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L,
+ 0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L,
+ 0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL,
+ 0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L,
+ 0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L
+};
+
+//------------------------------------------------------------------------------
+// crc32
+//------------------------------------------------------------------------------
+unsigned long crc32(unsigned long initial, unsigned char *mem, int len)
+{
+ unsigned long crc;
+ crc = initial;
+ for(;len;mem++,len--) {
+ crc = CRC32(*mem, crc);
+ }
+ return(crc);
+}
+
+//-----------------------------------------------------------------------------
+// 10 bit CRC support routines
+//-----------------------------------------------------------------------------
+const unsigned short crc10tab[256] = {
+0x0000, 0x0233, 0x0255, 0x0066, 0x0299, 0x00aa, 0x00cc, 0x02ff,
+0x0301, 0x0132, 0x0154, 0x0367, 0x0198, 0x03ab, 0x03cd, 0x01fe,
+0x0031, 0x0202, 0x0264, 0x0057, 0x02a8, 0x009b, 0x00fd, 0x02ce,
+0x0330, 0x0103, 0x0165, 0x0356, 0x01a9, 0x039a, 0x03fc, 0x01cf,
+0x0062, 0x0251, 0x0237, 0x0004, 0x02fb, 0x00c8, 0x00ae, 0x029d,
+0x0363, 0x0150, 0x0136, 0x0305, 0x01fa, 0x03c9, 0x03af, 0x019c,
+0x0053, 0x0260, 0x0206, 0x0035, 0x02ca, 0x00f9, 0x009f, 0x02ac,
+0x0352, 0x0161, 0x0107, 0x0334, 0x01cb, 0x03f8, 0x039e, 0x01ad,
+0x00c4, 0x02f7, 0x0291, 0x00a2, 0x025d, 0x006e, 0x0008, 0x023b,
+0x03c5, 0x01f6, 0x0190, 0x03a3, 0x015c, 0x036f, 0x0309, 0x013a,
+0x00f5, 0x02c6, 0x02a0, 0x0093, 0x026c, 0x005f, 0x0039, 0x020a,
+0x03f4, 0x01c7, 0x01a1, 0x0392, 0x016d, 0x035e, 0x0338, 0x010b,
+0x00a6, 0x0295, 0x02f3, 0x00c0, 0x023f, 0x000c, 0x006a, 0x0259,
+0x03a7, 0x0194, 0x01f2, 0x03c1, 0x013e, 0x030d, 0x036b, 0x0158,
+0x0097, 0x02a4, 0x02c2, 0x00f1, 0x020e, 0x003d, 0x005b, 0x0268,
+0x0396, 0x01a5, 0x01c3, 0x03f0, 0x010f, 0x033c, 0x035a, 0x0169,
+0x0188, 0x03bb, 0x03dd, 0x01ee, 0x0311, 0x0122, 0x0144, 0x0377,
+0x0289, 0x00ba, 0x00dc, 0x02ef, 0x0010, 0x0223, 0x0245, 0x0076,
+0x01b9, 0x038a, 0x03ec, 0x01df, 0x0320, 0x0113, 0x0175, 0x0346,
+0x02b8, 0x008b, 0x00ed, 0x02de, 0x0021, 0x0212, 0x0274, 0x0047,
+0x01ea, 0x03d9, 0x03bf, 0x018c, 0x0373, 0x0140, 0x0126, 0x0315,
+0x02eb, 0x00d8, 0x00be, 0x028d, 0x0072, 0x0241, 0x0227, 0x0014,
+0x01db, 0x03e8, 0x038e, 0x01bd, 0x0342, 0x0171, 0x0117, 0x0324,
+0x02da, 0x00e9, 0x008f, 0x02bc, 0x0043, 0x0270, 0x0216, 0x0025,
+0x014c, 0x037f, 0x0319, 0x012a, 0x03d5, 0x01e6, 0x0180, 0x03b3,
+0x024d, 0x007e, 0x0018, 0x022b, 0x00d4, 0x02e7, 0x0281, 0x00b2,
+0x017d, 0x034e, 0x0328, 0x011b, 0x03e4, 0x01d7, 0x01b1, 0x0382,
+0x027c, 0x004f, 0x0029, 0x021a, 0x00e5, 0x02d6, 0x02b0, 0x0083,
+0x012e, 0x031d, 0x037b, 0x0148, 0x03b7, 0x0184, 0x01e2, 0x03d1,
+0x022f, 0x001c, 0x007a, 0x0249, 0x00b6, 0x0285, 0x02e3, 0x00d0,
+0x011f, 0x032c, 0x034a, 0x0179, 0x0386, 0x01b5, 0x01d3, 0x03e0,
+0x021e, 0x002d, 0x004b, 0x0278, 0x0087, 0x02b4, 0x02d2, 0x00e1
+};
+
+//------------------------------------------------------------------------------
+// crc10
+//------------------------------------------------------------------------------
+unsigned short crc10(unsigned short crc, unsigned char *mem, int len)
+{
+ int i;
+
+ for (i=0; i<len; i++) {
+ crc = ((crc<<8) & 0x3ff) ^ crc10tab[(crc>>2) & 0xff] ^ *mem++;
+ }
+ return crc;
+}
+
+//-----------------------------------------------------------------------------
+// 8 bit HEC support routines
+//-----------------------------------------------------------------------------
+const unsigned char hecTab[256] = {
+0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
+0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
+0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
+0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d,
+0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5,
+0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd,
+0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85,
+0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd,
+0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2,
+0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea,
+0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2,
+0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a,
+0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32,
+0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a,
+0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42,
+0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
+0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c,
+0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4,
+0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec,
+0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4,
+0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c,
+0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44,
+0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c,
+0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34,
+0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b,
+0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63,
+0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b,
+0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13,
+0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb,
+0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83,
+0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb,
+0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3
+};
+unsigned char hecCompute(unsigned char *p)
+{
+ unsigned char hec = 0;
+ int i;
+ for(i=0; i<4; i++) {
+ hec = hecTab[hec^(*p++)];
+ }
+ return hec^0x55;
+}
+
+int hecCheck(unsigned char *p)
+{
+ unsigned char hec = 0;
+ int i;
+ for(i=0; i<4; i++) {
+ hec = hecTab[hec^*p++];
+ }
+ return (hec^0x55)==(*p);
+}
Added: dists/trunk/modules/unicorn/unicorn/msw/fp_stubs.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/fp_stubs.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,54 @@
+#include <linux/config.h>
+#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
+#define MODVERSIONS
+#endif
+#ifdef MODVERSIONS
+#include <linux/modversions.h>
+#endif
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <stdio.h>
+#include <math.h>
+#include <bits/nan.h>
+#include <bits/errno.h>
+
+//======================================================================
+// Floating Point support
+// This is needed when using floating point in linux modules linked
+// with libm.a.
+//======================================================================
+FILE *stderr = NULL; // The floating point library needs this when error occurs
+int errno=0;
+extern void __assert_fail (const char *__assertion, const char *__file,
+ unsigned int __line, __const char *__function);
+
+
+extern int __isnan(double f)
+{
+ return f == NAN;
+}
+
+extern int fputs (const char *s, FILE *stream)
+{
+ WARN("%s",s);
+ return 0;
+}
+
+extern size_t fwrite (const void *ptr, size_t size,size_t n, FILE *s)
+{
+ WARN("\n");
+ return n;
+}
+
+extern int *__errno_location (void)
+{
+ return &errno;
+}
+
+extern void __assert_fail (const char *__assertion, const char *__file,
+ unsigned int __line, __const char *__function)
+{
+ printk(KERN_ERR "%s %s LINE%d %s\n",__assertion,__file,__line,__function);
+ BUG();
+}
Added: dists/trunk/modules/unicorn/unicorn/msw/linrapi.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/linrapi.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1584 @@
+/*
+ This driver supports the Unicorn ADSL chipset from STMicroelectronics.
+ The chipset consists of the ADSL DMT transceiver ST70137 and either the
+ ST70134A or ST70136 Analog Front End (AFE).
+ This file contain the rAPI(reduced API) functions.
+ rAPI is the interface between the Modem SW and the Operating System (here Linux).
+*/
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/list.h>
+#include <asm/semaphore.h>
+#include <asm/system.h>
+#include <asm/timex.h>
+#include <linux/timer.h>
+#include <linux/slab.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/signal.h>
+#include <linux/smp_lock.h>
+#include "types.h"
+#include "hal.h"
+#include "hard.h"
+#include "amu/amas.h"
+#include "tracetool.h"
+#include "rapi.h"
+#include "debug.h"
+
+
+//======================================================================
+// C++ support
+// This is needed when using C++ in linux modules
+//======================================================================
+
+// All static constructors/destructors in modem_ant_PCI/USB.o
+void _GLOBAL__I_Vendor_Id_code_ECI(void);
+void _GLOBAL__I_aocDbg(void);
+void _GLOBAL__I_eocDbg(void);
+void _GLOBAL__I_hsDbg(void);
+void _GLOBAL__I_modemSubsystemInfo(void);
+void _GLOBAL__I_prs(void);
+
+void _GLOBAL__D_Vendor_Id_code_ECI(void);
+void _GLOBAL__D_aocDbg(void);
+void _GLOBAL__D_eocDbg(void);
+void _GLOBAL__D_hsDbg(void);
+void _GLOBAL__D_modemSubsystemInfo(void);
+void _GLOBAL__D_prs(void);
+
+
+//======================================================================
+// Trace support
+// The MSW will call the PRINT_xxx functions to trace.
+//======================================================================
+
+extern unsigned long MswDebugLevel;
+
+
+//======================================================================
+// MSW INTERRUPT MANAGEMENT
+//======================================================================
+
+DWORD tosca_hardITABLE[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; // TOSCA Interrupt table visible to MSW
+WORD tosca_softITABLE[28] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+static DWORD tosca_intr_set = 0; // != 0 if interrupt set
+static struct task_struct *tosca_intr_thread_id = 0;
+static BOOLEAN tosca_intr_cancelled = FALSE; // TRUE if the INTR thread loop is cancelled
+static BOOLEAN tosca_intr_disabled = FALSE; // TRUE if the INTR thread does nothing
+DECLARE_WAIT_QUEUE_HEAD(tosca_intr_wait); // Wait queue for TOSCA Interrupt mgt
+
+
+
+//======================================================================
+// rAPI support
+// The reduced API used by the MSW
+//======================================================================
+
+#define MAX_MEM 100000UL
+
+#define RAPI_SIGNATURE 0xABC0UL
+#define MEM_TYPE (RAPI_SIGNATURE + 0x00)
+#define TASK_TYPE (RAPI_SIGNATURE + 0x01)
+#define SEM_TYPE (RAPI_SIGNATURE + 0x02)
+#define Q_TYPE (RAPI_SIGNATURE + 0x03)
+#define MSG_TYPE (RAPI_SIGNATURE + 0x04)
+#define TIMER_TYPE (RAPI_SIGNATURE + 0x05)
+
+#define HEAP_HDR \
+ struct list_head list; \
+ unsigned long type;\
+ unsigned long size;
+
+struct rapi_heap {
+ HEAP_HDR
+};
+
+struct rapi_mem {
+ HEAP_HDR
+ char mem[1];
+};
+
+struct rapi_task {
+ HEAP_HDR
+ char name[4];
+ DWORD priority;
+ DWORD args[4];
+ START_FUNC start_addr;
+ struct task_struct *thread;
+};
+
+struct rapi_sem {
+ HEAP_HDR
+ char name[4];
+ struct semaphore sem;
+ struct timer_list timer;
+};
+
+struct rapi_q {
+ HEAP_HDR
+ char name[4];
+ spinlock_t msg_q_lock;
+ struct list_head msg_q;
+ DWORD q_sem;
+};
+
+struct rapi_msg {
+ HEAP_HDR
+ DWORD msg_buf[4];
+ DWORD timer_id;
+};
+
+struct rapi_timer {
+ HEAP_HDR
+ struct timer_list timer;
+ DWORD qid;
+ DWORD mode;
+ DWORD interval;
+ DWORD userdata;
+ struct task_struct * owner;
+};
+
+//======================================================================
+// Memory allocation variables.
+//======================================================================
+static struct rapi_heap *min_addr=(struct rapi_heap *)-1,*max_addr=(struct rapi_heap *)0L;
+static unsigned long tot_mem=0L,max_mem=0L;
+static unsigned long obj_counters[6] = {0L};
+
+static LIST_HEAD(rapi_heap_list);
+static spinlock_t rapi_heap_lock=SPIN_LOCK_UNLOCKED;
+
+static atomic_t running_tasks = {0};
+
+static struct semaphore rapi_thread_lock; // To serialize rAPI threads
+
+static spinlock_t rapi_timer_lock=SPIN_LOCK_UNLOCKED;
+
+static spinlock_t tosca_lock=SPIN_LOCK_UNLOCKED;
+
+//======================================================================
+// C++ support
+// This is needed when using C++ in linux modules
+//======================================================================
+
+// call all the constructors
+void __do_global_ctors (void)
+{
+ _GLOBAL__I_Vendor_Id_code_ECI();
+ _GLOBAL__I_aocDbg();
+ _GLOBAL__I_eocDbg();
+ _GLOBAL__I_hsDbg();
+ _GLOBAL__I_modemSubsystemInfo();
+ _GLOBAL__I_prs();
+}
+
+// call all the destructors
+void __do_global_dtors (void)
+{
+ _GLOBAL__D_Vendor_Id_code_ECI();
+ _GLOBAL__D_aocDbg();
+ _GLOBAL__D_eocDbg();
+ _GLOBAL__D_hsDbg();
+ _GLOBAL__D_modemSubsystemInfo();
+ _GLOBAL__D_prs();
+}
+
+// C++ stubs
+extern void __gxx_personality_v0(void)
+{
+ WARN("__gxx_personality_v0 called\n");
+}
+
+extern void
+__cxa_pure_virtual(void)
+{
+ WARN("__cxa_pure_virtual called\n");
+}
+
+#if __GNUC__ >= 3
+extern void
+ __builtin_delete(void *ptr)
+{
+ DBG(RAPI_D,"ptr=%p\n",ptr);
+ xm_retmem(ptr);
+}
+
+extern void
+ __builtin_vec_delete(void *ptr)
+{
+ DBG(RAPI_D,"ptr=%p\n",ptr);
+ xm_retmem(ptr);
+}
+
+extern void *
+ __builtin_vec_new(size_t size)
+{
+ void *ptr;
+ xm_getmem(size,&ptr);
+ DBG(RAPI_D,"size=%d,ptr=%p\n",size,ptr);
+ return ptr;
+}
+
+extern void
+__pure_virtual(void)
+{
+ WARN("__pure_virtual called\n");
+}
+
+#else
+
+extern void
+_ZdlPv(void *ptr)
+{
+ // operator delete(void*)
+ xm_retmem(ptr);
+}
+
+extern void
+_ZdaPv(void *ptr)
+{
+ // operator delete[](void*)
+ xm_retmem(ptr);
+}
+
+extern void *
+_Znaj(unsigned size)
+{
+ // operator new[](unsigned)
+ void *ptr;
+
+ if (xm_getmem(size,&ptr) == SUCCESS) {
+ //PRINT_INFO("new[]: size=%d,ptr=%p\n",size,ptr);
+ } else {
+ ptr = NULL;
+ PRINT_ERROR("### xm_getmem failed,size=%ld\n",size);
+ }
+ return ptr;
+}
+#endif
+
+
+//======================================================================
+// Trace support
+// The msw will call the PRINT_xxx functions to trace.
+//======================================================================
+#if DEBUG
+extern unsigned long timer_int_counter;
+
+static DWORD start_time=0;
+
+static DWORD get_timestamp(void)
+{
+#ifdef USE_HW_TIMER
+ return timer_int_counter<<1;
+#else
+ return xtm_elapse(start_time);
+#endif
+}
+extern int PRINT_INFO(const char *format, ...)
+{
+ va_list args;
+ int i;
+ char buf[256];
+ char *p = buf;
+
+ if (MswDebugLevel > 0) return 0;
+
+ va_start(args, format);
+ i = vsprintf(buf, format, args);
+ va_end(args);
+ if (i > sizeof(buf)) BUG();
+ if (p[i-2] == '\r') p[i-2] = '\n';
+ if (p[i-1] == '\r') p[i-1] = '\n';
+
+
+ return printk(KERN_INFO "unicorn_msw-%ld: " "%s", get_timestamp(),p);
+}
+
+extern int PRINT_WARNING(const char *format, ...)
+{
+ va_list args;
+ int i;
+ char buf[256];
+ char *p = buf;
+
+ if (MswDebugLevel > 1) return 0;
+
+
+ va_start(args, format);
+ i = vsprintf(buf, format, args);
+ va_end(args);
+ if (i > sizeof(buf)) BUG();
+ if (p[i-2] == '\r') p[i-2] = '\n';
+ if (p[i-1] == '\r') p[i-1] = '\n';
+
+ return printk(KERN_WARNING "unicorn_msw: " "%s",p);
+}
+
+extern int PRINT_ERROR(const char *format, ...)
+{
+ va_list args;
+ int i;
+ char buf[256];
+ char *p = buf;
+
+ va_start(args, format);
+ i = vsprintf(buf, format, args);
+ va_end(args);
+ if (i > sizeof(buf)) BUG();
+ if (p[i-2] == '\r') p[i-2] = '\n';
+ if (p[i-1] == '\r') p[i-1] = '\n';
+
+ return printk(KERN_ERR "unicorn_msw: " "%s",p);
+}
+#endif
+
+//======================================================================
+// MSW INTERRUPT MANAGEMENT
+//======================================================================
+
+//----------------------------------------------------------------------
+// Copy the TOSCA software interrupt table from the hardware it. table.
+// Mask all bits according to the interrupt mask table.
+// Clear all bits of the hard table that have been set in the soft table.
+//----------------------------------------------------------------------
+static WORD CopySoftIntrTable(void)
+{
+ WORD sum;
+ UINT i;
+ for (i=0,sum=0; i<14; i++) {
+ tosca_softITABLE[i] = tosca_hardITABLE[i] & tosca_softITABLE[i+14];
+ atomic_clear_mask(tosca_softITABLE[i],&tosca_hardITABLE[i]);
+ //tosca_hardITABLE[i] &= ~tosca_softITABLE[i];
+ sum += tosca_softITABLE[i];
+ }
+ return sum;
+}
+
+//----------------------------------------------------------------------
+// IntrHandler
+//----------------------------------------------------------------------
+static ST_STATUS tosca_intr_handler(void)
+{
+ unsigned long flags;
+ for(;;) {
+ DBG(TOSCA_D,"tosca_intr_cancelled=%d,tosca_intr.intr_disabled=%d\n",
+ tosca_intr_cancelled,tosca_intr_disabled);
+
+ // Test if the interrupt loop has been cancelled
+ if (tosca_intr_cancelled) {
+ DBG(1,"tosca_intr_cancelled\n");
+ tosca_intr_cancelled = FALSE;
+ return FAILURE;
+ }
+
+
+ spin_lock_irqsave(&tosca_lock, flags);
+
+ // If the Interrupt is enabled
+ if (!tosca_intr_disabled) {
+ WORD set;
+ // -----------------------------------------------------------
+ // Copies the Software Interrupt table applying the mask table
+ // while clearing the corresponding bits in the hardware table
+ // this must be done synchronized with the ISR
+ // -----------------------------------------------------------
+ set = CopySoftIntrTable();
+
+ if (set) {
+ if (tosca_intr_disabled) {
+ WARN("tosca interrupt lost\n");
+ }
+
+ spin_unlock_irqrestore(&tosca_lock, flags);
+
+ break; // some bit is set in the interrupt table
+ }
+ }
+
+ spin_unlock_irqrestore(&tosca_lock, flags);
+
+ rapi_unlock();
+ // Waits for the TOSCA interrupt event generated by the ISR
+ interruptible_sleep_on_timeout(&tosca_intr_wait,(TOSCA_INTR_WDOG*HZ)/1000);
+ rapi_lock();
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// wake up the tosca interrupt task
+//----------------------------------------------------------------------
+extern void tosca_interrupt(void)
+{
+ wake_up(&tosca_intr_wait);
+}
+
+//----------------------------------------------------------------------
+// TOSCA Interrupt Task
+//----------------------------------------------------------------------
+static void tosca_interrupt_task(DWORD arg1,DWORD arg2,DWORD arg3,DWORD arg4)
+{
+ ITHANDLER Handler = (ITHANDLER)arg1;
+ DWORD DevNumber = arg3;
+ ST_STATUS status;
+
+ tosca_intr_thread_id = current;
+
+ for(;;) {
+ status = tosca_intr_handler();
+ if (status != SUCCESS) break;
+ DBG(TOSCA_D,"Entering MSW interrupt handler\n");
+ Handler(DevNumber);
+ }
+ tosca_intr_thread_id = 0;
+}
+
+//----------------------------------------------------------------------
+// USB_checkIntContext
+//----------------------------------------------------------------------
+BOOL USB_checkIntContext(void)
+{
+ return tosca_intr_thread_id == current;
+}
+
+//----------------------------------------------------------------------
+// board_set_intr_handler
+//----------------------------------------------------------------------
+DWORD board_set_intr_handler(DWORD intr,ITHANDLER handler,DWORD devNumber)
+{
+ DWORD tid;
+ DWORD s;
+ DWORD targs[4];
+
+ DBG(TOSCA_D,"intr=%ld\n",intr);
+
+ if (tosca_intr_set) {
+ WARN("failed (invalid argument)\n");
+ return ERR_BSP_ILL_INTR;
+ }
+ if (handler == NULL) {
+ WARN("failed (invalid argument)\n");
+ return ERR_BSP_ILL_INTR;
+ }
+ tosca_intr_set = intr;
+
+ s = xt_create("INTR",255,0,0,0,&tid);
+ if (s == FAILURE) {
+ WARN("xt_create() failed for Interrupt Task\n");
+ return ERR_BSP_ILL_INTR;
+ }
+
+ memset(targs,0,sizeof(targs));
+ targs[0] = (DWORD)handler;
+ targs[1] = intr;
+ targs[2] = devNumber;
+
+ s = xt_start(tid,0,tosca_interrupt_task,targs);
+ if (s == FAILURE) {
+ WARN("ERROR: xt_start() failed for Interrupt Task\n");
+ return ERR_BSP_ILL_INTR;
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// board_reset_intr_handler
+//----------------------------------------------------------------------
+DWORD board_reset_intr_handler(DWORD intr)
+{
+ DBG(TOSCA_D,"intr=%ld\n",intr);
+
+ if (intr != tosca_intr_set) {
+ DBG(RAPI_D,"failed (invalid argument)");
+ return ERR_BSP_ILL_INTR;
+ }
+ tosca_intr_set = 0L;
+ tosca_intr_cancelled = TRUE;
+ wake_up(&tosca_intr_wait);
+
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// board_clear_intr_pending
+//----------------------------------------------------------------------
+DWORD board_clear_intr_pending(DWORD intr)
+{
+ if (intr != tosca_intr_set) {
+ DBG(RAPI_D,"failed (invalid argument %ld)\n",intr);
+ return ERR_BSP_ILL_INTR;
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// board_mask_intr
+//----------------------------------------------------------------------
+DWORD board_mask_intr(DWORD intr)
+{
+ if (intr != tosca_intr_set) {
+ DBG(RAPI_D,"failed (invalid argument %ld)\n",intr);
+ return ERR_BSP_ILL_INTR;
+ }
+ board_disable_intrs();
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// board_unmask_intr
+//----------------------------------------------------------------------
+DWORD board_unmask_intr(DWORD intr)
+{
+ if (intr != tosca_intr_set) {
+ DBG(RAPI_D,"failed (invalid argument %ld)\n",intr);
+ return ERR_BSP_ILL_INTR;
+ }
+
+ board_enable_intrs();
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// board_disable_intrs
+//----------------------------------------------------------------------
+void board_disable_intrs(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&tosca_lock, flags);
+
+ tosca_intr_disabled = TRUE;
+
+ spin_unlock_irqrestore(&tosca_lock, flags);
+}
+
+//----------------------------------------------------------------------
+// board_enable_intrs
+//----------------------------------------------------------------------
+void board_enable_intrs(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&tosca_lock, flags);
+
+ if (tosca_intr_disabled) {
+ tosca_intr_disabled = FALSE;
+ wake_up(&tosca_intr_wait);
+ }
+
+ spin_unlock_irqrestore(&tosca_lock, flags);
+}
+
+
+//======================================================================
+// rAPI support
+// The reduced API used by the MSW
+//=====================================================================
+
+void do_rapi_lock(const char *func)
+{
+ if (down_trylock(&rapi_thread_lock)) {
+ DBG(1,"%s: down_trylock lock failed,task=%s\n",func,current->comm);
+ down(&rapi_thread_lock);
+ }
+}
+
+void do_rapi_unlock(const char *func)
+{
+ up(&rapi_thread_lock);
+ if (rapi_thread_lock.count.counter > 1) {
+ WARN("%s: counter > 1 (%d),task=%s\n",func,rapi_thread_lock.count.counter,current->comm);
+ }
+}
+
+// Check if the address is a valid RAPI object
+static int inline is_valid(void *addr,DWORD type)
+{
+ struct rapi_heap *obj=addr;
+
+ if (!obj) {
+ WARN("freeing NULL\n");
+ return 0;
+ }
+ if ( (obj < min_addr) || (obj > max_addr)) {
+ WARN("freeing invalid address %p,min_addr=%p,max_addr=%p\n",
+ obj,min_addr,max_addr);
+ return 0;
+ }
+
+ if (obj->type != type) {
+ WARN("invalid object %p, type %lx,exp %lx\n",obj,obj->type,type);
+ return 0;
+ }
+ // ok
+ return 1;
+}
+
+
+
+// Allocate a new memory object
+static void *alloc_obj(DWORD size,DWORD type)
+{
+ struct rapi_heap *obj;
+
+ if ((type > TIMER_TYPE) || (type < MEM_TYPE)) {
+ WARN("illegal object type %lx\n",type);
+ return NULL;
+ }
+ obj = kmalloc(size, type==MSG_TYPE ? GFP_ATOMIC : GFP_KERNEL);
+ if (!obj) {
+ WARN("kmalloc failed,size=%ld,type=%lx\n",size,type);
+ return NULL;
+ }
+ if (obj > max_addr) max_addr = obj;
+ if (obj < min_addr) min_addr = obj;
+ ++obj_counters[type-RAPI_SIGNATURE];
+ tot_mem += size;
+ if (tot_mem > max_mem) {
+ if ((max_mem < MAX_MEM) && (tot_mem > MAX_MEM)) {
+ WARN("total memory (%ld) exceeds max (%ld)\n",tot_mem,MAX_MEM);
+ }
+ max_mem = tot_mem;
+ }
+
+ obj->type = type;
+ obj->size = size;
+
+ return obj;
+}
+
+// Free the memory object
+static void free_obj(void *addr)
+{
+ struct rapi_heap *obj = (struct rapi_heap *)addr;
+
+ if (!obj) {
+ return;
+ }
+
+ if ((obj->type > TIMER_TYPE) || (obj->type < MEM_TYPE)) {
+ WARN("illegal object type %lx\n",obj->type);
+ return;
+ }
+ --obj_counters[obj->type-RAPI_SIGNATURE];
+ tot_mem -= obj->size;
+ obj->type = 0;
+ obj->size = 0;
+ kfree(obj);
+}
+
+// Allocate a new RAPI object
+static void *new_object(DWORD size,DWORD type)
+{
+ unsigned long flags;
+ struct rapi_heap *obj;
+
+ obj = alloc_obj(size,type);
+ if (obj) {
+ // add to list
+ spin_lock_irqsave(&rapi_heap_lock, flags);
+ list_add(&obj->list,&rapi_heap_list);
+ spin_unlock_irqrestore(&rapi_heap_lock, flags);
+ }
+ return obj;
+}
+
+// Delete the allocated RAPI object
+static int del_obj(void *addr)
+{
+ unsigned long flags;
+ struct rapi_heap *obj = (struct rapi_heap *)addr;
+
+ if (!obj) {
+ return FAILURE;
+ }
+
+ DBG(RAPI_D,"freeing object,addr=%lx,type=%lx\n",(long)obj,obj->type);
+
+ switch(obj->type) {
+
+ case MEM_TYPE:
+ break;
+ case TASK_TYPE:
+ break;
+ case SEM_TYPE:
+ // Stop semaphore timer
+ {
+ struct rapi_sem *s = (struct rapi_sem *)obj;
+
+ if (s->timer.data) {
+ del_timer(&s->timer);
+ s->timer.data = 0L;
+ }
+ }
+ break;
+ case Q_TYPE:
+ // Delete all messages on this q
+ {
+ DWORD tmp[4];
+
+ while (xq_receive((DWORD)obj,1,0,tmp) == SUCCESS) {
+ }
+ }
+ break;
+ case TIMER_TYPE:
+ {
+ struct rapi_timer *t = (struct rapi_timer *)obj;
+ del_timer(&t->timer);
+
+ }
+ break;
+ case MSG_TYPE:
+ default:
+ WARN("unknown object type %lx\n",obj->type);
+ return FAILURE;
+ break;
+ }
+ spin_lock_irqsave(&rapi_heap_lock, flags);
+ list_del(&obj->list);
+ spin_unlock_irqrestore(&rapi_heap_lock, flags);
+
+ free_obj(obj);
+
+ return SUCCESS;
+}
+
+static struct rapi_task *find_task(struct task_struct *thread)
+{
+ struct rapi_task *k,*ret;
+
+ ret = NULL;
+ for (k = (struct rapi_task *)rapi_heap_list.next;
+ k != (struct rapi_task *)&rapi_heap_list;
+ k = (struct rapi_task *)k->list.next
+ ) {
+ if ((k->type==TASK_TYPE) && (k->thread == thread)) {
+ ret = k;
+ break;
+ }
+ }
+ return ret;
+}
+
+static void rapi_exit_handler(void)
+{
+ struct rapi_task *k;
+ if ((k = find_task(current))) {
+ WARN("task %s killed\n",current->comm);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,8))
+ atomic_dec(&running_tasks);
+ rapi_unlock();
+ complete_and_exit(NULL,0);
+ ERR("\n");
+ BUG();
+#endif
+ } else {
+ WARN("thread %s not rAPI task\n",current->comm);
+ }
+}
+
+// Allocates a memory buffer
+// -------------------------
+DWORD xm_getmem(
+ DWORD size,
+ PVOID *bufaddr
+ )
+{
+ struct rapi_mem *m;
+
+ m = new_object(sizeof(struct rapi_heap) + size, MEM_TYPE);
+ if (!m) {
+ return FAILURE;
+ }
+ *bufaddr = &m->mem;
+ DBG(RAPI_D,"size=%ld,bufaddr=%lx\n",size,(long)(*bufaddr));
+ return SUCCESS;
+}
+
+// Release a memory buffer
+// -----------------------
+DWORD xm_retmem(
+ PVOID bufaddr
+ )
+{
+ struct rapi_mem *m;
+
+ DBG(RAPI_D,"bufaddr=%lx\n",(long)bufaddr);
+
+ m = (struct rapi_mem *)((char *)bufaddr - sizeof(struct rapi_heap));
+ if (!is_valid(m,MEM_TYPE)) {
+ return FAILURE;
+ }
+
+ return del_obj(m);
+}
+
+// Creates a task
+// --------------
+DWORD xt_create(
+ char name[4],
+ DWORD prio,
+ DWORD sstack,
+ DWORD ustack,
+ DWORD flags,
+ DWORD *tid
+ )
+{
+ struct rapi_task *k;
+
+ DBG(RAPI_D,"\n");
+
+ k = new_object(sizeof(struct rapi_task), TASK_TYPE);
+ if (!k) {
+ *tid = 0L;
+ return FAILURE;
+ }
+
+ k->priority = prio;
+ memcpy(k->name,name,4);
+ k->start_addr = NULL;
+ k->thread = NULL;
+ *tid = (DWORD)k;
+ return SUCCESS;
+}
+
+static int start_fn(void *arg)
+{
+ struct rapi_task *k = (struct rapi_task *)arg;
+
+ if (!is_valid(k, TASK_TYPE)) {
+ return FAILURE;
+ }
+ if (!k->start_addr) {
+ return FAILURE;
+ }
+
+ lock_kernel();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ daemonize("UNICORN");
+#else
+ exit_files(current);
+ daemonize();
+#endif
+ // Setup a nice name
+ strcpy(current->comm, "UNICORN-");
+ strncat(current->comm, k->name, 4);
+
+ unlock_kernel();
+
+ DBG(RAPI_D,"start %.4s\n",k->name);
+
+ atomic_inc(&running_tasks);
+
+ rapi_lock();
+ k->start_addr(k->args[0], k->args[1], k->args[2], k->args[3]);
+ rapi_unlock();
+ DBG(RAPI_D,"exit %.4s\n",k->name);
+ atomic_dec(&running_tasks);
+ return SUCCESS;
+}
+
+// Starts a task
+// -------------
+DWORD xt_start(
+ DWORD tid,
+ DWORD mode,
+ START_FUNC start_addr,
+ DWORD args[4]
+ )
+{
+ struct rapi_task *k = (struct rapi_task *)tid;
+ int pid;
+
+ if (!is_valid(k, TASK_TYPE)) {
+ return FAILURE;
+ }
+
+ k->start_addr = start_addr;
+ memcpy(k->args,args,sizeof(k->args));
+
+ pid = kernel_thread(start_fn, k, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+ if (pid <= 0) {
+ WARN("kernel_thread failed\n");
+ del_obj(k);
+ return FAILURE;
+ }
+ k->thread = find_task_by_pid(pid);
+ if (k->thread == NULL) {
+ WARN("kernel_thread failed\n");
+ del_obj(k);
+ return FAILURE;
+ }
+#ifdef CONFIG_SMP
+#ifndef CPU_MASK_CPU0
+#define CPU_MASK_CPU0 1UL
+#endif
+ // Hack to try to make it work on SMP !!!!
+ // Lock the threads to CPU #0
+ set_cpus_allowed(k->thread,CPU_MASK_CPU0);
+#endif
+ return SUCCESS;
+}
+
+// Disables task scheduling
+// ------------------------
+void xt_entercritical(void)
+{
+ DBG(RAPI_D,"\n");
+}
+
+
+// Enables task scheduling
+// -----------------------
+void xt_exitcritical(void)
+{
+ DBG(RAPI_D,"\n");
+}
+
+// Waits until all tasks terminate
+// -------------------------------
+void xt_waitexit(void)
+{
+ unsigned int count;
+
+ DBG(1,"running_tasks=%d\n",running_tasks.counter);
+
+ // Wait until all threads have terminated
+ count = 20;
+ while (atomic_read(&running_tasks) && count--) {
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(HZ);
+ }
+
+ DBG(1,"exit,running_tasks=%d\n",running_tasks.counter);
+}
+
+// Creates a semaphore
+// -------------------
+DWORD xsm_create(
+ char name[4],
+ DWORD count,
+ DWORD flags,
+ DWORD *smid
+ )
+{
+ struct rapi_sem *s;
+
+ s = new_object(sizeof(struct rapi_sem), SEM_TYPE);
+ if (!s) {
+ *smid = 0L;
+ return FAILURE;
+ }
+
+ memcpy(s->name,name,4);
+ sema_init(&s->sem,count);
+ init_timer(&s->timer);
+ s->timer.data = 0L;
+ *smid = (DWORD)s;
+ DBG(RAPI_D,"sem=%.4s,count=%ld\n",s->name,count);
+ return SUCCESS;
+}
+
+// Gets a semaphore ident
+// ----------------------
+DWORD xsm_ident(
+ char name[4],
+ DWORD node,
+ DWORD *smid
+ )
+{
+ unsigned long flags;
+ struct list_head *rapi_obj;
+ struct rapi_sem *s;
+ DWORD status = FAILURE;
+
+ *smid = 0L;
+ spin_lock_irqsave(&rapi_heap_lock, flags);
+ for (rapi_obj = rapi_heap_list.next;
+ rapi_obj != &rapi_heap_list;
+ rapi_obj = rapi_obj->next) {
+ s = (struct rapi_sem *)rapi_obj;
+ if ((s->type == SEM_TYPE) && (memcmp(s->name,name,4)==0)) {
+ *smid = (DWORD)s;
+ status = 0;
+ break;
+ }
+
+ }
+ spin_unlock_irqrestore(&rapi_heap_lock, flags);
+
+ DBG(RAPI_D,"name=%.4s,smid=%lx\n",name,*smid);
+ return status;
+}
+
+static void process_sem_timeout(unsigned long __data)
+{
+ struct task_struct * task_struct = (struct task_struct *) __data;
+
+ DBG(RAPI_D,"task_struct=%p\n",task_struct);
+ if (task_struct) {
+ send_sig(SIGALRM,task_struct,1);
+ }
+}
+
+// Allows a task to acquire a semaphore
+// ------------------------------------
+DWORD xsm_p(
+ DWORD smid,
+ DWORD no_wait,
+ DWORD timeout
+ )
+{
+ DWORD status;
+ int failed;
+ struct rapi_sem *s = (struct rapi_sem *)smid;
+
+ if (GlobalRemove) rapi_exit_handler();
+
+ if (!is_valid(s, SEM_TYPE)) {
+ return FAILURE;
+ }
+
+ DBG(RAPI_D,"sem=%.4s,count=%d,timeout=%ldms\n",
+ s->name,s->sem.count.counter,no_wait ? 0 : timeout);
+
+ status = SUCCESS;
+ if (down_trylock(&s->sem)) {
+ if (no_wait) {
+ status = FAILURE;
+ } else {
+ if (timeout) {
+ if (s->timer.data == 0) {
+ init_timer(&s->timer);
+ s->timer.expires = ((timeout*HZ)/1000) + jiffies;
+ s->timer.data = (unsigned long) current;
+ s->timer.function = process_sem_timeout;
+
+ add_timer(&s->timer);
+ } else {
+ WARN("%.4s timer already running\n",s->name);
+ }
+ }
+
+ rapi_unlock();
+ failed = down_interruptible(&s->sem);
+ rapi_lock();
+ if (failed) {
+ WARN("down_interruptible failed,sem=%.4s,count=%d\n",s->name,s->sem.count.counter);
+ status = FAILURE;
+ // has a timeout occured ?
+ if (sigismember(¤t->pending.signal,SIGALRM)) {
+ // clear signals
+ flush_signals(current);
+ } else {
+ // process killed
+ if (timeout) {
+ del_timer(&s->timer);
+ s->timer.data = 0L;
+ }
+ rapi_exit_handler();
+ }
+ }
+ if (timeout) {
+ del_timer(&s->timer);
+ s->timer.data = 0L;
+ }
+ if (GlobalRemove) rapi_exit_handler();
+ }
+ }
+ DBG(RAPI_D,"sem=%.4s,count=%d,status=%ld\n",s->name,s->sem.count.counter,status);
+ return status;
+}
+
+// Releases a semaphore
+// --------------------
+DWORD xsm_v(
+ DWORD smid
+ )
+{
+ struct rapi_sem *s = (struct rapi_sem *)smid;
+
+ if (!is_valid(s, SEM_TYPE)) {
+ return FAILURE;
+ }
+
+ DBG(RAPI_D,"sem=%.4s,count=%d\n",
+ s->name,s->sem.count.counter);
+
+ up(&s->sem);
+
+ return SUCCESS;
+}
+
+// Creates a message queue
+// -----------------------
+DWORD xq_create(
+ char name[4],
+ DWORD count,
+ DWORD flags,
+ DWORD *qid
+ )
+{
+ struct rapi_q *q;
+
+ *qid = 0L;
+ q = new_object(sizeof(struct rapi_q), Q_TYPE);
+ if (!q) {
+ *qid = 0L;
+ return FAILURE;
+ }
+ if (xsm_create(name,0,0,&q->q_sem) != SUCCESS) {
+ del_obj(q);
+ return FAILURE;
+ }
+
+ memcpy(q->name,name,4);
+ q->msg_q_lock = SPIN_LOCK_UNLOCKED;
+ INIT_LIST_HEAD(&q->msg_q);
+ *qid = (DWORD)q;
+ DBG(RAPI_D,"q=%.4s\n",q->name);
+ return SUCCESS;
+}
+
+static void handle_timer_msg(DWORD timer_id)
+{
+ unsigned long flags;
+ struct rapi_timer *t = (struct rapi_timer *)timer_id;
+
+ spin_lock_irqsave(&rapi_timer_lock, flags);
+
+ if (!is_valid(t,TIMER_TYPE)) {
+ goto exit;
+ }
+
+ DBG(RAPI_D,"tmid=%p,interval=%ldms,mode=%ld,userdata=%lx\n",t,t->interval,t->mode,t->userdata);
+
+ if (t->mode == E_XTM_ONE_SHOT) {
+ del_obj(t);
+ } else {
+ // restart
+ mod_timer(&t->timer,((t->interval*HZ)/1000)+jiffies);
+ }
+ exit:
+ spin_unlock_irqrestore(&rapi_timer_lock, flags);
+}
+
+// Receives a message from a queue
+// -------------------------------
+DWORD xq_receive(
+ DWORD qid,
+ DWORD no_wait,
+ DWORD timeout,
+ DWORD msg_buf[4]
+ )
+{
+ unsigned long flags;
+ struct rapi_q *q = (struct rapi_q *)qid;
+ struct rapi_msg *msg;
+ int i;
+ DWORD status;
+
+ if (GlobalRemove) rapi_exit_handler();
+
+ if (!is_valid(q, Q_TYPE)) {
+ return FAILURE;
+ }
+
+ DBG(RAPI_D,"q=%.4s,timeout=%ldms\n",q->name,no_wait ? 0 : timeout);
+
+ status = FAILURE;
+ if (xsm_p(q->q_sem, no_wait, timeout) == SUCCESS) {
+ spin_lock_irqsave(&q->msg_q_lock, flags);
+ if (!list_empty(&q->msg_q)) {
+ msg = (struct rapi_msg *)q->msg_q.next;
+ list_del_init(&msg->list);
+
+ for (i=0; i < 4; i++)
+ msg_buf[i] = msg->msg_buf[i];
+
+ // delete or restart timer
+ if (msg->timer_id) {
+ handle_timer_msg(msg->timer_id);
+ }
+
+ // Free message buffer
+ free_obj(msg);
+ DBG(RAPI_D,"msg_buf=%lx %lx %lx %lx\n",
+ msg_buf[0],msg_buf[1],msg_buf[2],msg_buf[3]);
+ status = SUCCESS;
+ } else {
+ spin_unlock_irqrestore(&q->msg_q_lock, flags);
+ for (i=0; i < 4; i++)
+ msg_buf[i] = 0L;
+ WARN("no msg\n");
+
+ }
+ spin_unlock_irqrestore(&q->msg_q_lock, flags);
+ }
+ return status;
+}
+
+static int msg_exists(struct rapi_q *q,DWORD timer_id)
+{
+ struct list_head *tmp;
+
+ if (timer_id == 0) {
+ return 0;
+ }
+ for (tmp = q->msg_q.next;
+ tmp != &q->msg_q;
+ tmp = tmp->next) {
+ struct rapi_msg *msg = (struct rapi_msg *)tmp;
+ if (timer_id == msg->timer_id) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int put_msg(DWORD qid,DWORD msg_buf[4],DWORD timer_id)
+{
+ unsigned long flags;
+ struct rapi_q *q = (struct rapi_q *)qid;
+ struct rapi_msg *msg;
+ int status;
+ int i;
+
+ if (!is_valid(q, Q_TYPE)) {
+ return FAILURE;
+ }
+
+ DBG(RAPI_D,"q=%.4s,msg_buf=%lx %lx %lx %lx\n",
+ q->name,msg_buf[0],msg_buf[1],msg_buf[2],msg_buf[3]);
+
+ spin_lock_irqsave(&q->msg_q_lock, flags);
+
+ if (msg_exists(q,timer_id)) {
+ DBG(RAPI_D,"duplicate timer %lx",timer_id);
+ status = FAILURE;
+ goto exit;
+ }
+
+ // Allocate message buffer
+ msg = alloc_obj(sizeof(struct rapi_msg),MSG_TYPE);
+ if (!msg) {
+ status = FAILURE;
+ goto exit;
+ }
+
+ for (i=0; i < 4; i++)
+ msg->msg_buf[i] = msg_buf[i];
+
+ msg->timer_id = timer_id;
+
+ list_add_tail(&msg->list,&q->msg_q);
+ xsm_v(q->q_sem); // Wake up task waiting for message
+
+ status = SUCCESS;
+ exit:
+ spin_unlock_irqrestore(&q->msg_q_lock, flags);
+ return status;
+}
+
+// Sends a message to a queue
+// --------------------------
+DWORD xq_send(
+ DWORD qid,
+ DWORD msg_buf[4]
+ )
+{
+ return put_msg(qid, msg_buf, 0);
+}
+
+//----------------------------------------------------------------------
+// TIMER MANAGEMENT
+//----------------------------------------------------------------------
+#define XMID_TIMER_EX 1
+
+#define GET_XMID_TIMER(msg_ptr) \
+ (*(unsigned short *)((unsigned long)msg_ptr))
+
+static void del_timer_msg(DWORD qid,DWORD timer_id)
+{
+ unsigned long flags;
+ struct rapi_q *q = (struct rapi_q *)qid;
+ struct list_head *tmp;
+
+ spin_lock_irqsave(&q->msg_q_lock, flags);
+ for (tmp = q->msg_q.next;
+ tmp != &q->msg_q;
+ tmp = tmp->next) {
+ struct rapi_msg *msg = (struct rapi_msg *)tmp;
+ if (timer_id == msg->timer_id) {
+ xsm_p(q->q_sem,1,0);
+ DBG(RAPI_D,"msg=%p,timer %lx,userdata=%lx\n",msg,timer_id,msg->msg_buf[3]);
+ list_del(&msg->list);
+ free_obj(msg);
+ break;
+ }
+ }
+ spin_unlock_irqrestore(&q->msg_q_lock, flags);
+}
+
+static void timer_callback(unsigned long __data)
+{
+ unsigned long flags;
+ struct rapi_timer *t = (struct rapi_timer *) __data;
+ DWORD msg_buf[4];
+
+ if (GlobalRemove) return;
+
+ spin_lock_irqsave(&rapi_timer_lock, flags);
+
+ if (!is_valid(t, TIMER_TYPE)) {
+ WARN("timer %p not valid\n",t);
+ goto exit;
+ }
+
+ DBG(RAPI_D,"tmid=%p,interval=%ldms,mode=%ld,userdata=%lx\n",
+ t,t->interval,t->mode,t->userdata);
+
+ msg_buf[0] = 0;
+ GET_XMID_TIMER(msg_buf) = XMID_TIMER_EX;
+ msg_buf[1] = (DWORD)t;
+ msg_buf[2] = 0;
+ msg_buf[3] = t->userdata;
+ put_msg(t->qid, msg_buf, (DWORD)t);
+exit:
+ spin_unlock_irqrestore(&rapi_timer_lock, flags);
+}
+
+
+
+// Starts a timer
+// --------------
+DWORD xtm_startmsgtimer(
+ DWORD qid,
+ T_timer_mode mode,
+ DWORD interval,
+ DWORD userdata,
+ BYTE owner_ctrl,
+ DWORD *tmid
+ )
+{
+ struct rapi_timer *t;
+
+ if (GlobalRemove) rapi_exit_handler();
+
+ *tmid = 0L;
+
+ mode &= 0xFFFF;
+ switch (mode) {
+ case E_XTM_ONE_SHOT:
+ case E_XTM_PERIODIC:
+ break;
+ default:
+ WARN("mode not valid\n");
+ return FAILURE;
+ }
+
+ t = new_object(sizeof(struct rapi_timer), TIMER_TYPE);
+ if (!t) {
+ return FAILURE;
+ }
+ DBG(RAPI_D,"tmid=%lx,qid=%lx,interval=%ldms,mode=%d,userdata=%lx\n",(DWORD)t,qid,interval,mode,userdata);
+ t->qid = qid;
+ t->mode = mode;
+ t->interval = interval;
+ t->userdata = userdata;
+ t->owner = owner_ctrl ? current : 0;
+ *tmid = (DWORD)t;
+
+ init_timer(&t->timer);
+ t->timer.expires = ((interval*HZ)/1000) + jiffies;
+ t->timer.data = (unsigned long)t;
+ t->timer.function = timer_callback;
+
+ add_timer(&t->timer);
+
+ return SUCCESS;
+}
+
+// Stops a timer
+// -------------
+DWORD xtm_stopmsgtimer(
+ DWORD tmid
+ )
+{
+ unsigned long flags;
+ struct rapi_timer *t = (struct rapi_timer *)tmid;
+ int status;
+
+ if (GlobalRemove) rapi_exit_handler();
+
+ DBG(RAPI_D,"tmid=%lx\n",tmid);
+
+ spin_lock_irqsave(&rapi_timer_lock, flags);
+
+ if (!is_valid(t, TIMER_TYPE)) {
+ WARN("timer %p not valid\n",t);
+ status = FAILURE;
+ goto exit;
+ }
+
+ if (t->owner) {
+ if (t->owner != current) {
+ WARN("not owner of timer\n");
+ status = FAILURE;
+ goto exit;
+ }
+ }
+
+ status = SUCCESS;
+ del_timer(&t->timer);
+ del_timer_msg(t->qid,tmid);
+ del_obj(t);
+ exit:
+ spin_unlock_irqrestore(&rapi_timer_lock, flags);
+ return status;
+}
+
+// Wake up after n milliseconds
+// ----------------------------
+DWORD xtm_wkafter(DWORD ms)
+{
+ signed long ticks;
+
+ DBG(RAPI_D,"timeout=%ldms\n",ms);
+
+ if (GlobalRemove) rapi_exit_handler();
+
+ ticks = (ms*HZ)/1000;
+
+ rapi_unlock();
+ if (ticks > 0) {
+ // sleep
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(ticks);
+ } else {
+ // busy loop
+ mdelay(ms);
+ }
+ rapi_lock();
+
+ if (GlobalRemove || signal_pending(current)) {
+ rapi_exit_handler();
+ return FAILURE;
+ }
+
+ return SUCCESS;
+}
+
+// Returns system time in ms.
+// --------------------------
+DWORD xtm_gettime(
+ void
+ )
+{
+ struct timeval tv;
+
+ do_gettimeofday(&tv);
+ return ((tv.tv_sec*1000)+(tv.tv_usec/1000));
+
+}
+
+// Returns in ms the difference between two times
+// ----------------------------------------------
+DWORD xtm_timediff(
+ DWORD time1,
+ DWORD time2
+ )
+{
+ return (time2 - time1);
+}
+
+// Returns the elapsed time since the given time
+// ---------------------------------------------
+DWORD xtm_elapse(
+ DWORD time
+ )
+{
+ return (xtm_gettime() - time);
+}
+
+// Gets a time stamp in ms and s.
+// -----------------------------
+DWORD xtm_gettimestamp(
+ DWORD *microseconds,
+ DWORD *seconds
+ )
+{
+ struct timeval tv;
+
+ do_gettimeofday(&tv);
+ *microseconds = tv.tv_usec;
+ *seconds = tv.tv_sec;
+ return SUCCESS;
+}
+
+extern int rapi_init(void)
+{
+ DBG(1,"HZ=%d\n",HZ);
+
+ // create rAPI thread lock
+ init_MUTEX(&rapi_thread_lock);
+
+ // Create C++ static classes
+ __do_global_ctors();
+
+ start_time = xtm_gettime();
+ DBG(1,"start_time=%ld\n",start_time);
+ return SUCCESS;
+}
+
+static void free_all(DWORD type)
+{
+ struct list_head *rapi_obj;
+ struct rapi_heap *tmp;
+
+ DBG(RAPI_D,"type=%lx\n",type);
+
+ for (rapi_obj = rapi_heap_list.next;
+ rapi_obj != &rapi_heap_list;
+ ) {
+ tmp = (struct rapi_heap *)rapi_obj;
+ rapi_obj = rapi_obj->next;
+ if ((type==0L) || (tmp->type == type)) {
+ del_obj(tmp);
+ }
+ }
+}
+
+extern void rapi_exit(void)
+{
+ DBG(1,"tot_mem=%ld,max_mem=%ld bytes\n",tot_mem,max_mem);
+ DBG(1,"obj_counters,MEM=%ld,TASK=%ld,SEM=%ld,Q=%ld,MSG=%ld,TIMER=%ld\n",
+ obj_counters[0],obj_counters[1],obj_counters[2],
+ obj_counters[3],obj_counters[4],obj_counters[5]);
+
+ __do_global_dtors();
+
+ board_disable_intrs();
+ board_reset_intr_handler(tosca_intr_set);
+
+ xt_waitexit();
+
+ // free the objects in a certain order
+
+ free_all(TASK_TYPE);
+ free_all(TIMER_TYPE);
+ free_all(Q_TYPE);
+ free_all(SEM_TYPE);
+ free_all(MSG_TYPE);
+ free_all(MEM_TYPE);
+ free_all(0L);
+
+ INIT_LIST_HEAD(&rapi_heap_list);
+}
Added: dists/trunk/modules/unicorn/unicorn/msw/msw.cpp
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/msw/msw.cpp Wed Dec 27 00:14:01 2006
@@ -0,0 +1,248 @@
+//----------------------------------------------------------------------
+// Test driver for the ST Microelectronics ADSL Chip Taurus PCI/USB
+//----------------------------------------------------------------------
+// file: msw.cpp
+// Authors: Maddalena Brattoli, Christophe Piel
+// Copyright STMicroelectronics 2000
+// Copyright F.H.L.P. 2000
+//----------------------------------------------------------------------
+#include <string.h>
+#include "types.h"
+#include "tracetool.h"
+#include "hal.h"
+#include "rapi.h"
+
+#include "../amu/amas.h"
+#include "../amu/bsp.h"
+
+int amu_go;
+
+unsigned long amu_init_modem(unsigned short MODE);
+void AMUTask(unsigned long,unsigned long ,unsigned long ,unsigned long);
+
+extern unsigned long g_AMUQid;
+extern unsigned long g_ModemState;
+extern unsigned int g_WaitForInit;
+extern unsigned int g_WaitForShowtime;
+extern bool L3_flag;
+extern unsigned long GlobalRemove;
+
+#if 1
+extern void *operator new(size_t size)
+{
+ void *ptr;
+
+ if (xm_getmem(size,&ptr) == SUCCESS) {
+ //PRINT_INFO("new: size=%d,ptr=%p\n",size,ptr);
+ } else {
+ ptr = NULL;
+ PRINT_ERROR("### xm_getmem failed,size=%ld\n",size);
+ }
+ return ptr;
+}
+
+extern void *operator new[](size_t size)
+{
+ void *ptr;
+
+ if (xm_getmem(size,&ptr) == SUCCESS) {
+ //PRINT_INFO("new[]: size=%d,ptr=%p\n",size,ptr);
+ } else {
+ ptr = NULL;
+ PRINT_ERROR("### xm_getmem failed,size=%ld\n",size);
+ }
+ return ptr;
+}
+
+extern void operator delete(void *ptr)
+{
+ //PRINT_INFO("delete: ptr=%p\n",ptr);
+ xm_retmem(ptr);
+}
+
+extern void operator delete[](void *ptr)
+{
+ //PRINT_INFO("delete[]: ptr=%p\n",ptr);
+ xm_retmem(ptr);
+}
+#endif
+
+void msw_init(unsigned short MODE)
+{
+ int err = 0;
+ unsigned long l_Tid;
+ unsigned long l_RetCode;
+ unsigned long l_TaskArgs[4];
+
+ err = AMSW_Modem_SW_Init(0,0,1);
+ if(err) PRINT_ERROR("AMSW_Modem_SW_Init() error\n");
+
+ err = AMSW_Chip_Halt();
+ if(err) PRINT_ERROR("AMSW_Chip_Halt() error\n");
+
+ err = initializeBoard();
+ if(err) PRINT_ERROR("initializeBoard() error\n");
+
+ err = amu_init_modem(MODE);
+ if(err) PRINT_ERROR("amu_init_modem error\n");
+
+ l_RetCode = xq_create((char *)"AMUQ", 0, 0, &l_TaskArgs[0]);
+ if (l_RetCode != 0)
+ {
+ PRINT_ERROR("***** AMU Queue creation error *****\n");
+ }
+ g_AMUQid = l_TaskArgs[0];
+
+ // create the AMU task
+
+ l_RetCode = xt_create((char *)"AMU0", 2, 1024, 0, 0, &l_Tid);
+ if (l_RetCode != 0)
+ {
+ PRINT_ERROR("***** AMU task creation error *****\n");
+ }
+
+ // start the AMU Task
+ amu_go = TRUE;
+ l_RetCode = xt_start(l_Tid, 0, AMUTask, l_TaskArgs);
+ if (l_RetCode != 0)
+ {
+ PRINT_ERROR("***** AMU task start error *****\n");
+ }
+}
+
+void msw_start(void)
+{
+ unsigned long l_RetCode = C_AMSW_REJ;
+ AMSW_ModemState l_modemState;
+
+ l_RetCode = AMSW_ANT_getModemState(&l_modemState);
+ if(l_RetCode != C_AMSW_ACK)
+ {
+ PRINT_ERROR("AMSW_ANT_getModemState error %d!\n",l_RetCode);
+ }
+ else switch(l_modemState)
+ {
+ case C_AMSW_SHOWTIME_L0 :
+ case C_AMSW_SHOWTIME_LQ :
+ case C_AMSW_SHOWTIME_L1 :
+ PRINT_ERROR("ATU_R already in SHOWTIME\n");
+ break;
+ case C_AMSW_ACTIVATING :
+ case C_AMSW_INITIALIZING:
+// AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ break;
+ case C_AMSW_L3 :
+ case C_AMSW_IDLE :
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_ACTIVATING);
+ if(l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange error!\n");
+ else
+ {
+ // Reset counters
+ g_WaitForInit = 0;
+ g_WaitForShowtime = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void msw_stop(void)
+{
+ unsigned long l_RetCode = C_AMSW_REJ;
+ AMSW_ModemState l_modemState;
+
+ PRINT_INFO("msw_stop\n");
+
+ if (GlobalRemove) return;
+
+ l_RetCode = AMSW_ANT_getModemState(&l_modemState);
+ PRINT_INFO("l_modemState=%d\n",l_modemState);
+ if (l_RetCode != C_AMSW_ACK)
+ {
+ PRINT_ERROR("AMSW_ANT_getModemState error\n");
+ }
+ else switch(l_modemState)
+ {
+ case C_AMSW_L3 :
+ case C_AMSW_IDLE :
+ PRINT_ERROR("ATU_R is DOWN\n");
+ break;
+ case C_AMSW_SHOWTIME_L0 :
+ case C_AMSW_SHOWTIME_L1 :
+ case C_AMSW_SHOWTIME_LQ :
+
+ // Perform orderly shutdown
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_L3);
+ if(l_RetCode != C_AMSW_ACK)
+ {
+ // If Error Give Disorderly shutdown
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange(C_AMSW_L3) error!\n");
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ if(l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) error!\n");
+ }
+ else
+ {
+ PRINT_ERROR("Waiting 5 sec to verify L3_executed\n");
+ for (int i=0; i<10; i++)
+ {
+ // Abort everything on surprise removal
+ if (GlobalRemove) return;
+ // verify acceptance of orderly shutdown
+ if ((
+ g_ModemState != C_AMSW_SHOWTIME_L0 &&
+ g_ModemState != C_AMSW_SHOWTIME_L1 &&
+ g_ModemState != C_AMSW_SHOWTIME_LQ
+ )) break;
+ xtm_wkafter(500);
+ }
+ if ((
+ g_ModemState == C_AMSW_SHOWTIME_L0 ||
+ g_ModemState == C_AMSW_SHOWTIME_L1 ||
+ g_ModemState == C_AMSW_SHOWTIME_LQ
+ ))
+ {
+ if (L3_flag == FALSE) // no answer received within 1 sec
+ PRINT_ERROR("No answer to orderly shutdown request for 1 sec!!\n");
+ PRINT_ERROR("Performing disorderly shutdown!!!\n");
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ if(l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) error!\n", l_RetCode);
+ }
+ }
+ break;
+
+ default: // IDLE request FIX : 15/01/2001
+ PRINT_ERROR("Performing disorderly shutdown!!!\n");
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ if(l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) error!\n");
+
+ break;
+ }
+}
+
+void msw_exit(void)
+{
+
+ unsigned long l_RetCode = C_AMSW_REJ;
+ amu_go = FALSE;
+
+ PRINT_INFO("msw_exit\n");
+
+ if (!GlobalRemove)
+ {
+ board_disable_intrs(); // disable interrupts before disabling the driver
+
+ l_RetCode = AMSW_ANT_requestModemStateChange(C_AMSW_IDLE);
+ PRINT_ERROR("Modem going to IDLE\n");
+ if (l_RetCode != C_AMSW_ACK)
+ PRINT_ERROR("AMSW_ANT_requestModemStateChange(C_AMSW_IDLE) error!\n", l_RetCode);
+ } else {
+ g_ModemState = C_AMSW_IDLE;
+ }
+ AMSW_Modem_SW_Exit();
+}
Added: dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-ohci.patch
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-ohci.patch Wed Dec 27 00:14:01 2006
@@ -0,0 +1,27 @@
+--- drivers/usb/host/usb-ohci.c.orig 2003-04-18 11:28:31.000000000 +0200
++++ drivers/usb/host/usb-ohci.c 2003-04-18 11:30:45.000000000 +0200
+@@ -490,13 +490,18 @@
+ usb_pipeout (urb->pipe)
+ ? PCI_DMA_TODEVICE
+ : PCI_DMA_FROMDEVICE);
+- urb->complete (urb);
++ if (urb->interval) {
++ urb->complete (urb);
+
+- /* implicitly requeued */
+- urb->actual_length = 0;
+- urb->status = -EINPROGRESS;
+- td_submit_urb (urb);
+- break;
++ /* implicitly requeued */
++ urb->actual_length = 0;
++ urb->status = -EINPROGRESS;
++ td_submit_urb (urb);
++ } else {
++ urb_rm_priv(urb);
++ urb->complete (urb);
++ }
++ break;
+
+ case PIPE_ISOCHRONOUS:
+ for (urbt = urb->next; urbt && (urbt != urb); urbt = urbt->next);
Added: dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-uhci.patch
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/patches/2.4.21-xxx/usb-uhci.patch Wed Dec 27 00:14:01 2006
@@ -0,0 +1,10 @@
+--- drivers/usb/host/usb-uhci.c.orig 2003-04-18 11:28:24.000000000 +0200
++++ drivers/usb/host/usb-uhci.c 2003-04-18 11:29:12.000000000 +0200
+@@ -2518,6 +2518,7 @@
+ // correct toggle after unlink
+ usb_dotoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe));
+ clr_td_ioc(desc); // inactivate TD
++ break;
+ }
+ }
+ }
Added: dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-ohci.patch
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-ohci.patch Wed Dec 27 00:14:01 2006
@@ -0,0 +1,25 @@
+--- drivers/usb/usb-ohci.c.orig 2003-04-16 15:42:46.000000000 +0200
++++ drivers/usb/usb-ohci.c 2003-04-16 15:45:41.000000000 +0200
+@@ -490,12 +490,17 @@
+ usb_pipeout (urb->pipe)
+ ? PCI_DMA_TODEVICE
+ : PCI_DMA_FROMDEVICE);
+- urb->complete (urb);
++ if (urb->interval) {
++ urb->complete (urb);
+
+- /* implicitly requeued */
+- urb->actual_length = 0;
+- urb->status = -EINPROGRESS;
+- td_submit_urb (urb);
++ /* implicitly requeued */
++ urb->actual_length = 0;
++ urb->status = -EINPROGRESS;
++ td_submit_urb (urb);
++ } else {
++ urb_rm_priv(urb);
++ urb->complete (urb);
++ }
+ break;
+
+ case PIPE_ISOCHRONOUS:
Added: dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-uhci.patch
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/patches/Mdk9.1/usb-uhci.patch Wed Dec 27 00:14:01 2006
@@ -0,0 +1,10 @@
+--- drivers/usb/usb-uhci.c.orig 2003-04-16 15:39:04.000000000 +0200
++++ drivers/usb/usb-uhci.c 2003-04-16 15:39:56.000000000 +0200
+@@ -2628,6 +2628,7 @@
+ // correct toggle after unlink
+ usb_dotoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe));
+ clr_td_ioc(desc); // inactivate TD
++ break;
+ }
+ }
+ }
Added: dists/trunk/modules/unicorn/unicorn/patches/README
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/patches/README Wed Dec 27 00:14:01 2006
@@ -0,0 +1,5 @@
+The usb-uhci and usb-ohci driver freezes with unicorn usb, because interrupt out
+one-shot transfers are not supported correctly.
+These patches applies to 2.4.21 pre/rc kernels and the kernel suppiled with Mandrake 9.1.
+The patch for Mandrake 9.1 should apply cleanly, however the patch for 2.4.21-xxx may fail.
+In this case, you can do the modification by hand.
Added: dists/trunk/modules/unicorn/unicorn/scripts/unicorn-ipoatm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/scripts/unicorn-ipoatm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+#LOC_IP=0.0.0.0
+#NETMASK=255.255.255.255
+#GW=0.0.0.0
+
+# set to correct product (USB or PCI)
+UNICORN="unicorn_pci_eth"
+#UNICORN="unicorn_usb_eth"
+
+# ANSI=1,G.lite=2,MULTI=3,G.dmt=4,
+MODULATION=1
+
+# default VPI, VCI and encapsulation
+VPI=8
+VCI=35
+
+# standard setting for IP over ATM
+PROTOCOL=ipoatm
+ENCAPS=null
+
+echo -n "$1 $UNICORN $PROTOCOL $VPI.$VCI $ENCAPS"
+
+stop () {
+ /sbin/ifconfig dsl0 down >/dev/null 2>&1
+ /sbin/modprobe -r $UNICORN >/dev/null 2>&1
+ return $?
+}
+
+start() {
+ /sbin/modprobe $UNICORN PROTOCOL=$PROTOCOL ActivationMode=$MODULATION VPI=$VPI VCI=$VCI
+ [ ! "$?" = 0 ] && return $?
+ /sbin/ifconfig dsl0 up
+ #/sbin/ifconfig dsl $LOC_IP netmask $NETMASK
+ #/sbin/route add gw $GW
+ return 0
+}
+
+case "$1" in
+ stop)
+ stop
+ ;;
+
+ start)
+ start
+ ;;
+
+ restart)
+ stop
+ start
+ ;;
+
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+RETVAL=$?
+if [ $RETVAL = 0 ]; then
+ echo_success
+else
+ echo_failure
+fi
+echo
+exit $RETVAL
Added: dists/trunk/modules/unicorn/unicorn/scripts/unicorn-pppoatm
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/scripts/unicorn-pppoatm Wed Dec 27 00:14:01 2006
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# set to correct product (USB or PCI)
+UNICORN="unicorn_pci_atm"
+#UNICORN="unicorn_usb_atm"
+
+# default VPI, VCI and encapsulation
+VPI=8
+VCI=35
+
+# ANSI=1,G.lite=2,MULTI=3,G.dmt=4,
+MODULATION=1
+
+# pppd version 2.4.0b2 patched
+#PPPD="/usr/src/ppp-2.4.0b2/pppd/pppd"
+#PLUGIN="/usr/lib/pppd/plugins/pppoatm.so"
+
+# pppd version 2.4.1
+PPPD="/usr/sbin/pppd"
+PLUGIN="/usr/lib/pppd/2.4.1/pppoatm.so"
+
+RETVAL=0
+
+stop() {
+ killproc $PPPD >/dev/null 2>&1
+ /sbin/modprobe -r $UNICORN >/dev/null 2>&1
+}
+
+start() {
+ /sbin/modprobe pppoatm
+ [ ! "$?" = 0 ] && return $?
+ /sbin/modprobe $UNICORN ActivationMode=$MODULATION >/dev/null 2>&1
+ [ ! "$?" = 0 ] && return $?
+ sleep 10
+ $PPPD plugin $PLUGIN $VPI.$VCI
+ [ ! "$?" = 0 ] && return $?
+ return 0
+}
+
+echo -n "$1 $UNICORN $PROTOCOL $VPI.$VCI $ENCAPS"
+
+case "$1" in
+ stop)
+ stop
+ ;;
+
+ start)
+ start
+ ;;
+
+ restart)
+ stop
+ start
+ ;;
+
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+RETVAL=$?
+if [ $RETVAL = 0 ]; then
+ echo_success
+else
+ echo_failure
+fi
+echo
+exit $RETVAL
Added: dists/trunk/modules/unicorn/unicorn/scripts/unicorn-rp-pppoe
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/scripts/unicorn-rp-pppoe Wed Dec 27 00:14:01 2006
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# set to correct product (USB or PCI)
+UNICORN="unicorn_pci_eth"
+#UNICORN="unicorn_usb_eth"
+
+# ANSI=1,G.lite=2,MULTI=3,G.dmt=4,
+MODULATION=1
+
+# default VPI, VCI and encapsulation
+VPI=8
+VCI=35
+
+# standard setting for PPP over Ethernet
+PROTOCOL=pppoe
+ENCAPS=llc-encaps
+
+# standard setting for PPP over ATM
+#PROTOCOL=pppoatm
+#ENCAPS=vc-encaps
+
+
+echo -n "$1 $UNICORN $PROTOCOL $VPI.$VCI $ENCAPS"
+
+stop () {
+ killproc pppd >/dev/null 2>&1
+ /sbin/ifconfig dsl0 down >/dev/null 2>&1
+ /sbin/modprobe -r $UNICORN >/dev/null 2>&1
+ return $?
+}
+
+start() {
+ /sbin/modprobe $UNICORN PROTOCOL=$PROTOCOL ActivationMode=$MODULATION VPI=$VPI VCI=$VCI >/dev/null 2>&1
+ [ ! "$?" = 0 ] && return $?
+ /sbin/ifconfig dsl0 up
+ [ ! "$?" = 0 ] && return $?
+ echo -n "start rp-pppoe"
+ pppd pty 'pppoe -I dsl0 -m 1452'
+ [ ! "$?" = 0 ] && return $?
+ return 0
+}
+
+case "$1" in
+ stop)
+ stop
+ ;;
+
+ start)
+ start
+ ;;
+
+ restart)
+ stop
+ start
+ ;;
+
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+RETVAL=$?
+if [ $RETVAL = 0 ]; then
+ echo_success
+else
+ echo_failure
+fi
+echo
+exit $RETVAL
Added: dists/trunk/modules/unicorn/unicorn/tools/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,28 @@
+CC=gcc
+LD=ld
+INSTALL=install
+CFLAGS := -Wall -Wstrict-prototypes -O2 -DLINUX
+INCLUDES := -I../amu/ -I../include/
+prefix=/usr/local
+BINDIR=$(prefix)/bin
+ifndef VERS
+VERS=0
+endif
+
+all: unicorn_status unicorn_status.cgi oam_ping
+
+unicorn_status: main.c unicorn_status.c unicorn_device.c
+ $(CC) -DVERS=$(VERS) $(CFLAGS) $(INCLUDES) main.c unicorn_status.c unicorn_device.c -o unicorn_status
+
+unicorn_status.cgi: cgi.c unicorn_status.c unicorn_device.c
+ $(CC) -DVERS=$(VERS) $(CFLAGS) $(INCLUDES) cgi.c unicorn_status.c unicorn_device.c -o unicorn_status.cgi
+
+oam_ping: oam_ping.c unicorn_device.c
+ $(CC) -DVERS=$(VERS) $(CFLAGS) $(INCLUDES) oam_ping.c unicorn_device.c -o oam_ping
+
+clean:
+ rm -f unicorn_status unicorn_status.cgi oam_ping *.o
+
+install: all
+ $(INSTALL) -s -c unicorn_status $(DESTDIR)$(BINDIR)
+ $(INSTALL) -s -c oam_ping $(DESTDIR)$(BINDIR)
Added: dists/trunk/modules/unicorn/unicorn/tools/cgi.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/cgi.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,57 @@
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include "unicorn_status.h"
+
+
+#define TITLE "Unicorn Status"
+#define HEADER "Unicorn Status"
+
+int do_status(void)
+{
+ int err;
+ ADSL_DEVICE device;
+
+ if ((err = open_device(&device)) != 0) {
+ printf("<li>Open Device failed : %s\n",strerror(err));
+ return err;
+ }
+
+ printf("<li>Modem State : %s\n",get_modem_state_string(&device));
+ printf("<li>Remote Report : %s\n",get_modem_event_string(&device));
+ printf("<li>Last Failure : %s\n",get_modem_failure_string(&device));
+ printf("<li>Time Connected : %s\n",get_time_connected_string(&device));
+ printf("<li>ATM cells sent: %ull\n",get_cells_sent(&device));
+ printf("<li>ATM cells rcvd: %ull\n",get_cells_rcvd(&device));
+ printf("<li>Modulation : %s\n",get_modulation_string(&device));
+ printf("<li>Rate Us/Ds (Kbps) : %4d/%4d\n",get_us_rate(&device),get_ds_rate(&device));
+ printf("<li>Cap. Occupation Us/Ds (%%) : %4d/%4d\n", get_us_cap_occ(&device),get_ds_cap_occ(&device));
+ printf("<li>Noise Margin Us/Ds (dB) : %4d/%4d\n",get_us_noise_margin(&device),get_ds_noise_margin(&device));
+ printf("<li>Attenuation Us/Ds (dB) : %4d/%4d\n",get_us_attenuation(&device),get_ds_attenuation(&device));
+ printf("<li>Output Power Us/Ds (dBm) : %4d/%4d\n",get_us_output_power(&device),get_ds_output_power(&device));
+ printf("<li>FEC Errors Us/Ds : %4d/%4d\n",get_us_fec_errors(&device),get_ds_fec_errors(&device));
+ printf("<li>CRC Errors Us/Ds : %4d/%4d\n",get_us_crc_errors(&device),get_ds_crc_errors(&device));
+ printf("<li>HEC Errors Us/Ds : %4d/%4d\n",get_us_hec_errors(&device),get_ds_hec_errors(&device));
+ printf("<li>Driver Version : %s\n",get_driver_version_string(&device));
+ printf("<li>Firmware Version : %s\n",get_version_string(&device));
+
+ close_device(&device);
+
+ return 0;
+}
+
+int main(void)
+{
+ printf("Content-type: text/html\n\n");
+ printf("<html> <head>\n");
+ printf("<title>%s</title>\n",TITLE);
+ printf("</head>\n\n");
+ printf("<body>\n");
+ printf("<h1>%s</h1>\n",HEADER);
+ printf("<hr>\n");
+
+ do_status();
+ printf("</body> </html>\n");
+ return 0;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/tools/main.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/main.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,41 @@
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include "unicorn_status.h"
+
+int do_status(void)
+{
+ int err;
+ ADSL_DEVICE device;
+
+ if ((err = open_device(&device)) != 0) {
+ printf("Open Device failed : %s\n",strerror(err));
+ return err;
+ }
+
+ printf("Modem State : %s\n",get_modem_state_string(&device));
+ printf("Remote Report : %s\n",get_modem_event_string(&device));
+ printf("Last Failure : %s\n",get_modem_failure_string(&device));
+ printf("Time Connected : %s\n",get_time_connected_string(&device));
+ printf("Modulation : %s\n",get_modulation_string(&device));
+ printf("Rate Us/Ds (Kbps) : %4d %4d\n",get_us_rate(&device),get_ds_rate(&device));
+ printf("Cap. Occupation Us/Ds (%%) : %4d %4d\n", get_us_cap_occ(&device),get_ds_cap_occ(&device));
+ printf("Noise Margin Us/Ds (dB) : %4d %4d\n",get_us_noise_margin(&device),get_ds_noise_margin(&device));
+ printf("Attenuation Us/Ds (dB) : %4d %4d\n",get_us_attenuation(&device),get_ds_attenuation(&device));
+ printf("Output Power Us/Ds (dBm) : %4d %4d\n",get_us_output_power(&device),get_ds_output_power(&device));
+ printf("FEC Errors Us/Ds : %4d %4d\n",get_us_fec_errors(&device),get_ds_fec_errors(&device));
+ printf("CRC Errors Us/Ds : %4d %4d\n",get_us_crc_errors(&device),get_ds_crc_errors(&device));
+ printf("HEC Errors Us/Ds : %4d %4d\n",get_us_hec_errors(&device),get_ds_hec_errors(&device));
+ printf("Driver Version : %s\n",get_driver_version_string(&device));
+ printf("Firmware Version : %s\n",get_version_string(&device));
+
+ close_device(&device);
+
+ return 0;
+}
+
+int main(void)
+{
+ do_status();
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/tools/oam_ping.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/oam_ping.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,88 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include "unicorn_device.h"
+
+static void get_oam_stats(ADSL_DEVICE *device,T_oam_stats *oam_stats)
+{
+ T_MswCtrl ctrl = {NET_CTL_GET_OAM_STATS,0,0,oam_stats,sizeof(T_oam_stats)};
+ memset(oam_stats,0,sizeof(T_oam_stats));
+ msw_ctrl(device,&ctrl);
+}
+
+static void send_oam(ADSL_DEVICE *device,int vpi,int vci)
+{
+ T_MswCtrl ctrl;
+ T_atm_channel tx_oam;
+
+ if ( vpi==0) {
+ tx_oam.type = ATM_OAM_F4;
+ } else {
+ tx_oam.type = ATM_OAM_F5;
+ }
+ tx_oam.vpi = vpi;
+ tx_oam.vci = vci;
+ ctrl.code = NET_CTL_TX_OAM_CELL;
+ ctrl.subcode = 0;
+ ctrl.buffer = &tx_oam;
+ ctrl.length = sizeof(tx_oam);
+
+ msw_ctrl(device,&ctrl);
+}
+
+static void usage(char *exec)
+{
+ fprintf(stderr,"usage: %s <vpi> <vci>\n",exec);
+}
+
+int main(int argc, char *argv[])
+{
+ int vpi,vci;
+ int err;
+ ADSL_DEVICE device;
+ T_oam_stats oam_stats;
+ int rx_fe_LB;
+ long ms;
+ int cells_received;
+
+ if (argc < 3) {
+ usage(argv[0]);
+ return 2;
+ }
+
+ vpi = atoi(argv[1]);
+ vci = atoi(argv[2]);
+
+
+ if ((err = open_device(&device)) != 0) {
+ printf("Open Device failed : %s\n",strerror(err));
+ return err;
+ }
+ get_oam_stats(&device,&oam_stats);
+ rx_fe_LB = oam_stats.rx_fe_LB;
+
+ printf("Send OAM loopback cell to %d.%d\n",vpi,vci);
+ send_oam(&device,vpi,vci);
+
+ /* listen for replies */
+ cells_received = 0;
+ ms = 0;
+ while (ms < 1000) {
+ get_oam_stats(&device,&oam_stats);
+ if (oam_stats.rx_fe_LB > rx_fe_LB) {
+ printf("Received OAM loopback cell from %d.%d time=%ldms\n",vpi,vci,ms);
+ cells_received += oam_stats.rx_fe_LB - rx_fe_LB;
+ rx_fe_LB = oam_stats.rx_fe_LB;
+ break;
+ }
+ usleep(1000);
+ ms += 1;
+ }
+ if (!cells_received) {
+ printf("No response from %d.%d\n",vpi,vci);
+ }
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,90 @@
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <linux/atmdev.h>
+#include "unicorn_device.h"
+
+
+int open_device(ADSL_DEVICE *device)
+{
+ unsigned long state=0L;
+ T_MswCtrl ctrl ={MSW_CTL_GET_STATE,0,0,&state,sizeof(state)};
+ int sd;
+
+ // try first ATM socket
+ sd = socket(PF_ATMPVC,SOCK_DGRAM,0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ATM_DRIVER;
+ device->req.atm.number = 0;
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC socket opened,itf=%d\n",device->req.atm.number);
+#endif
+ device->req.atm.arg = &ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC msw_ctrl failed,,err=%s(%d)\n",strerror(errno),errno);
+ close (sd);
+#endif
+ }
+ }
+
+ // try Ethernet socket
+ sd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ETH_DRIVER;
+ strcpy(device->req.eth.ifr_name,UNICORN_ETH_NAME);
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET socket opened,itf=%s\n",device->req.eth.ifr_name);
+#endif
+ device->req.eth.ifr_data = (char *)&ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET msw_ctrl failed,err=%s(%d)\n",strerror(errno),errno);
+ close (sd);
+#endif
+ }
+ }
+ return errno;
+}
+
+void close_device(ADSL_DEVICE *device)
+{
+ close(device->sd);
+ device->sd = -1;
+ device->type = 0;
+}
+
+int msw_ctrl(ADSL_DEVICE *device,T_MswCtrl *ctrl)
+{
+ ctrl->retcode = 0;
+ if (device->type == ATM_DRIVER) {
+ device->req.atm.arg = ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ } else if (device->type == ETH_DRIVER) {
+ device->req.eth.ifr_data = (char *)ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ }
+ return -1;
+}
Added: dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/unicorn_device.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,32 @@
+#ifndef __unicorn_device_h__
+#define __unicorn_device_h__
+
+#include <stdint.h>
+#include <linux/atm.h>
+#include <net/if.h>
+#include "unicorn.h"
+
+struct ADSL_DEVICE {
+ int sd;
+ enum {
+ ATM_DRIVER=1,
+ ETH_DRIVER=2
+ } type;
+ union {
+ struct atmif_sioc atm;
+ struct ifreq eth;
+ } req;
+};
+typedef struct ADSL_DEVICE ADSL_DEVICE;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ int open_device(ADSL_DEVICE *device);
+ void close_device(ADSL_DEVICE *device);
+ int msw_ctrl(ADSL_DEVICE *device,T_MswCtrl *ctrl);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,441 @@
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include "amu.h"
+#include "unicorn.h"
+#include "unicorn_status.h"
+
+
+static const char *modem_state_string(AMSW_ModemState modemState)
+{
+ switch(modemState) {
+ case C_AMSW_IDLE: return ("IDLE");
+ case C_AMSW_L3: return ("L3");
+ case C_AMSW_LISTENING: return ("LISTENING");
+ case C_AMSW_ACTIVATING: return ("ACTIVATING");
+ case C_AMSW_Ghs_HANDSHAKING: return ("Ghs_HANDSHAKING");
+ case C_AMSW_ANSI_HANDSHAKING: return ("ANSI_HANDSHAKING");
+ case C_AMSW_INITIALIZING: return ("INITIALIZING");
+ case C_AMSW_RESTARTING: return ("RESTARTING");
+ case C_AMSW_FAST_RETRAIN: return ("FAST_RETRAIN");
+ case C_AMSW_SHOWTIME_L0: return ("SHOWTIME_L0");
+ case C_AMSW_SHOWTIME_LQ: return ("SHOWTIME_LQ");
+ case C_AMSW_SHOWTIME_L1: return ("SHOWTIME_L1");
+ case C_AMSW_EXCHANGE: return ("EXCHANGE");
+ case C_AMSW_TRUNCATE: return ("TRUNCATE");
+ case C_AMSW_ESCAPE: return ("ESCAPE");
+ case C_AMSW_RETRY: return ("RETRY");
+ case C_AMSW_DISORDERLY: return ("DISORDERLY");
+ default: return (" ");
+ }
+}
+
+static const char *modem_event_string(AMSW_ModemEvent event)
+{
+ switch(event) {
+ case C_AMSW_PEER_ATU_FOUND: return ("Peer ATU Found");
+ case C_AMSW_RESTART_REQUEST: return ("Restart Request");
+ case C_AMSW_ACTIVATION_REQUEST: return ("Activation Request");
+ case C_AMSW_TO_INITIALIZING: return ("Initializing");
+ case C_AMSW_SHOWTIME: return ("Showtime");
+ case C_AMSW_L3_EXECUTED: return ("L3 Executed");
+ case C_AMSW_L3_REJECTED: return ("L3 Rejected");
+ case C_AMSW_L1_EXECUTED: return ("L1 Executed");
+ case C_AMSW_L1_REJECTED: return ("L1 Rejected");
+ case C_AMSW_L0_REJECTED: return ("L0 Rejected");
+ case C_AMSW_RESTART_ACCEPTABLE: return ("Restart Acceptable");
+ case C_AMSW_SUICIDE_REQUEST: return ("Suicide Request");
+ case C_AMSW_RESTART_NOT_ACCEPTABLE: return ("Restart Not Acceptable");
+ default: return (" ");
+ }
+}
+
+static const char *modem_failure_string(AMSW_ModemFailure failure)
+{
+ switch(failure) {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS: return ("Uncompatible Line Conditions");
+ case C_AMSW_NO_LOCK_POSSIBLE: return ("No Lock Possible");
+ case C_AMSW_PROTOCOL_ERROR: return ("Protocol Error");
+ case C_AMSW_MESSAGE_ERROR: return ("Message Error");
+ case C_AMSW_SPURIOUS_ATU_DETECTED: return ("Spurious ATU Detected");
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE: return ("Requested Bit Rate Too High");
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE: return ("Interleaved Profile Required for LITE");
+ case C_AMSW_FORCED_SILENCE: return ("Forced Silence");
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE: return ("Unselectable Operation Mode");
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN: return ("State Refused By Golden");
+ case C_AMSW_AMU_EVENT_ACT_TIMEOUT: return ("Activation Timeout");
+ case C_AMSW_AMU_EVENT_INI_TIMEOUT: return ("Initialization Timeout");
+ case C_AMSW_AMU_EVENT_SHUTDOWN: return ("Bringing Down Line due to persistent faults");
+ case C_AMSW_EVENT_RETRY: return ("Retry");
+ case C_AMSW_UNKNOWN: return ("Unknown");
+ case C_AMSW_UNKNOWN_FAILURE: return ("Unknown failure");
+ case C_AMSW_NO_HARDWARE: return ("No hardware detected");
+ case C_AMSW_NO_USB_BANDWIDTH: return ("USB bandwidth unavailable");
+ default: return (" ");
+ }
+}
+
+static const char *modulation_string(unsigned long operationalMode)
+{
+ switch(operationalMode) {
+ case AMSW_ANSI: return ("ANSI");
+ case AMSW_G_LITE: return ("G.lite");
+ case AMSW_G_DMT: return ("G.dmt");
+ default: return (" ");
+ }
+}
+
+static const char *time_connected_string(unsigned long TimeCnctd)
+{
+ if (TimeCnctd == 0L) {
+ return ("--:--:--");
+ } else {
+ unsigned long t = TimeCnctd/1000UL;
+ static char time_str[16];
+ unsigned long h = t/3600;
+ unsigned long s = t%3600;
+ unsigned long m = s/60;
+ s = s%60;
+ snprintf(time_str,16,"%2.2ld:%2.2ld:%2.2ld",h,m,s);
+ return time_str;
+ }
+}
+
+
+AMSW_ModemState get_modem_state(ADSL_DEVICE *device)
+{
+ AMSW_ModemState state=C_AMSW_IDLE;
+ T_MswCtrl ctrl = {MSW_CTL_GET_STATE,0,0,&state,sizeof(state)};
+ msw_ctrl(device,&ctrl);
+ return state;
+}
+
+
+static void get_state_info(ADSL_DEVICE *device,T_StateInfo *info)
+{
+ T_MswCtrl ctrl;
+
+ info->State = 0;
+ info->Report = -1;
+ info->Failure = C_AMSW_NO_HARDWARE;
+ info->TimeCnctd = 0L;
+
+ ctrl.code = MSW_CTL_STATE_INFO;
+ ctrl.subcode = 0;
+ ctrl.retcode = 0;
+ ctrl.buffer = info;
+ ctrl.length = sizeof(T_StateInfo);
+
+ msw_ctrl(device,&ctrl);
+}
+
+static void get_bit_rates(ADSL_DEVICE *device,unsigned short *bit_rates)
+{
+ int i;
+
+ for (i=0; i < 4; i++) {
+ T_AMSW_NT_ChannelOperData cod;
+ T_MswCtrl ctrl =
+ {MSW_CTL_GET_DATA,C_AMSW_NEAR_END_CHANNEL_DATA_FAST+i,
+ 0,&cod,sizeof(T_AMSW_NT_ChannelOperData)};
+ bit_rates[i] = 0;
+ msw_ctrl(device,&ctrl);
+ if (ctrl.retcode == 0) {
+ bit_rates[i] = cod.actualBitrate;
+ } else {
+ bit_rates[i] = 0;
+ }
+ }
+}
+
+static void get_near_end_line_oper_data(ADSL_DEVICE *device,T_AMSW_NT_NearEndLineOperData *nelod)
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_NEAR_END_LINE_DATA,0,
+ nelod,sizeof(T_AMSW_NT_NearEndLineOperData)};
+ memset(nelod,0,sizeof(T_AMSW_NT_NearEndLineOperData));
+ msw_ctrl(device,&ctrl);
+}
+
+static void get_far_end_line_oper_data(ADSL_DEVICE *device,T_AMSW_NT_FarEndLineOperData *felod)
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_FAR_END_LINE_DATA,0,
+ felod,sizeof(T_AMSW_NT_FarEndLineOperData)};
+ memset(felod,0,sizeof(T_AMSW_NT_FarEndLineOperData));
+ msw_ctrl(device,&ctrl);
+}
+
+static void get_counters(ADSL_DEVICE *device,T_AMSW_def_counter_set *dcs)
+{
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_PM_DATA,0,dcs,sizeof(T_AMSW_def_counter_set)};
+ memset(dcs,0,sizeof(T_AMSW_def_counters));
+ msw_ctrl(device,&ctrl);
+}
+
+
+const char *get_modem_state_string(ADSL_DEVICE *device)
+{
+ return modem_state_string(get_modem_state(device));
+}
+
+const char *get_modem_event_string(ADSL_DEVICE *device)
+{
+ T_StateInfo info;
+
+ get_state_info(device,&info);
+ return modem_event_string(info.Report);
+}
+
+const char *get_modem_failure_string(ADSL_DEVICE *device)
+{
+ T_StateInfo info;
+
+ get_state_info(device,&info);
+ return modem_failure_string(info.Failure);
+}
+
+const char *get_time_connected_string(ADSL_DEVICE *device)
+{
+ T_StateInfo info;
+
+ get_state_info(device,&info);
+ return time_connected_string(info.TimeCnctd);
+}
+
+unsigned long long get_cells_rcvd(ADSL_DEVICE *device)
+{
+ T_StateInfo info;
+
+ get_state_info(device,&info);
+ return info.RcvdCells;
+}
+
+unsigned long long get_cells_sent(ADSL_DEVICE *device)
+{
+ T_StateInfo info;
+
+ get_state_info(device,&info);
+ return info.SentCells;
+}
+
+const char *get_modulation_string(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_NearEndLineOperData nelod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_near_end_line_oper_data(device,&nelod);
+ return modulation_string(nelod.operationalMode);
+ } else {
+ return "";
+ }
+}
+
+int get_us_rate(ADSL_DEVICE *device)
+{
+ short bit_rates[4];
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_bit_rates(device,bit_rates);
+ return bit_rates[1]+bit_rates[3];
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_rate(ADSL_DEVICE *device)
+{
+ short bit_rates[4];
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_bit_rates(device,bit_rates);
+ return bit_rates[0]+bit_rates[2];
+ } else {
+ return 0;
+ }
+}
+
+int get_us_cap_occ(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_FarEndLineOperData felod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_far_end_line_oper_data(device,&felod);
+ return felod.relCapacityOccupationUpstr;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_cap_occ(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_NearEndLineOperData nelod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_near_end_line_oper_data(device,&nelod);
+ return nelod.relCapacityOccupationDnstr;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_noise_margin(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_FarEndLineOperData felod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_far_end_line_oper_data(device,&felod);
+ return felod.noiseMarginUpstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_noise_margin(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_NearEndLineOperData nelod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_near_end_line_oper_data(device,&nelod);
+ return nelod.noiseMarginDnstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_attenuation(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_FarEndLineOperData felod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_far_end_line_oper_data(device,&felod);
+ return felod.attenuationUpstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_attenuation(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_NearEndLineOperData nelod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_near_end_line_oper_data(device,&nelod);
+ return nelod.attenuationDnstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_output_power(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_NearEndLineOperData nelod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_near_end_line_oper_data(device,&nelod);
+ return nelod.outputPowerUpstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_output_power(ADSL_DEVICE *device)
+{
+ T_AMSW_NT_FarEndLineOperData felod;
+
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_far_end_line_oper_data(device,&felod);
+ return felod.outputPowerDnstr/2;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_fec_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.near_end.FecNotInterleaved+dcs.near_end.FecInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_fec_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.far_end.FecNotInterleaved+dcs.far_end.FecInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_crc_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.near_end.CrcNotInterleaved+dcs.near_end.CrcInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_crc_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.far_end.CrcNotInterleaved+dcs.far_end.CrcInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+int get_us_hec_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.near_end.HecNotInterleaved+dcs.near_end.HecInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+int get_ds_hec_errors(ADSL_DEVICE *device)
+{
+ T_AMSW_def_counter_set dcs;
+ if (get_modem_state(device) == C_AMSW_SHOWTIME_L0) {
+ get_counters(device,&dcs);
+ return dcs.far_end.HecNotInterleaved+dcs.far_end.HecInterleaved;
+ } else {
+ return 0;
+ }
+}
+
+const char *get_version_string(ADSL_DEVICE *device)
+{
+ static T_AMSW_VersionMS version;
+ T_MswCtrl ctrl = {MSW_CTL_GET_DATA,C_AMSW_VERSIONMS,0,&version,sizeof(T_AMSW_VersionMS)};
+
+ version.versionA[0] = 0;
+ msw_ctrl(device,&ctrl);
+ return version.versionA;
+}
+
+const char *get_driver_version_string(ADSL_DEVICE *device)
+{
+ unsigned long driver_version=0;
+ static char s[16];
+ T_MswCtrl ctrl = {MSW_CTL_VERSION_INFO,0,0,&driver_version,sizeof(driver_version)};
+ msw_ctrl(device,&ctrl);
+ sprintf(s,"%ld.%ld.%ld",(driver_version>>8)&0xf,(driver_version>>4)&0xf,driver_version&0xf);
+ return s;
+}
+
Added: dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.h
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/tools/unicorn_status.h Wed Dec 27 00:14:01 2006
@@ -0,0 +1,38 @@
+#ifndef __unicorn_status_h__
+#define __unicorn_status_h__
+
+#include "unicorn_device.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ const char *get_modem_state_string(ADSL_DEVICE *device);
+ const char *get_modem_event_string(ADSL_DEVICE *device);
+ const char *get_modem_failure_string(ADSL_DEVICE *device);
+ const char *get_time_connected_string(ADSL_DEVICE *device);
+ unsigned long long get_cells_rcvd(ADSL_DEVICE *device);
+ unsigned long long get_cells_sent(ADSL_DEVICE *device);
+ const char *get_modulation_string(ADSL_DEVICE *device);
+ int get_us_rate(ADSL_DEVICE *device);
+ int get_ds_rate(ADSL_DEVICE *device);
+ int get_us_cap_occ(ADSL_DEVICE *device);
+ int get_ds_cap_occ(ADSL_DEVICE *device);
+ int get_us_noise_margin(ADSL_DEVICE *device);
+ int get_ds_noise_margin(ADSL_DEVICE *device);
+ int get_us_attenuation(ADSL_DEVICE *device);
+ int get_ds_attenuation(ADSL_DEVICE *device);
+ int get_us_output_power(ADSL_DEVICE *device);
+ int get_ds_output_power(ADSL_DEVICE *device);
+ int get_us_fec_errors(ADSL_DEVICE *device);
+ int get_ds_fec_errors(ADSL_DEVICE *device);
+ int get_us_crc_errors(ADSL_DEVICE *device);
+ int get_ds_crc_errors(ADSL_DEVICE *device);
+ int get_us_hec_errors(ADSL_DEVICE *device);
+ int get_ds_hec_errors(ADSL_DEVICE *device);
+ const char *get_version_string(ADSL_DEVICE *device);
+ const char *get_driver_version_string(ADSL_DEVICE *device);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Added: dists/trunk/modules/unicorn/unicorn/tools/unicorntest
==============================================================================
Binary file. No diff available.
Added: dists/trunk/modules/unicorn/unicorn/unicorn.spec
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn.spec Wed Dec 27 00:14:01 2006
@@ -0,0 +1,70 @@
+# build for the current kernel version
+%define kernelversion %(uname -r)
+# if you want to build for another kernel, just replace "%(uname -r)" by the correct number.
+
+Summary: UNICORN ADSL modem software
+Name: unicorn
+Version: 0.8.7
+Release: 1
+Group: Applications/Networking
+License: Bewan
+Packager: Jean-Philippe Pick <jp at pick.eu.org>
+Source: http://www.bewan.fr/bewan/utilisateurs/telechargement/pilotes/adsl/linux/A1012-A1006-A904-A888-%{version}.tgz
+BuildRoot: %{_tmppath}/root-%{name}
+BuildRequires: kernel-source = %{kernelversion}
+Requires: kernel = %{kernelversion}
+
+%description
+UNICORN ADSL modem tools and drivers.
+
+%package utils
+Summary: UNICORN ADSL modem tools
+Group: Applications/Networking
+
+%description utils
+UNICORN ADSL modem tools.
+
+%package modules-%{kernelversion}
+Summary: UNICORN ADSL modem drivers
+Group: System Environment/Kernel
+
+%description modules-%{kernelversion}
+UNICORN ADSL modem drivers. PCI and USB version.
+only for kernel version %{kernelversion} !
+
+%prep
+%setup -q -n %{name}
+
+%build
+make KERNEL_SOURCES=/usr/src/linux-%{kernelversion}
+
+%install
+rm -rf %{buildroot}
+make install prefix=/usr DESTDIR=%{buildroot} KVERS=%{kernelversion}
+
+%clean
+rm -rf %{buildroot}
+
+%post modules-%{kernelversion}
+depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion}
+
+%postun modules-%{kernelversion}
+depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion}
+
+%files modules-%{kernelversion}
+%defattr(-,root,root,-)
+/lib/modules/*
+
+%files utils
+%defattr(-,root,root,-)
+/usr/bin/*
+/usr/share/bewan_adsl_status/pixmaps/*
+/usr/share/locale/*/LC_MESSAGES/*
+
+%changelog
+* Sat Apr 25 2004 Jean-Philippe Pick <jp at pick.eu.org>
+- upgraded to version 0.8.7
+
+* Mon Mar 01 2004 Jean-Philippe Pick <jp at pick.eu.org>
+- initial version for 0.8.1
+
Added: dists/trunk/modules/unicorn/unicorn/unicorn_atm/.unicorn_atmdrv.o.cmd
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_atm/.unicorn_atmdrv.o.cmd Wed Dec 27 00:14:01 2006
@@ -0,0 +1,372 @@
+cmd_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.o := gcc -Wp,-MD,/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/.unicorn_atmdrv.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.2/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i386 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -DVERS=0x093 -D_USB_DRIVER -DDEBUG=1 -I/home/fisaksen/src/unicorn/unicorn_usb/../include -I/home/fisaksen/src/unicorn/unicorn_usb/../ -DMODULE -DKBUILD_BASENAME=unicorn_atmdrv -DKBUILD_MODNAME=unicorn_usb_atm -c -o /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/.tmp_unicorn_atmdrv.o /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.c
+
+deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.o := \
+ /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.c \
+ $(wildcard include/config/modversions.h) \
+ include/linux/config.h \
+ $(wildcard include/config/h.h) \
+ include/linux/version.h \
+ include/linux/kernel.h \
+ $(wildcard include/config/debug/spinlock/sleep.h) \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/sysctl.h) \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ include/linux/linkage.h \
+ include/asm/linkage.h \
+ $(wildcard include/config/x86/alignment/16.h) \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ include/linux/compiler-gcc4.h \
+ include/linux/compiler-gcc.h \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ include/linux/posix_types.h \
+ include/asm/posix_types.h \
+ include/asm/types.h \
+ $(wildcard include/config/highmem64g.h) \
+ $(wildcard include/config/lbd.h) \
+ include/linux/bitops.h \
+ include/asm/bitops.h \
+ $(wildcard include/config/smp.h) \
+ include/asm/byteorder.h \
+ $(wildcard include/config/x86/bswap.h) \
+ include/linux/byteorder/little_endian.h \
+ include/linux/byteorder/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ include/asm-generic/bug.h \
+ include/linux/module.h \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/module/unload.h) \
+ $(wildcard include/config/kallsyms.h) \
+ include/linux/sched.h \
+ $(wildcard include/config/keys.h) \
+ $(wildcard include/config/inotify.h) \
+ $(wildcard include/config/schedstats.h) \
+ $(wildcard include/config/bsd/process/acct.h) \
+ $(wildcard include/config/numa.h) \
+ $(wildcard include/config/cpusets.h) \
+ $(wildcard include/config/hotplug/cpu.h) \
+ $(wildcard include/config/security.h) \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/magic/sysrq.h) \
+ $(wildcard include/config/pm.h) \
+ include/asm/param.h \
+ include/linux/capability.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/lockmeter.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ include/linux/thread_info.h \
+ include/asm/thread_info.h \
+ $(wildcard include/config/4kstacks.h) \
+ $(wildcard include/config/debug/stack/usage.h) \
+ include/asm/page.h \
+ $(wildcard include/config/x86/use/3dnow.h) \
+ $(wildcard include/config/x86/pae.h) \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/highmem4g.h) \
+ $(wildcard include/config/discontigmem.h) \
+ include/asm/processor.h \
+ $(wildcard include/config/x86/ht.h) \
+ $(wildcard include/config/mk8.h) \
+ $(wildcard include/config/mk7.h) \
+ include/asm/vm86.h \
+ include/asm/math_emu.h \
+ include/asm/sigcontext.h \
+ include/asm/segment.h \
+ include/asm/cpufeature.h \
+ include/asm/msr.h \
+ include/asm/system.h \
+ $(wildcard include/config/x86/cmpxchg.h) \
+ $(wildcard include/config/x86/oostore.h) \
+ include/linux/cache.h \
+ include/asm/cache.h \
+ $(wildcard include/config/x86/l1/cache/shift.h) \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/linux/stringify.h \
+ include/linux/timex.h \
+ $(wildcard include/config/time/interpolation.h) \
+ include/linux/time.h \
+ include/linux/seqlock.h \
+ include/asm/timex.h \
+ $(wildcard include/config/x86/elan.h) \
+ $(wildcard include/config/x86/tsc.h) \
+ $(wildcard include/config/x86/generic.h) \
+ include/linux/jiffies.h \
+ include/asm/div64.h \
+ include/linux/rbtree.h \
+ include/linux/cpumask.h \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ include/asm/string.h \
+ include/linux/errno.h \
+ include/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/nodemask.h \
+ include/linux/numa.h \
+ include/asm/semaphore.h \
+ include/asm/atomic.h \
+ $(wildcard include/config/m386.h) \
+ include/linux/wait.h \
+ include/linux/list.h \
+ include/linux/prefetch.h \
+ include/asm/current.h \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/asm/ptrace.h \
+ $(wildcard include/config/frame/pointer.h) \
+ include/asm/mmu.h \
+ include/asm/cputime.h \
+ include/asm-generic/cputime.h \
+ include/linux/smp.h \
+ include/linux/sem.h \
+ $(wildcard include/config/sysvipc.h) \
+ include/linux/ipc.h \
+ include/asm/ipcbuf.h \
+ include/asm/sembuf.h \
+ include/linux/signal.h \
+ include/asm/signal.h \
+ include/asm-generic/signal.h \
+ include/asm/siginfo.h \
+ include/asm-generic/siginfo.h \
+ include/linux/securebits.h \
+ include/linux/fs_struct.h \
+ include/linux/completion.h \
+ include/linux/pid.h \
+ include/linux/percpu.h \
+ include/linux/slab.h \
+ $(wildcard include/config/.h) \
+ include/linux/gfp.h \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ include/linux/init.h \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ include/asm/topology.h \
+ include/asm-generic/topology.h \
+ include/linux/kmalloc_sizes.h \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/large/allocs.h) \
+ include/linux/seccomp.h \
+ $(wildcard include/config/seccomp.h) \
+ include/asm/seccomp.h \
+ include/linux/unistd.h \
+ include/asm/unistd.h \
+ include/linux/param.h \
+ include/linux/resource.h \
+ include/asm/resource.h \
+ include/asm-generic/resource.h \
+ include/linux/timer.h \
+ include/linux/aio.h \
+ include/linux/workqueue.h \
+ include/linux/aio_abi.h \
+ include/linux/stat.h \
+ include/asm/stat.h \
+ include/linux/kmod.h \
+ $(wildcard include/config/kmod.h) \
+ include/linux/elf.h \
+ include/asm/elf.h \
+ include/asm/user.h \
+ include/linux/utsname.h \
+ include/linux/kobject.h \
+ include/linux/sysfs.h \
+ $(wildcard include/config/sysfs.h) \
+ include/linux/kref.h \
+ include/linux/kobject_uevent.h \
+ $(wildcard include/config/kobject/uevent.h) \
+ include/linux/moduleparam.h \
+ include/asm/local.h \
+ include/asm/module.h \
+ $(wildcard include/config/m486.h) \
+ $(wildcard include/config/m586.h) \
+ $(wildcard include/config/m586tsc.h) \
+ $(wildcard include/config/m586mmx.h) \
+ $(wildcard include/config/m686.h) \
+ $(wildcard include/config/mpentiumii.h) \
+ $(wildcard include/config/mpentiumiii.h) \
+ $(wildcard include/config/mpentiumm.h) \
+ $(wildcard include/config/mpentium4.h) \
+ $(wildcard include/config/mk6.h) \
+ $(wildcard include/config/mcrusoe.h) \
+ $(wildcard include/config/mefficeon.h) \
+ $(wildcard include/config/mwinchipc6.h) \
+ $(wildcard include/config/mwinchip2.h) \
+ $(wildcard include/config/mwinchip3d.h) \
+ $(wildcard include/config/mcyrixiii.h) \
+ $(wildcard include/config/mviac3/2.h) \
+ $(wildcard include/config/mgeodegx1.h) \
+ $(wildcard include/config/regparm.h) \
+ include/linux/smp_lock.h \
+ $(wildcard include/config/lock/kernel.h) \
+ $(wildcard include/config/preempt/bkl.h) \
+ include/linux/random.h \
+ include/linux/ioctl.h \
+ include/asm/ioctl.h \
+ include/linux/atm.h \
+ include/linux/socket.h \
+ $(wildcard include/config/compat.h) \
+ include/asm/socket.h \
+ include/asm/sockios.h \
+ include/linux/sockios.h \
+ include/linux/uio.h \
+ include/linux/atmapi.h \
+ include/linux/atmsap.h \
+ include/linux/atmioc.h \
+ include/linux/atmdev.h \
+ $(wildcard include/config/proc/fs.h) \
+ include/linux/net.h \
+ include/linux/skbuff.h \
+ $(wildcard include/config/netfilter.h) \
+ $(wildcard include/config/bridge/netfilter.h) \
+ $(wildcard include/config/vlan/8021q.h) \
+ $(wildcard include/config/vlan/8021q/module.h) \
+ $(wildcard include/config/netfilter/debug.h) \
+ $(wildcard include/config/hippi.h) \
+ $(wildcard include/config/net/sched.h) \
+ $(wildcard include/config/net/cls/act.h) \
+ $(wildcard include/config/have/arch/dev/alloc/skb.h) \
+ $(wildcard include/config/highmem.h) \
+ include/linux/mm.h \
+ $(wildcard include/config/stack/growsup.h) \
+ $(wildcard include/config/shmem.h) \
+ $(wildcard include/config/debug/pagealloc.h) \
+ include/linux/prio_tree.h \
+ include/linux/fs.h \
+ $(wildcard include/config/dnotify.h) \
+ $(wildcard include/config/quota.h) \
+ $(wildcard include/config/epoll.h) \
+ $(wildcard include/config/auditsyscall.h) \
+ include/linux/limits.h \
+ include/linux/kdev_t.h \
+ include/linux/dcache.h \
+ include/linux/rcupdate.h \
+ include/linux/radix-tree.h \
+ include/linux/quota.h \
+ include/linux/dqblk_xfs.h \
+ include/linux/dqblk_v1.h \
+ include/linux/dqblk_v2.h \
+ include/linux/nfs_fs_i.h \
+ include/linux/nfs.h \
+ include/linux/sunrpc/msg_prot.h \
+ include/linux/fcntl.h \
+ include/asm/fcntl.h \
+ include/linux/err.h \
+ include/asm/pgtable.h \
+ $(wildcard include/config/highpte.h) \
+ include/asm/fixmap.h \
+ $(wildcard include/config/x86/local/apic.h) \
+ $(wildcard include/config/x86/io/apic.h) \
+ $(wildcard include/config/x86/visws/apic.h) \
+ $(wildcard include/config/x86/f00f/bug.h) \
+ $(wildcard include/config/x86/cyclone/timer.h) \
+ $(wildcard include/config/acpi/boot.h) \
+ $(wildcard include/config/pci/mmconfig.h) \
+ include/asm/acpi.h \
+ $(wildcard include/config/acpi/pci.h) \
+ $(wildcard include/config/acpi/sleep.h) \
+ include/acpi/pdc_intel.h \
+ include/asm/apicdef.h \
+ include/asm/kmap_types.h \
+ $(wildcard include/config/debug/highmem.h) \
+ include/asm/pgtable-2level-defs.h \
+ include/asm/pgtable-2level.h \
+ include/asm-generic/pgtable-nopmd.h \
+ include/asm-generic/pgtable-nopud.h \
+ include/asm-generic/pgtable.h \
+ include/linux/page-flags.h \
+ $(wildcard include/config/swap.h) \
+ include/linux/highmem.h \
+ include/asm/cacheflush.h \
+ include/asm/highmem.h \
+ include/linux/interrupt.h \
+ $(wildcard include/config/generic/hardirqs.h) \
+ $(wildcard include/config/generic/irq/probe.h) \
+ include/linux/hardirq.h \
+ $(wildcard include/config/virt/cpu/accounting.h) \
+ include/asm/hardirq.h \
+ include/linux/irq.h \
+ $(wildcard include/config/arch/s390.h) \
+ include/asm/irq.h \
+ $(wildcard include/config/irqbalance.h) \
+ include/asm-i386/mach-default/irq_vectors.h \
+ include/asm-i386/mach-default/irq_vectors_limits.h \
+ $(wildcard include/config/pci/msi.h) \
+ include/asm/hw_irq.h \
+ include/linux/profile.h \
+ $(wildcard include/config/profiling.h) \
+ include/asm/sections.h \
+ include/asm-generic/sections.h \
+ include/linux/irq_cpustat.h \
+ include/asm/tlbflush.h \
+ $(wildcard include/config/x86/invlpg.h) \
+ include/linux/poll.h \
+ include/asm/poll.h \
+ include/asm/uaccess.h \
+ $(wildcard include/config/x86/intel/usercopy.h) \
+ $(wildcard include/config/x86/wp/works/ok.h) \
+ include/net/checksum.h \
+ include/asm/checksum.h \
+ include/linux/in6.h \
+ include/net/sock.h \
+ $(wildcard include/config/net.h) \
+ include/linux/netdevice.h \
+ $(wildcard include/config/ax25.h) \
+ $(wildcard include/config/ax25/module.h) \
+ $(wildcard include/config/tr.h) \
+ $(wildcard include/config/net/ipip.h) \
+ $(wildcard include/config/ipv6.h) \
+ $(wildcard include/config/ipv6/module.h) \
+ $(wildcard include/config/netpoll.h) \
+ $(wildcard include/config/net/poll/controller.h) \
+ $(wildcard include/config/net/divert.h) \
+ $(wildcard include/config/netpoll/trap.h) \
+ include/linux/if.h \
+ include/linux/hdlc/ioctl.h \
+ include/linux/if_ether.h \
+ include/linux/if_packet.h \
+ include/linux/device.h \
+ include/linux/ioport.h \
+ include/linux/pm.h \
+ include/linux/notifier.h \
+ include/linux/security.h \
+ $(wildcard include/config/security/network.h) \
+ include/linux/binfmts.h \
+ include/linux/shm.h \
+ include/asm/shmparam.h \
+ include/asm/shmbuf.h \
+ include/linux/msg.h \
+ include/asm/msgbuf.h \
+ include/linux/filter.h \
+ include/net/dst.h \
+ $(wildcard include/config/net/cls/route.h) \
+ $(wildcard include/config/xfrm.h) \
+ include/linux/rtnetlink.h \
+ include/linux/netlink.h \
+ include/net/neighbour.h \
+ include/linux/seq_file.h \
+ include/linux/sysctl.h \
+ include/linux/proc_fs.h \
+ $(wildcard include/config/proc/devicetree.h) \
+ $(wildcard include/config/proc/kcore.h) \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/types.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../amu/amas.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/crc.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/unicorn.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/debug.h \
+
+/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.o: $(deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.o)
+
+$(deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_atm/unicorn_atmdrv.o):
Added: dists/trunk/modules/unicorn/unicorn/unicorn_atm/unicorn_atmdrv.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_atm/unicorn_atmdrv.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1400 @@
+/*
+ This driver supports the Unicorn ADSL chipset from STMicroelectronics.
+ The chipset consists of the ADSL DMT transceiver ST70137 and either the
+ ST70134A or ST70136 Analog Front End (AFE).
+ This file contains the ATM interface and SAR routines.
+*/
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/smp_lock.h>
+#include <linux/random.h>
+#include <linux/atm.h>
+#include <linux/atmdev.h>
+#include <linux/skbuff.h>
+#include <asm/uaccess.h>
+#include "types.h"
+#include "amu/amas.h"
+#include "crc.h"
+#include "unicorn.h"
+#include "debug.h"
+
+#ifdef ATM_DRIVER
+MODULE_AUTHOR ("fisaksen at bewan.com");
+MODULE_DESCRIPTION ("ATM driver for the ST UNICORN ADSL modem.");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
+#endif
+
+
+// poll for data every POLL_TIME msec
+#ifdef USE_HW_TIMER
+// minimum 2ms
+#define POLL_TIME 6
+#else
+// multiple of 10ms in most cases
+#define POLL_TIME 10
+#endif
+
+#define MAX_VC 8
+
+// Private data
+typedef struct unicorn_atmdrv {
+ /* atm driver */
+ struct atm_dev *atm_dev;
+ struct sk_buff_head rt_tx_q; // Real-Time transmit queue - CBR,VBR
+ struct sk_buff_head tx_q; // "Normal" transmit queue - UBR
+ ADSL_STATUS adsl_status;
+ unsigned long downstream_rate;
+ unsigned long upstream_rate;
+ unsigned long us_cell_counter;
+ unsigned long ds_cell_counter;
+ unsigned long curr_us_rate;
+ unsigned long curr_ds_rate;
+ int num_vccs;
+ struct atm_vcc *vccs[MAX_VC];
+ /* traffic shaping */
+#ifdef USE_HW_TIMER
+ int hw_tick;
+#else
+ struct timer_list timer;
+#endif
+ int ms_counter;
+ int max_cell_counter; // counts max number of cells/sec for traffic shaping
+ // Statistics
+ T_oam_stats oam_stats;
+ int vpi;
+ int vci;
+ /* pci/usb driver entrypoints */
+ struct unicorn_entrypoints *ep;
+} unicorn_atmdrv_t;
+
+// extended skb_data structure used when encoding cells
+struct atm_ext_skb_data {
+ struct atm_skb_data atm_skb_data;
+ unsigned char aal;
+ union {
+ struct {
+ unsigned int pdu_length;
+ } aal0;
+ struct {
+ unsigned int pdu_length;
+ unsigned long crc;
+ } aal5;
+ } tx;
+ };
+
+#define ATM_EXT_SKB(skb) (((struct atm_ext_skb_data *) (skb)->cb))
+
+
+static const char driver_name[] = "UNICORN";
+
+struct unicorn_atmdrv *unicorn_atmdrv = NULL;
+
+// driver parameters
+unsigned char *mac_address=NULL;
+#if DEBUG
+#ifdef ATM_DRIVER
+unsigned long DebugLevel=0; // ATM_D,DATA_D
+#else
+extern unsigned long DebugLevel;
+#endif
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static int unicorn_atm_open(struct atm_vcc *vcc);
+#else
+static int unicorn_atm_open(struct atm_vcc *vcc, short vpi, int vci);
+#endif
+static void unicorn_atm_close(struct atm_vcc *vcc);
+static int unicorn_atm_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg);
+static int unicorn_atm_send(struct atm_vcc *vcc, struct sk_buff *skb);
+static int unicorn_atm_proc_read (struct atm_dev * atm_dev, loff_t * pos, char * page);
+
+
+static const struct atmdev_ops atm_devops =
+{
+ open: unicorn_atm_open,
+ close: unicorn_atm_close,
+ ioctl: unicorn_atm_ioctl,
+ send: unicorn_atm_send,
+ proc_read: unicorn_atm_proc_read,
+ owner: THIS_MODULE,
+};
+
+const char *get_adsl_status_string(ADSL_STATUS status)
+{
+ switch (status) {
+ case ADSL_STATUS_NOHARDWARE: return "no hardware";
+ case ADSL_STATUS_NOLINK: return "no link";
+ case ADSL_STATUS_ATMREADY: return "ATM ready";
+ default: return "unknown";
+ }
+}
+const char *get_modemstate_string(AMSW_ModemState state)
+{
+ switch(state) {
+ case C_AMSW_IDLE: return "IDLE";
+ case C_AMSW_L3: return "L3";
+ case C_AMSW_LISTENING: return "LISTENING";
+ case C_AMSW_ACTIVATING: return "ACTIVATING";
+ case C_AMSW_Ghs_HANDSHAKING: return "Ghs HANDSHAKING";
+ case C_AMSW_ANSI_HANDSHAKING: return "ANSI HANDSHAKING";
+ case C_AMSW_INITIALIZING: return "INITIALIZING";
+ case C_AMSW_RESTARTING: return "RESTARTING";
+ case C_AMSW_FAST_RETRAIN: return "FAST RETRAIN";
+ case C_AMSW_SHOWTIME_L0: return "SHOWTIME L0";
+ case C_AMSW_SHOWTIME_LQ: return "SHOWTIME LQ";
+ case C_AMSW_SHOWTIME_L1: return "SHOWTIME L1";
+ case C_AMSW_EXCHANGE: return "EXCHANGE";
+ case C_AMSW_TRUNCATE: return "TRUNCATE";
+ case C_AMSW_ESCAPE: return "ESCAPE";
+ case C_AMSW_DISORDERLY: return "DISORDERLY";
+ case C_AMSW_RETRY: return "RETRY";
+ default: return "unknown";
+ }
+}
+
+struct atm_dev *
+unicorn_atm_startdevice(struct unicorn_atmdrv *drv, const struct atmdev_ops *devops)
+{
+ struct atm_dev *atm_dev;
+
+ atm_dev = atm_dev_register(driver_name, devops, -1, 0);
+ if (!atm_dev) {
+ return NULL;
+ }
+
+ DBG(ATM_D,"itf=%d\n",atm_dev->number);
+
+ atm_dev->ci_range.vpi_bits = ATM_CI_MAX;
+ atm_dev->ci_range.vci_bits = ATM_CI_MAX;
+ atm_dev->signal = ATM_PHY_SIG_LOST;
+ atm_dev->link_rate = 128*1000/(8*ATM_CELL_SIZE);
+
+ atm_dev->dev_data = drv;
+ drv->atm_dev = atm_dev;
+
+ return atm_dev;
+}
+
+static void unicorn_atm_stopdevice(struct unicorn_atmdrv *drv)
+{
+ struct atm_dev *atm_dev;
+
+ if (!(atm_dev = drv->atm_dev)) {
+ return;
+ }
+
+ atm_dev->link_rate = 0;
+ atm_dev->signal = ATM_PHY_SIG_LOST;
+ atm_dev_deregister(atm_dev);
+ drv->atm_dev = NULL;
+}
+
+inline unsigned char get_hex_digit(const char digit[2])
+{
+ int i;
+ unsigned char h=0;
+
+ for (i = 0; i < 2; i++) {
+ char c = digit[i];
+ h <<=4;
+ if (c >= '0' && c <= '9') {
+ h += c - '0';
+ } else if (c >= 'A' && c <= 'F') {
+ h += c - 'A' + 10;
+ } else if (c >= 'a' && c <= 'f') {
+ h += c - 'a' + 10;
+ }
+ }
+ return h;
+}
+
+static void unicorn_set_mac(struct unicorn_atmdrv *drv, const char *mac)
+{
+ struct atm_dev *atm_dev;
+
+ if (!(atm_dev = drv->atm_dev)) {
+ return;
+ }
+ if ((mac != NULL) && (strlen(mac) >= (ESI_LEN*2))) {
+ int i;
+ for (i=0; i < ESI_LEN; i++) {
+ atm_dev->esi[i] = get_hex_digit(&mac[i*2]);
+ }
+ atm_dev->esi[0] &= ~0x01; // make sure it is not a broadcast address
+ } else {
+ /* Generate random Ethernet address. */
+ atm_dev->esi[0] = 0x00;
+ get_random_bytes(&atm_dev->esi[1],ESI_LEN-1);
+ }
+ INFO("ESI=%02x:%02x:%02x:%02x:%02x:%02x\n",
+ atm_dev->esi[0],atm_dev->esi[1],atm_dev->esi[2],
+ atm_dev->esi[3],atm_dev->esi[4],atm_dev->esi[5]);
+}
+
+
+static AMSW_ModemState get_modemstate(struct unicorn_atmdrv *drv)
+{
+ T_MswCtrl msw_ctrl;
+ AMSW_ModemState modemstate=C_AMSW_IDLE;
+
+ if (drv->ep) {
+ msw_ctrl.code = MSW_CTL_GET_STATE;
+ msw_ctrl.subcode = 0;
+ msw_ctrl.buffer = &modemstate;
+ msw_ctrl.length = sizeof(AMSW_ModemState);
+ drv->ep->msw_control(drv->ep->dev, &msw_ctrl);
+ }
+ DBG(ATM_D,"ADSL modem state %s\n",get_modemstate_string(modemstate));
+ return modemstate;
+}
+
+static int get_link_rate(struct unicorn_atmdrv *drv)
+{
+ int link_rate;
+
+ // get the ADSL link speed
+ if (drv->ep) {
+ drv->ep->get_adsl_linkspeed(drv->ep->dev,&drv->upstream_rate,&drv->downstream_rate);
+ if ((drv->upstream_rate == 0) || (drv->downstream_rate == 0)) {
+ link_rate = 0;
+ } else {
+ link_rate = (drv->upstream_rate*1000)/(8*ATM_CELL_SIZE);
+ }
+ } else {
+ link_rate = 0;
+ }
+ DBG(ATM_D,"upstream_rate=%ld Kbits/s,downstream_rate=%ld Kbits/s,link_rate=%d cells/sec\n",
+ drv->upstream_rate,drv->downstream_rate,link_rate);
+ return link_rate;
+}
+
+static int unicorn_atm_proc_read (struct atm_dev * atm_dev, loff_t * pos, char * page)
+{
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *)atm_dev->dev_data;
+ int left = *pos;
+
+ if (!left--) {
+ AMSW_ModemState modemstate = get_modemstate(drv);
+ get_link_rate(drv);
+ return sprintf(page, "ADSL: status %s, modem state %s, US rate %ldKbits/s, DS rate %ldKbits/s\n",
+ get_adsl_status_string(drv->adsl_status),get_modemstate_string(modemstate),
+ drv->upstream_rate,drv->downstream_rate);
+
+ }
+ if (!left--) {
+ return sprintf(page,"Current speed: US %ldKbits/s,DS %ldKbits/s\n",
+ drv->curr_us_rate,drv->curr_ds_rate);
+ }
+
+ if (!left--) {
+ return sprintf(page, "Current speed: US %ldKbits/s,DS %ldKbits/s\n",
+ drv->curr_us_rate,drv->curr_ds_rate);
+ }
+ if (!left--) {
+ return sprintf(page, "Bridged: %02x:%02x:%02x:%02x:%02x:%02x\n",
+ atm_dev->esi[0], atm_dev->esi[1], atm_dev->esi[2], atm_dev->esi[3],
+ atm_dev->esi[4], atm_dev->esi[5]);
+
+ }
+ if (!left--) {
+ return sprintf(page, "AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
+ atomic_read(&atm_dev->stats.aal5.tx), atomic_read(&atm_dev->stats.aal5.tx_err),
+ atomic_read(&atm_dev->stats.aal5.rx), atomic_read(&atm_dev->stats.aal5.rx_err),
+ atomic_read(&atm_dev->stats.aal5.rx_drop));
+ }
+ if (!left--) {
+ return sprintf(page, "AAL0: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
+ atomic_read(&atm_dev->stats.aal0.tx), atomic_read(&atm_dev->stats.aal0.tx_err),
+ atomic_read(&atm_dev->stats.aal0.rx), atomic_read(&atm_dev->stats.aal0.rx_err),
+ atomic_read(&atm_dev->stats.aal0.rx_drop));
+ }
+ return 0;
+}
+
+static void tx_free_skb(struct sk_buff *skb)
+{
+ struct atm_vcc *vcc;
+
+ if (skb) {
+ vcc = ATM_EXT_SKB(skb)->atm_skb_data.vcc;
+ if (vcc && vcc->pop) {
+ vcc->pop(vcc,skb);
+ } else {
+ dev_kfree_skb_any(skb);
+ }
+ }
+}
+
+static void tx_unlink_skb(struct unicorn_atmdrv *drv,struct sk_buff *skb)
+{
+ if (skb) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14))
+ struct atm_vcc *vcc = ATM_EXT_SKB(skb)->atm_skb_data.vcc;
+ if (vcc) {
+ if ((vcc->qos.txtp.traffic_class == ATM_CBR) ||
+ (vcc->qos.txtp.traffic_class == ATM_VBR)) {
+ skb_unlink(skb, &drv->rt_tx_q);
+ } else {
+ skb_unlink(skb, &drv->tx_q);
+ }
+ } else {
+ WARN("cannot unlink skb, no vcc in skb\n");
+ }
+#else
+ skb_unlink(skb);
+#endif
+ }
+}
+
+static inline struct sk_buff *peek_tx_skb(struct unicorn_atmdrv *drv)
+{
+ struct sk_buff *skb;
+
+ skb = skb_peek(&drv->rt_tx_q);
+ if (!skb) {
+ skb = skb_peek(&drv->tx_q);
+ }
+ return skb;
+}
+
+static inline struct sk_buff *dequeue_tx_skb(struct unicorn_atmdrv *drv)
+{
+ struct sk_buff *skb;
+
+ skb = skb_dequeue(&drv->rt_tx_q);
+ if (!skb) {
+ skb = skb_dequeue(&drv->tx_q);
+ }
+ return skb;
+}
+
+static void purge_tx_q(struct unicorn_atmdrv *drv)
+{
+ struct sk_buff *skb;
+
+ // free all buffers in transmit queues
+ while ((skb = dequeue_tx_skb(drv)) != NULL) {
+ tx_free_skb(skb);
+ }
+}
+
+static int build_aal0_cell(unsigned char *cell,struct sk_buff *skb)
+{
+ if (skb->len == ATM_AAL0_SDU) {
+ // from AAL0 socket
+ memcpy(cell,skb->data,ATM_AAL0_SDU - ATM_CELL_PAYLOAD);
+ skb_pull(skb,ATM_AAL0_SDU - ATM_CELL_PAYLOAD);
+ memcpy(cell+5,skb->data,ATM_CELL_PAYLOAD);
+ skb_pull(skb,ATM_CELL_PAYLOAD);
+ } else {
+ // OAM loopback
+ memcpy(cell,skb->data,ATM_CELL_SIZE);
+ skb_pull(skb,ATM_CELL_SIZE);
+ }
+ DUMP_PACKET(DATA_D,cell,ATM_CELL_SIZE);
+ return 1;
+}
+
+static int build_aal5_cell(unsigned char *cell,struct sk_buff *skb)
+{
+ struct atm_ext_skb_data *skb_data = ATM_EXT_SKB(skb);
+ struct atm_vcc *vcc = skb_data->atm_skb_data.vcc;
+ int payload_len;
+ int pad_len;
+
+ ASSERT(skb_data != NULL);
+ ASSERT(vcc != NULL);
+
+ // Add 5 byte ATM header
+ cell[0] = (vcc->vpi >> 4) & 0xf;
+ cell[1] = ((vcc->vpi & 0xf) << 4) | ((vcc->vci >> 12) & 0xf);
+ cell[2] = vcc->vci >> 4;
+ cell[3] = (vcc->vci & 0xf ) << 4;
+ // The header checksum will be added by the card...
+
+ // Add payload
+ payload_len = skb->len >= ATM_CELL_PAYLOAD ? ATM_CELL_PAYLOAD : skb->len;
+ if (payload_len > 0) {
+ memcpy(cell+5, skb->data, payload_len);
+ skb_pull(skb, payload_len);
+ }
+
+ pad_len = ATM_CELL_PAYLOAD - payload_len;
+ // Is this the last cell ?
+ if (pad_len >= ATM_AAL5_TRAILER) {
+ // Last cell
+ pad_len -= ATM_AAL5_TRAILER;
+ // setting pti bit in last cell
+ cell[3] |= 0x02;
+ }
+
+ DBG(DATA_D,"payload_len=%d,pad_len=%d,pti=%x\n",payload_len,pad_len,cell[3] & 0x2);
+
+ // Add zero padding
+ if (pad_len > 0) {
+ memset(cell+5+payload_len, 0, pad_len);
+ }
+
+ if (cell[3] & 0x02) {
+ // Add AAL5 trailer
+ unsigned char *trailer = cell+ATM_CELL_SIZE-ATM_AAL5_TRAILER;
+ *trailer++ = (unsigned char) 0; /* UU = 0 */
+ *trailer++ = (unsigned char) 0; /* CPI = 0 */
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.pdu_length >> 8);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.pdu_length & 0xff);
+ // Update and add CRC
+ skb_data->tx.aal5.crc = ~crc32(skb_data->tx.aal5.crc, cell+5, ATM_CELL_PAYLOAD-4);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 24);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 16);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 8);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc & 0xff);
+ return 1;
+ } else {
+ // Update CRC
+ skb_data->tx.aal5.crc = crc32(skb_data->tx.aal5.crc, cell+5, ATM_CELL_PAYLOAD);
+ return 0;
+ }
+}
+
+static void snd_poll(struct unicorn_atmdrv *drv)
+{
+ struct unicorn_entrypoints *ep = drv->ep;
+ int max_cells,cells;
+ unsigned char *cell;
+ struct sk_buff *skb;
+ int finished;
+ int t;
+
+ if (!ep) return;
+ ASSERT(ep->snd_getcell != NULL);
+
+ // do traffic shaping
+ drv->ms_counter += POLL_TIME;
+ if (drv->ms_counter >= 1000) {
+ // 1 sec
+ DBG(DATA_D,"max_cell_counter=%d,us_cell_counter=%ld\n",
+ drv->max_cell_counter,drv->us_cell_counter);
+ drv->ms_counter = 0;
+ drv->max_cell_counter = 0;
+ drv->curr_us_rate = (drv->us_cell_counter*ATM_CELL_SIZE*8UL)/1000UL;
+ drv->us_cell_counter = 0;
+
+ // Downstream
+ drv->curr_ds_rate = (drv->ds_cell_counter*ATM_CELL_SIZE*8UL)/1000UL;
+ drv->ds_cell_counter = 0;
+ }
+
+ t = 1000-drv->ms_counter;
+ max_cells = (((drv->atm_dev->link_rate - drv->max_cell_counter) * POLL_TIME) + (t/2))/t;
+ drv->max_cell_counter += max_cells;
+
+ cells=0;
+ skb = peek_tx_skb(drv);
+ while ((cells < max_cells) &&
+ (skb != NULL) &&
+ ((cell = ep->snd_getcell(ep->dev)) != NULL)) {
+ ++cells;
+
+ // statistics
+ ++drv->us_cell_counter;
+
+ switch (ATM_EXT_SKB(skb)->aal) {
+ case ATM_AAL0:
+ finished = build_aal0_cell(cell,skb);
+ break;
+ case ATM_AAL5:
+ finished = build_aal5_cell(cell,skb);
+ break;
+ default:
+ WARN("AAL%d not supported\n",ATM_EXT_SKB(skb)->aal==ATM_AAL0 ? 0 : ATM_EXT_SKB(skb)->aal);
+ finished=1;
+ break;
+ }
+
+ if (finished) {
+ // Finished with this buffer
+ tx_unlink_skb(drv,skb);
+ tx_free_skb(skb);
+ // Get next buffer
+ skb = peek_tx_skb(drv);
+ }
+ }
+
+ if (cells) {
+ ep->start_transmit(ep->dev);
+ DBG(DATA_D,"%d/%d cells\n",cells,max_cells);
+ }
+}
+
+static void oam_loopback(struct unicorn_atmdrv *drv,unsigned char *cell)
+{
+ struct sk_buff *skb;
+ struct atm_ext_skb_data *skb_data;
+
+ DBG(ATM_D,"\n");
+
+ skb = dev_alloc_skb(ATM_CELL_SIZE);
+ if (!skb) {
+ WARN("dev_alloc_skb of size %d failed\n",ATM_CELL_SIZE);
+ return ;
+ }
+ memcpy(skb->data,cell,ATM_CELL_SIZE);
+ skb_put(skb,ATM_CELL_SIZE);
+
+ // AAL0
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->atm_skb_data.vcc = NULL;
+ skb_data->aal = ATM_AAL0;
+ skb_data->tx.aal0.pdu_length = skb->len;
+
+ // put skb on transmit queue
+ skb_queue_tail(&drv->tx_q, skb);
+}
+
+static void rcv_oam(struct unicorn_atmdrv *drv,unsigned char *cell,int vpi,int vci)
+{
+ unsigned char *pdu= cell+5;
+ unsigned char pti = cell[3] & 0x0E;
+ unsigned short rcvdcrc,crc;
+
+ DBG(ATM_D,"vpi=%d,vci=%d,pti=0x%02x,type=0x%02x,indicator=0x%02x,LLID=0x%02x\n",
+ vpi,vci,pti,pdu[0],pdu[1],pdu[6]);
+
+ if (vci == 21) {
+ oam_loopback(drv,cell);
+ return;
+ }
+
+ // Process only OAM-F4 flow and OAM-F5 flow cells
+ switch (pti) {
+ case 0x00: // OAM-F4 flow cell
+ case 0x04: // OAM-F4 flow cell
+ // VCI = 3 -> Segment OAM-F4
+ // VCI = 4 -> End-to-end OAM-F4
+ if (vci != 3 && vci != 4) return;
+ break;
+ case 0x08: // Segment OAM-F5 flow cell
+ case 0x0A: // End-to-end OAM-F5 flow cell
+ break;
+ default:
+ return;
+ }
+
+ // Save the received CRC
+ rcvdcrc = (unsigned short)pdu[ATM_CELL_PAYLOAD-1];
+ rcvdcrc += (unsigned short)pdu[ATM_CELL_PAYLOAD-2]<<8;
+ rcvdcrc &= 0x03FF;
+
+ // Put 0 in the CRC field of the received PDU
+ pdu[ATM_CELL_PAYLOAD-2] &= 0xFC;
+ pdu[ATM_CELL_PAYLOAD-1] = 0;
+
+ // Computes the CRC10 and check for the result
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ if (crc != rcvdcrc) {
+ WARN("Received OAM cell with invalid CRC\n");
+ return;
+ }
+
+ // Increment the counters according to the OAM cell type
+ switch(pdu[0]) {
+ case 0x10:
+ ++drv->oam_stats.rx_AIS;
+ break;
+ case 0x11:
+ ++drv->oam_stats.rx_RDI;
+ break;
+ case 0x14:
+ ++drv->oam_stats.rx_CC;
+ break;
+ case 0x18:
+ if (pdu[6] != 0x6a) { // LLID field
+ if(pdu[1] == 0x01) {
+ ++drv->oam_stats.rx_ne_LB;
+ pdu[1] = 0x00;
+ // clear CRC
+ pdu[ATM_CELL_PAYLOAD-2]=pdu[ATM_CELL_PAYLOAD-1]=0;
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ pdu[ATM_CELL_PAYLOAD-2] = (unsigned char)(crc >> 8);
+ pdu[ATM_CELL_PAYLOAD-1] = (unsigned char)(crc);
+ oam_loopback(drv,cell);
+ return;
+ } else if (pdu[1] == 0x00) {
+ ++drv->oam_stats.rx_fe_LB;
+ }
+ // save the VPI.VCI for auto-configuration
+ if ((drv->vpi == ATM_VPI_UNSPEC) && (drv->vci == ATM_VCI_UNSPEC)) {
+ drv->vpi = vpi;
+ drv->vci = vci;
+ }
+ }
+ break;
+ }
+}
+
+static struct atm_vcc *find_vcc(struct unicorn_atmdrv *drv, int vpi, int vci)
+{
+ struct atm_vcc* vcc;
+ int i;
+
+ for (i=0; i < MAX_VC; i++) {
+ vcc = drv->vccs[i];
+ if (vcc) {
+ if ((vcc->vpi == vpi) && (vcc->vci == vci)) {
+ return vcc;
+ }
+ }
+ }
+
+ for (i=0; i < MAX_VC; i++) {
+ vcc = drv->vccs[i];
+ if (vcc) {
+ if ((vcc->vpi == ATM_VPI_UNSPEC) && (vcc->vci == ATM_VCI_UNSPEC)) {
+ if (vcc->qos.aal == ATM_AAL0) {
+ // raw cell
+ return vcc;
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+static void rcv_aal0(struct unicorn_atmdrv *drv,struct atm_vcc *vcc,unsigned char *cell)
+{
+ struct sk_buff *skb;
+
+ DUMP_PACKET(DATA_D,cell,ATM_CELL_SIZE);
+
+ skb = dev_alloc_skb(ATM_AAL0_SDU);
+ if (skb) {
+ memcpy(skb_put(skb,ATM_AAL0_SDU - ATM_CELL_PAYLOAD), cell,ATM_AAL0_SDU - ATM_CELL_PAYLOAD);
+ memcpy(skb_put(skb,ATM_CELL_PAYLOAD), cell+5, ATM_CELL_PAYLOAD);
+
+ DBG(DATA_D,"vpi=%d,vci=%d\n",vcc->vpi,vcc->vci);
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+
+ if (atm_charge(vcc, skb->truesize)) {
+ atomic_inc(&vcc->stats->rx);
+ vcc->push(vcc, skb);
+ } else {
+ WARN("dropping incoming packet,size=%d\n",skb->truesize);
+ atomic_inc(&vcc->stats->rx_drop);
+ dev_kfree_skb_any(skb);
+ }
+ } else {
+ WARN("dev_alloc_skb failed\n");
+ atomic_inc(&vcc->stats->rx_err);
+ }
+}
+
+static struct sk_buff *rawcell_decode(struct atm_vcc *vcc, unsigned char *cell)
+{
+ struct sk_buff *skb;
+ unsigned int max_mru = vcc->qos.rxtp.max_sdu+ATM_CELL_PAYLOAD; // the AAL5 padding may take up to 1 cell
+
+ DUMP_PACKET(DATA_D,cell,ATM_CELL_SIZE);
+
+ // get reassembly buffer
+ skb = vcc->dev_data;
+ if (!skb) {
+ skb = dev_alloc_skb(max_mru);
+ if (!skb) {
+ WARN("dev_alloc_skb failed\n");
+ return NULL;
+ }
+ vcc->dev_data = skb;
+ }
+
+ // copy data
+ if (skb->len > (max_mru-ATM_CELL_PAYLOAD)) {
+ WARN("packet too long, skb->len=%d,max_mru=%d\n",skb->len,max_mru);
+ skb_trim(skb, 0);
+ }
+ memcpy(skb_put(skb,ATM_CELL_PAYLOAD), cell+5, ATM_CELL_PAYLOAD);
+
+ // check for end of buffer
+ if (cell[3] & 0x2) {
+ // the aal5 buffer ends here, cut the buffer.
+ vcc->dev_data = NULL;
+ } else {
+ vcc->dev_data = skb;
+ skb = NULL;
+ }
+ return skb;
+}
+
+static struct sk_buff *aal5_decode(struct sk_buff *skb)
+{
+ unsigned long crc = CRC32_INITIAL;
+ unsigned long pdu_crc;
+ unsigned int length,pdu_length;
+
+ if (skb->len && (skb->len % ATM_CELL_PAYLOAD)) {
+ WARN("wrong size %d\n",skb->len);
+ return NULL;
+ }
+
+ length = (skb->tail[-6] << 8) + skb->tail[-5];
+ pdu_crc = (skb->tail[-4] << 24) + (skb->tail[-3] << 16) + (skb->tail[-2] << 8) + skb->tail[-1];
+ pdu_length = ((length + 47 + 8)/ 48) * 48;
+
+ DBG(DATA_D,"skb->len=%d,length=%d,pdu_crc=0x%lx,pdu_length=%d\n",skb->len,length,pdu_crc,pdu_length);
+
+ // is skb long enough ?
+ if (skb->len < pdu_length) {
+ WARN("skb too short,skb->len=%d,pdu_length=%d\n",skb->len,pdu_length);
+ goto fail;
+ }
+
+ // is skb too long ?
+ if (skb->len > pdu_length) {
+ WARN("readjusting illegal skb->len %d -> %d\n",skb->len,pdu_length);
+ skb_pull(skb, skb->len - pdu_length);
+ }
+
+ crc = ~crc32(crc,skb->data,pdu_length-4);
+
+ // check crc
+ if (pdu_crc != crc) {
+ WARN("crc check failed!\n");
+ goto fail;
+ }
+
+ // pdu is ok
+ skb_trim(skb, length);
+ return skb;
+
+fail:
+ dev_kfree_skb_any(skb);
+ return NULL;
+}
+
+static void rcv_aal5(struct unicorn_atmdrv *drv,struct atm_vcc *vcc,unsigned char *cell)
+{
+ struct sk_buff *skb;
+
+ skb = rawcell_decode(vcc,cell);
+ if (skb) {
+ skb = aal5_decode(skb);
+ if (skb) {
+ DBG(DATA_D,"vpi=%d,vci=%d\n",vcc->vpi,vcc->vci);
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+ if (atm_charge(vcc, skb->truesize)) {
+ atomic_inc(&vcc->stats->rx);
+ vcc->push(vcc, skb);
+ } else {
+ WARN("dropping incoming packet,size=%d\n",skb->truesize);
+ atomic_inc(&vcc->stats->rx_drop);
+ dev_kfree_skb_any(skb);
+ }
+ } else {
+ atomic_inc(&vcc->stats->rx_err);
+ }
+ }
+}
+
+
+static void rcv_poll(struct unicorn_atmdrv *drv)
+{
+ struct unicorn_entrypoints *ep = drv->ep;
+ unsigned char *cell;
+ struct atm_vcc *vcc;
+
+ if (!ep) return;
+
+ ASSERT(ep->rcv_getcell != NULL);
+
+ while ((cell = ep->rcv_getcell(ep->dev)) != NULL) {
+ int vpi = ((cell[0] & 0xf) << 4) | (cell[1] >> 4);
+ int vci = ((cell[1] & 0xf) << 12) | (cell[2] << 4) | (cell[3] >> 4);
+ // Check for OAM cells and process them
+ if (((cell[3] & 0x0E) >= 8) || // OAM-F5
+ ((vpi==0) && (vci==21)) || // OAM-F4
+ ((vpi==0) && (vci==3)) ||
+ ((vpi==0) && (vci==4))) {
+ rcv_oam(drv,cell,vpi,vci);
+ } else if ((vcc = find_vcc(drv,vpi,vci)) != NULL) {
+ ++drv->ds_cell_counter;
+
+ switch (vcc->qos.aal) {
+ case ATM_AAL0:
+ rcv_aal0(drv,vcc,cell);
+ break;
+ case ATM_AAL5:
+ rcv_aal5(drv,vcc,cell);
+ break;
+ default:
+ WARN("AAL%d not supported\n",
+ vcc->qos.aal==ATM_AAL0 ? 0 : vcc->qos.aal);
+ atomic_inc(&vcc->stats->rx_err);
+ break;
+ }
+ } else {
+ DBG(ATM_D,"wrong VPI.VCI %d.%d\n",vpi,vci);
+ }
+ }
+}
+
+static void unicorn_poll_data(unsigned long context)
+{
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *)context;
+ ADSL_STATUS prev_adsl_status;
+
+ if (!drv->ep) return;
+ if (!drv->atm_dev) return;
+
+ prev_adsl_status = drv->adsl_status;
+ drv->adsl_status = drv->ep->get_adsl_status(drv->ep->dev);
+
+ if (drv->adsl_status != prev_adsl_status) {
+ // ADSL state has changed...
+ if (drv->adsl_status == ADSL_STATUS_ATMREADY) {
+ drv->atm_dev->signal = ATM_PHY_SIG_FOUND;
+ // get the new ADSL link rate
+ drv->atm_dev->link_rate = get_link_rate(drv);
+ } else {
+ drv->atm_dev->signal = ATM_PHY_SIG_LOST;
+ drv->atm_dev->link_rate = 0;
+
+ // free all buffers in transmit queues
+ purge_tx_q(drv);
+ }
+ }
+
+ if (drv->adsl_status == ADSL_STATUS_ATMREADY) {
+ rcv_poll(drv);
+ snd_poll(drv);
+ }
+#ifndef USE_HW_TIMER
+ drv->timer.expires = ((POLL_TIME*HZ)/1000) + jiffies;
+ add_timer(&drv->timer);
+#endif
+}
+
+
+static int unicorn_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
+{
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *) vcc->dev->dev_data;
+ struct atm_ext_skb_data *skb_data;
+ int status;
+
+ DBG(DATA_D,"vpi=%d,vci=%d\n",vcc->vpi,vcc->vci);
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+
+ if (!drv->ep) {
+ WARN("no bus driver\n");
+ status = -ENXIO;
+ goto fail;
+ }
+ if (drv->adsl_status != ADSL_STATUS_ATMREADY) {
+ DBG(ATM_D,"ATM not ready,adsl_status=%d\n",drv->adsl_status);
+ status = -EIO;
+ goto fail;
+ }
+
+ switch (vcc->qos.aal) {
+ case ATM_AAL0:
+ // save context
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->atm_skb_data.vcc = vcc;
+ skb_data->atm_skb_data.vcc = vcc;
+ skb_data->aal = ATM_AAL5 ;
+ skb_data->tx.aal0.pdu_length = skb->len;
+ break;
+ case ATM_AAL5:
+ // save context
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->atm_skb_data.vcc = vcc;
+ skb_data->aal = ATM_AAL5 ;
+ skb_data->tx.aal5.pdu_length = skb->len;
+ skb_data->tx.aal5.crc = CRC32_INITIAL;
+ break;
+ default:
+ WARN("AAL%d not supported\n",vcc->qos.aal==ATM_AAL0 ? 0 : vcc->qos.aal);
+ status = -EINVAL;
+ goto fail;
+ };
+
+ // put skb on transmit queue according to traffic class
+ if ((vcc->qos.txtp.traffic_class == ATM_CBR) ||
+ (vcc->qos.txtp.traffic_class == ATM_VBR)) {
+ skb_queue_tail(&drv->rt_tx_q, skb);
+ } else {
+ skb_queue_tail(&drv->tx_q, skb);
+ }
+ atomic_inc(&vcc->stats->tx);
+ return 0;
+
+fail:
+ DBG(ATM_D,"status=%d\n",status);
+ tx_free_skb(skb);
+ return status;
+}
+
+void start_poll_timer(struct unicorn_atmdrv *drv)
+{
+ drv->ms_counter = 0;
+ drv->max_cell_counter = 0;
+
+ ASSERT(drv->ep != NULL);
+
+ // empty the receive buffer
+ while ((drv->ep->rcv_getcell(drv->ep->dev)) != NULL) {
+ }
+
+ // start poll timer
+#ifdef USE_HW_TIMER
+ drv->hw_tick=0;
+#else
+ // start send and receive poll timer
+ init_timer(&drv->timer);
+
+ drv->timer.data = (unsigned long)drv;
+ drv->timer.function = unicorn_poll_data;
+ drv->timer.expires = ((POLL_TIME*HZ)/1000) + jiffies;
+
+ add_timer(&drv->timer);
+#endif
+}
+
+static void stop_poll_timer(struct unicorn_atmdrv *drv)
+{
+#ifndef USE_HW_TIMER
+ // stop timer
+ del_timer(&drv->timer);
+#endif
+ // free all buffers in transmit queues
+ purge_tx_q(drv);
+}
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+static int unicorn_atm_open(struct atm_vcc *vcc, short vpi, int vci)
+#else
+static int unicorn_atm_open(struct atm_vcc *vcc)
+#endif
+{
+ struct atm_dev *atm_dev = vcc->dev;
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *)atm_dev->dev_data;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+ vcc->vpi = vpi;
+ vcc->vci = vci;
+#endif
+
+ DBG(ATM_D,"AAL%d,vpi=%d,vci=%d,traffic_class=%d\n",
+ vcc->qos.aal==ATM_AAL0 ? 0 : vcc->qos.aal,vcc->vpi,vcc->vci,
+ vcc->qos.txtp.traffic_class);
+
+ if (!drv->ep) return -ENXIO;
+
+ switch(vcc->qos.aal) {
+ case ATM_AAL5:
+ if ((vcc->vpi == ATM_VPI_UNSPEC) || (vcc->vci == ATM_VCI_UNSPEC)) {
+ WARN("VCC unspecified not supported for AAL%d\n",vcc->qos.aal);
+ return -EINVAL;
+ }
+ case ATM_AAL0:
+ break;
+ default:
+ WARN("AAL%d not supported\n",vcc->qos.aal==ATM_AAL0 ? 0 : vcc->qos.aal);
+ return -EINVAL;
+ }
+
+ vcc->dev_data = NULL;
+
+ set_bit(ATM_VF_ADDR, &vcc->flags);
+ set_bit(ATM_VF_PARTIAL, &vcc->flags);
+ set_bit(ATM_VF_READY, &vcc->flags);
+
+ // set MAC address,
+ unicorn_set_mac(drv,mac_address);
+
+ // initialize transmit queues
+ skb_queue_head_init(&drv->rt_tx_q);
+ skb_queue_head_init(&drv->tx_q);
+
+
+ drv->adsl_status = drv->ep->get_adsl_status(drv->ep->dev);
+ atm_dev->signal = ADSL_STATUS_ATMREADY ? ATM_PHY_SIG_FOUND : ATM_PHY_SIG_LOST;
+ // get the ADSL link rate
+ atm_dev->link_rate = get_link_rate(drv);
+
+ if (drv->num_vccs < MAX_VC) {
+ int i;
+ for (i=0; i < MAX_VC; i++) {
+ if (!drv->vccs[i]) {
+ drv->vccs[i] = vcc;
+ break;
+ }
+ }
+ if (++drv->num_vccs == 1) {
+ // first VCC, start data poll timer
+ start_poll_timer(drv);
+ }
+ } else {
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static void unicorn_atm_close(struct atm_vcc *vcc)
+{
+ struct atm_dev *atm_dev = vcc->dev;
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *)atm_dev->dev_data;
+
+ DBG(ATM_D,"\n");
+
+ // freeing resources
+ if (vcc->dev_data) {
+ dev_kfree_skb_any(vcc->dev_data);
+ vcc->dev_data = NULL;
+ }
+ clear_bit(ATM_VF_PARTIAL, &vcc->flags);
+
+ // freeing address
+ vcc->vpi = ATM_VPI_UNSPEC;
+ vcc->vci = ATM_VCI_UNSPEC;
+ clear_bit(ATM_VF_ADDR, &vcc->flags);
+
+ if (drv->num_vccs > 0) {
+ int i;
+ for (i=0; i < MAX_VC; i++) {
+ if (drv->vccs[i] == vcc) {
+ drv->vccs[i] = NULL;
+ break;
+ }
+ }
+ if (--drv->num_vccs == 0) {
+ // last VCC, stop data poll timer
+ stop_poll_timer(drv);
+ }
+ } else {
+ }
+ return;
+}
+
+static int oam_send(struct unicorn_atmdrv *drv,int type,int vpi,int vci)
+{
+ struct sk_buff *skb;
+ struct atm_ext_skb_data *skb_data;
+ unsigned char *hdr,*pdu;
+ unsigned short crc;
+ static unsigned long tag = 0x0L;
+ const unsigned char lb_id[] = {
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF};
+ const unsigned char src_id[] = {
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A};
+
+ DBG(ATM_D,"vpi=%d,vci=%d\n",vpi,vci);
+
+ if (drv->adsl_status != ADSL_STATUS_ATMREADY) {
+ DBG(ATM_D,"ATM not ready,adsl_status=%d\n",drv->adsl_status);
+ return -EIO;
+ }
+
+ skb = dev_alloc_skb(ATM_CELL_SIZE);
+ if (!skb) {
+ return -ENOMEM;
+ }
+
+ hdr = skb->data;
+
+ // fill vpi
+ hdr[0] = vpi >> 4;
+ hdr[1] = (vpi & 0x0F) << 4;
+
+ // fill vci
+ hdr[1] |= (vci >> 12);
+ hdr[2] = (vci >> 4) & 0xFF;
+ if (type == ATM_OAM_F4) {
+ hdr[3] = 0x00; // OAM F4
+ } else {
+ hdr[3] = 0x0A; // OAM F5
+ }
+ hdr[3] |= ((vci & 0x0F) << 4);
+ // update the HEC
+ hdr[4] = hecCompute(hdr);
+
+ pdu = hdr+5;
+ // loopback function
+ pdu[0] = 0x18;
+ pdu[1] = 0x01;
+
+ // fill the correlation tag
+ pdu[2] = (unsigned char)(tag >> 24);
+ pdu[3] = (unsigned char)(tag >> 16);
+ pdu[4] = (unsigned char)(tag >> 8);
+ pdu[5] = (unsigned char)tag;
+ tag++;
+
+ // fill the loopback id
+ memcpy(pdu+6,lb_id,16);
+
+ // fill the Src Id
+ memcpy(pdu+22,src_id,16);
+
+ // fill the unused bytes
+ memcpy(pdu+38,src_id,8);
+
+ // calculate CRC
+ pdu[ATM_CELL_PAYLOAD-2]=pdu[ATM_CELL_PAYLOAD-1]=0;
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ pdu[ATM_CELL_PAYLOAD-2] = (unsigned char)(crc >> 8);
+ pdu[ATM_CELL_PAYLOAD-1] = (unsigned char)(crc);
+
+ ++drv->oam_stats.tx_LB;
+
+ skb_put(skb,ATM_CELL_SIZE);
+
+ // AAL0
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->atm_skb_data.vcc = NULL;
+ skb_data->aal = ATM_AAL0;
+ skb_data->tx.aal0.pdu_length = skb->len;
+
+ // put skb on transmit queue
+ skb_queue_tail(&drv->tx_q, skb);
+ return 0;
+}
+
+static int net_control(struct unicorn_atmdrv *drv,T_MswCtrl *ctrl)
+{
+ int err;
+
+ switch (ctrl->code) {
+ case NET_CTL_SET_VPI_VCI:
+ {
+ T_atm_channel *vpi_vci=ctrl->buffer;
+ drv->vpi = vpi_vci->vpi;
+ drv->vci = vpi_vci->vci;
+ ctrl->retcode = err = 0;
+ ctrl->length = 0;
+ }
+ break;
+ case NET_CTL_GET_VPI_VCI:
+ {
+ T_atm_channel *vpi_vci=ctrl->buffer;
+ vpi_vci->type = ATM_AAL5;
+ vpi_vci->vpi = drv->vpi;
+ vpi_vci->vci = drv->vci;
+ ctrl->length = sizeof(T_atm_channel);
+ ctrl->retcode = err = 0;
+ }
+ case NET_CTL_TX_OAM_CELL:
+ {
+ T_atm_channel *tx_oam = ctrl->buffer;
+ err = oam_send(drv,tx_oam->type,tx_oam->vpi,tx_oam->vci);
+ ctrl->retcode = err;
+ ctrl->length = 0;
+ }
+ break;
+ case NET_CTL_GET_OAM_STATS:
+ {
+ memcpy(ctrl->buffer,&drv->oam_stats,sizeof(T_oam_stats));
+ ctrl->length = sizeof(T_oam_stats);
+ ctrl->retcode = err = 0;
+ }
+ break;
+ case NET_CTL_RESET_OAM_STATS:
+ {
+ memset(&drv->oam_stats,0,sizeof(T_oam_stats));
+ ctrl->retcode = err = 0;
+ ctrl->length = 0;
+
+ }
+ break;
+ default:
+ err = -ENOTTY;
+ break;
+ }
+ return err;
+}
+
+static int unicorn_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg)
+{
+ struct unicorn_atmdrv *drv = (struct unicorn_atmdrv *)atm_dev->dev_data;
+ T_MswCtrl ctrl;
+ void *user_buffer;
+ int err = -ENOTTY;
+
+ DBG(ATM_D,"cmd=%c%x\n",_IOC_TYPE(cmd),_IOC_NR(cmd));
+
+ if (!drv->ep) return -ENXIO;
+
+ switch (cmd) {
+ case ATM_QUERYLOOP:
+ err = put_user(ATM_LM_NONE, (int *) arg) ? -EFAULT : 0;
+ break;
+ case ATM_MSW_CTL:
+ err = copy_from_user(&ctrl,arg,sizeof(T_MswCtrl));
+ // if a buffer is provided, copy it to kernel space
+ if ((ctrl.length) && (ctrl.buffer)) {
+ user_buffer = ctrl.buffer;
+ ctrl.buffer = kmalloc(ctrl.length,GFP_KERNEL);
+ if (!ctrl.buffer) return -ENOMEM;
+ err = copy_from_user(ctrl.buffer,user_buffer,ctrl.length);
+ } else {
+ user_buffer = NULL;
+ }
+
+ // do the ioctl...
+ if (ctrl.code < 32) {
+ ASSERT(drv->ep->msw_control != NULL);
+ err = drv->ep->msw_control(drv->ep->dev,&ctrl);
+ } else if (ctrl.code < 64) {
+ err = net_control(drv,&ctrl);
+ } else {
+ }
+
+ if ((ctrl.length) && (ctrl.buffer)) {
+ err = copy_to_user(user_buffer,ctrl.buffer,ctrl.length);
+ kfree(ctrl.buffer);
+ ctrl.buffer = user_buffer;
+ }
+ break;
+ }
+ return err;
+}
+
+
+extern int unicorn_timer(void)
+{
+#ifdef USE_HW_TIMER
+ struct unicorn_atmdrv *drv = unicorn_atmdrv;
+
+ if (drv && drv->atm_dev) {
+ if (drv->num_vccs) {
+ // 2ms periodic
+ if (++drv->hw_tick == (POLL_TIME/2)) {
+ drv->hw_tick = 0;
+ unicorn_poll_data((unsigned long)drv);
+ }
+ }
+ }
+#endif
+ return 0;
+}
+
+MODULE_PARM(mac_address, "s");
+#if DEBUG
+#ifdef ATM_DRIVER
+MODULE_PARM(DebugLevel, "i");
+#endif
+#endif
+
+int unicorn_atm_init(void)
+{
+ struct unicorn_atmdrv *drv;
+
+#ifdef ATM_DRIVER
+ INFO("v %d.%d.%d, " __TIME__ " " __DATE__"\n",
+ (VERS>>8)&0xf,(VERS>>4)&0xf,VERS&0xf);
+#endif
+ if (unicorn_atmdrv) {
+ WARN("driver already opened\n");
+ return -ENXIO;
+ }
+ drv = kmalloc(sizeof(struct unicorn_atmdrv), GFP_KERNEL);
+ if (!drv) {
+ WARN("no memory for drv data\n");
+ return -ENOMEM;
+ }
+ memset(drv, 0, sizeof(struct unicorn_atmdrv));
+ drv->adsl_status = ADSL_STATUS_NOHARDWARE;
+ drv->vpi = ATM_VPI_UNSPEC;
+ drv->vci = ATM_VCI_UNSPEC;
+
+ unicorn_atmdrv = drv;
+
+ if (unicorn_atm_startdevice(drv, &atm_devops) == NULL) {
+ return -ENXIO;
+ }
+ return 0;
+}
+
+void unicorn_atm_cleanup(void)
+{
+ struct unicorn_atmdrv *drv = unicorn_atmdrv;
+
+ DBG(ATM_D,"\n");
+
+ if (drv) {
+ unicorn_atm_stopdevice(drv);
+ unicorn_atmdrv = NULL;
+ kfree(drv);
+ }
+}
+
+#ifdef ATM_DRIVER
+module_init(unicorn_atm_init);
+module_exit(unicorn_atm_cleanup);
+#endif
+
+extern int unicorn_attach(struct unicorn_entrypoints *entrypoints)
+{
+ int status;
+ struct unicorn_atmdrv *drv;
+
+ DBG(ATM_D,"entrypoints=%p\n",entrypoints);
+
+ if (!unicorn_atmdrv) {
+#ifdef ATM_DRIVER
+ return -ENXIO;
+#else
+ status = unicorn_atm_init();
+ if (status) {
+ return status;
+ }
+#endif
+ }
+ drv = unicorn_atmdrv;
+
+ ASSERT(entrypoints->dev != NULL);
+ ASSERT(entrypoints->snd_getcell != NULL);
+ ASSERT(entrypoints->rcv_getcell != NULL);
+ ASSERT(entrypoints->start_transmit != NULL);
+ ASSERT(entrypoints->get_adsl_status != NULL);
+ ASSERT(entrypoints->get_adsl_linkspeed != NULL);
+
+ drv->ep = entrypoints;
+
+ drv->adsl_status = ADSL_STATUS_NOLINK;
+
+ return 0;
+}
+
+extern int unicorn_detach(void)
+{
+ struct unicorn_atmdrv *drv = unicorn_atmdrv;
+
+ DBG(ATM_D,"\n");
+
+ if (!drv) {
+ return -ENXIO;
+ }
+ drv->adsl_status = ADSL_STATUS_NOHARDWARE;
+ drv->ep = NULL;
+#ifdef ATM_DRIVER
+#else
+ unicorn_atm_cleanup();
+#endif
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/unicorn_eth/.unicorn_ethdrv.o.cmd
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_eth/.unicorn_ethdrv.o.cmd Wed Dec 27 00:14:01 2006
@@ -0,0 +1,380 @@
+cmd_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.o := gcc -Wp,-MD,/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/.unicorn_ethdrv.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.2/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i386 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -DVERS=0x093 -D_USB_DRIVER -DDEBUG=1 -I/home/fisaksen/src/unicorn/unicorn_usb/../include -I/home/fisaksen/src/unicorn/unicorn_usb/../ -DMODULE -DKBUILD_BASENAME=unicorn_ethdrv -DKBUILD_MODNAME=unicorn_usb_eth -c -o /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/.tmp_unicorn_ethdrv.o /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.c
+
+deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.o := \
+ /home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.c \
+ $(wildcard include/config/modversions.h) \
+ $(wildcard include/config/atm.h) \
+ include/linux/config.h \
+ $(wildcard include/config/h.h) \
+ include/linux/version.h \
+ include/linux/kernel.h \
+ $(wildcard include/config/debug/spinlock/sleep.h) \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/sysctl.h) \
+ /usr/lib/gcc/i486-linux-gnu/4.0.2/include/stdarg.h \
+ include/linux/linkage.h \
+ include/asm/linkage.h \
+ $(wildcard include/config/x86/alignment/16.h) \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ include/linux/compiler-gcc4.h \
+ include/linux/compiler-gcc.h \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ include/linux/posix_types.h \
+ include/asm/posix_types.h \
+ include/asm/types.h \
+ $(wildcard include/config/highmem64g.h) \
+ $(wildcard include/config/lbd.h) \
+ include/linux/bitops.h \
+ include/asm/bitops.h \
+ $(wildcard include/config/smp.h) \
+ include/asm/byteorder.h \
+ $(wildcard include/config/x86/bswap.h) \
+ include/linux/byteorder/little_endian.h \
+ include/linux/byteorder/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ include/asm-generic/bug.h \
+ include/linux/module.h \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/module/unload.h) \
+ $(wildcard include/config/kallsyms.h) \
+ include/linux/sched.h \
+ $(wildcard include/config/keys.h) \
+ $(wildcard include/config/inotify.h) \
+ $(wildcard include/config/schedstats.h) \
+ $(wildcard include/config/bsd/process/acct.h) \
+ $(wildcard include/config/numa.h) \
+ $(wildcard include/config/cpusets.h) \
+ $(wildcard include/config/hotplug/cpu.h) \
+ $(wildcard include/config/security.h) \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/magic/sysrq.h) \
+ $(wildcard include/config/pm.h) \
+ include/asm/param.h \
+ include/linux/capability.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/lockmeter.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ include/linux/thread_info.h \
+ include/asm/thread_info.h \
+ $(wildcard include/config/4kstacks.h) \
+ $(wildcard include/config/debug/stack/usage.h) \
+ include/asm/page.h \
+ $(wildcard include/config/x86/use/3dnow.h) \
+ $(wildcard include/config/x86/pae.h) \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/highmem4g.h) \
+ $(wildcard include/config/discontigmem.h) \
+ include/asm/processor.h \
+ $(wildcard include/config/x86/ht.h) \
+ $(wildcard include/config/mk8.h) \
+ $(wildcard include/config/mk7.h) \
+ include/asm/vm86.h \
+ include/asm/math_emu.h \
+ include/asm/sigcontext.h \
+ include/asm/segment.h \
+ include/asm/cpufeature.h \
+ include/asm/msr.h \
+ include/asm/system.h \
+ $(wildcard include/config/x86/cmpxchg.h) \
+ $(wildcard include/config/x86/oostore.h) \
+ include/linux/cache.h \
+ include/asm/cache.h \
+ $(wildcard include/config/x86/l1/cache/shift.h) \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/linux/stringify.h \
+ include/linux/timex.h \
+ $(wildcard include/config/time/interpolation.h) \
+ include/linux/time.h \
+ include/linux/seqlock.h \
+ include/asm/timex.h \
+ $(wildcard include/config/x86/elan.h) \
+ $(wildcard include/config/x86/tsc.h) \
+ $(wildcard include/config/x86/generic.h) \
+ include/linux/jiffies.h \
+ include/asm/div64.h \
+ include/linux/rbtree.h \
+ include/linux/cpumask.h \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ include/asm/string.h \
+ include/linux/errno.h \
+ include/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/nodemask.h \
+ include/linux/numa.h \
+ include/asm/semaphore.h \
+ include/asm/atomic.h \
+ $(wildcard include/config/m386.h) \
+ include/linux/wait.h \
+ include/linux/list.h \
+ include/linux/prefetch.h \
+ include/asm/current.h \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/asm/ptrace.h \
+ $(wildcard include/config/frame/pointer.h) \
+ include/asm/mmu.h \
+ include/asm/cputime.h \
+ include/asm-generic/cputime.h \
+ include/linux/smp.h \
+ include/linux/sem.h \
+ $(wildcard include/config/sysvipc.h) \
+ include/linux/ipc.h \
+ include/asm/ipcbuf.h \
+ include/asm/sembuf.h \
+ include/linux/signal.h \
+ include/asm/signal.h \
+ include/asm-generic/signal.h \
+ include/asm/siginfo.h \
+ include/asm-generic/siginfo.h \
+ include/linux/securebits.h \
+ include/linux/fs_struct.h \
+ include/linux/completion.h \
+ include/linux/pid.h \
+ include/linux/percpu.h \
+ include/linux/slab.h \
+ $(wildcard include/config/.h) \
+ include/linux/gfp.h \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ include/linux/init.h \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ include/asm/topology.h \
+ include/asm-generic/topology.h \
+ include/linux/kmalloc_sizes.h \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/large/allocs.h) \
+ include/linux/seccomp.h \
+ $(wildcard include/config/seccomp.h) \
+ include/asm/seccomp.h \
+ include/linux/unistd.h \
+ include/asm/unistd.h \
+ include/linux/param.h \
+ include/linux/resource.h \
+ include/asm/resource.h \
+ include/asm-generic/resource.h \
+ include/linux/timer.h \
+ include/linux/aio.h \
+ include/linux/workqueue.h \
+ include/linux/aio_abi.h \
+ include/linux/stat.h \
+ include/asm/stat.h \
+ include/linux/kmod.h \
+ $(wildcard include/config/kmod.h) \
+ include/linux/elf.h \
+ include/asm/elf.h \
+ include/asm/user.h \
+ include/linux/utsname.h \
+ include/linux/kobject.h \
+ include/linux/sysfs.h \
+ $(wildcard include/config/sysfs.h) \
+ include/linux/kref.h \
+ include/linux/kobject_uevent.h \
+ $(wildcard include/config/kobject/uevent.h) \
+ include/linux/moduleparam.h \
+ include/asm/local.h \
+ include/asm/module.h \
+ $(wildcard include/config/m486.h) \
+ $(wildcard include/config/m586.h) \
+ $(wildcard include/config/m586tsc.h) \
+ $(wildcard include/config/m586mmx.h) \
+ $(wildcard include/config/m686.h) \
+ $(wildcard include/config/mpentiumii.h) \
+ $(wildcard include/config/mpentiumiii.h) \
+ $(wildcard include/config/mpentiumm.h) \
+ $(wildcard include/config/mpentium4.h) \
+ $(wildcard include/config/mk6.h) \
+ $(wildcard include/config/mcrusoe.h) \
+ $(wildcard include/config/mefficeon.h) \
+ $(wildcard include/config/mwinchipc6.h) \
+ $(wildcard include/config/mwinchip2.h) \
+ $(wildcard include/config/mwinchip3d.h) \
+ $(wildcard include/config/mcyrixiii.h) \
+ $(wildcard include/config/mviac3/2.h) \
+ $(wildcard include/config/mgeodegx1.h) \
+ $(wildcard include/config/regparm.h) \
+ include/linux/smp_lock.h \
+ $(wildcard include/config/lock/kernel.h) \
+ $(wildcard include/config/preempt/bkl.h) \
+ include/linux/random.h \
+ include/linux/ioctl.h \
+ include/asm/ioctl.h \
+ include/linux/skbuff.h \
+ $(wildcard include/config/netfilter.h) \
+ $(wildcard include/config/bridge/netfilter.h) \
+ $(wildcard include/config/vlan/8021q.h) \
+ $(wildcard include/config/vlan/8021q/module.h) \
+ $(wildcard include/config/netfilter/debug.h) \
+ $(wildcard include/config/hippi.h) \
+ $(wildcard include/config/net/sched.h) \
+ $(wildcard include/config/net/cls/act.h) \
+ $(wildcard include/config/have/arch/dev/alloc/skb.h) \
+ $(wildcard include/config/highmem.h) \
+ include/linux/mm.h \
+ $(wildcard include/config/stack/growsup.h) \
+ $(wildcard include/config/shmem.h) \
+ $(wildcard include/config/proc/fs.h) \
+ $(wildcard include/config/debug/pagealloc.h) \
+ include/linux/prio_tree.h \
+ include/linux/fs.h \
+ $(wildcard include/config/dnotify.h) \
+ $(wildcard include/config/quota.h) \
+ $(wildcard include/config/epoll.h) \
+ $(wildcard include/config/auditsyscall.h) \
+ include/linux/limits.h \
+ include/linux/kdev_t.h \
+ include/linux/dcache.h \
+ include/linux/rcupdate.h \
+ include/linux/radix-tree.h \
+ include/linux/quota.h \
+ include/linux/dqblk_xfs.h \
+ include/linux/dqblk_v1.h \
+ include/linux/dqblk_v2.h \
+ include/linux/nfs_fs_i.h \
+ include/linux/nfs.h \
+ include/linux/sunrpc/msg_prot.h \
+ include/linux/fcntl.h \
+ include/asm/fcntl.h \
+ include/linux/err.h \
+ include/asm/pgtable.h \
+ $(wildcard include/config/highpte.h) \
+ include/asm/fixmap.h \
+ $(wildcard include/config/x86/local/apic.h) \
+ $(wildcard include/config/x86/io/apic.h) \
+ $(wildcard include/config/x86/visws/apic.h) \
+ $(wildcard include/config/x86/f00f/bug.h) \
+ $(wildcard include/config/x86/cyclone/timer.h) \
+ $(wildcard include/config/acpi/boot.h) \
+ $(wildcard include/config/pci/mmconfig.h) \
+ include/asm/acpi.h \
+ $(wildcard include/config/acpi/pci.h) \
+ $(wildcard include/config/acpi/sleep.h) \
+ include/acpi/pdc_intel.h \
+ include/asm/apicdef.h \
+ include/asm/kmap_types.h \
+ $(wildcard include/config/debug/highmem.h) \
+ include/asm/pgtable-2level-defs.h \
+ include/asm/pgtable-2level.h \
+ include/asm-generic/pgtable-nopmd.h \
+ include/asm-generic/pgtable-nopud.h \
+ include/asm-generic/pgtable.h \
+ include/linux/page-flags.h \
+ $(wildcard include/config/swap.h) \
+ include/linux/highmem.h \
+ include/asm/cacheflush.h \
+ include/asm/highmem.h \
+ include/linux/interrupt.h \
+ $(wildcard include/config/generic/hardirqs.h) \
+ $(wildcard include/config/generic/irq/probe.h) \
+ include/linux/hardirq.h \
+ $(wildcard include/config/virt/cpu/accounting.h) \
+ include/asm/hardirq.h \
+ include/linux/irq.h \
+ $(wildcard include/config/arch/s390.h) \
+ include/asm/irq.h \
+ $(wildcard include/config/irqbalance.h) \
+ include/asm-i386/mach-default/irq_vectors.h \
+ include/asm-i386/mach-default/irq_vectors_limits.h \
+ $(wildcard include/config/pci/msi.h) \
+ include/asm/hw_irq.h \
+ include/linux/profile.h \
+ $(wildcard include/config/profiling.h) \
+ include/asm/sections.h \
+ include/asm-generic/sections.h \
+ include/linux/irq_cpustat.h \
+ include/asm/tlbflush.h \
+ $(wildcard include/config/x86/invlpg.h) \
+ include/linux/poll.h \
+ include/asm/poll.h \
+ include/asm/uaccess.h \
+ $(wildcard include/config/x86/intel/usercopy.h) \
+ $(wildcard include/config/x86/wp/works/ok.h) \
+ include/linux/net.h \
+ include/asm/socket.h \
+ include/asm/sockios.h \
+ include/net/checksum.h \
+ include/asm/checksum.h \
+ include/linux/in6.h \
+ include/linux/atm.h \
+ include/linux/socket.h \
+ $(wildcard include/config/compat.h) \
+ include/linux/sockios.h \
+ include/linux/uio.h \
+ include/linux/atmapi.h \
+ include/linux/atmsap.h \
+ include/linux/atmioc.h \
+ include/linux/netdevice.h \
+ $(wildcard include/config/ax25.h) \
+ $(wildcard include/config/ax25/module.h) \
+ $(wildcard include/config/tr.h) \
+ $(wildcard include/config/net/ipip.h) \
+ $(wildcard include/config/ipv6.h) \
+ $(wildcard include/config/ipv6/module.h) \
+ $(wildcard include/config/netpoll.h) \
+ $(wildcard include/config/net/poll/controller.h) \
+ $(wildcard include/config/net/divert.h) \
+ $(wildcard include/config/netpoll/trap.h) \
+ include/linux/if.h \
+ include/linux/hdlc/ioctl.h \
+ include/linux/if_ether.h \
+ include/linux/if_packet.h \
+ include/linux/device.h \
+ include/linux/ioport.h \
+ include/linux/pm.h \
+ include/linux/notifier.h \
+ include/linux/etherdevice.h \
+ include/linux/if_arp.h \
+ include/linux/if_pppox.h \
+ include/linux/ppp_channel.h \
+ include/net/sock.h \
+ $(wildcard include/config/net.h) \
+ include/linux/security.h \
+ $(wildcard include/config/security/network.h) \
+ include/linux/binfmts.h \
+ include/linux/shm.h \
+ include/asm/shmparam.h \
+ include/asm/shmbuf.h \
+ include/linux/msg.h \
+ include/asm/msgbuf.h \
+ include/linux/filter.h \
+ include/net/dst.h \
+ $(wildcard include/config/net/cls/route.h) \
+ $(wildcard include/config/xfrm.h) \
+ include/linux/rtnetlink.h \
+ include/linux/netlink.h \
+ include/net/neighbour.h \
+ include/linux/seq_file.h \
+ include/linux/sysctl.h \
+ include/linux/ip.h \
+ include/linux/igmp.h \
+ include/linux/in.h \
+ include/net/flow.h \
+ include/linux/proc_fs.h \
+ $(wildcard include/config/proc/devicetree.h) \
+ $(wildcard include/config/proc/kcore.h) \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/types.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../amu/amas.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/crc.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/unicorn.h \
+ /home/fisaksen/src/unicorn/unicorn_usb/../include/debug.h \
+
+/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.o: $(deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.o)
+
+$(deps_/home/fisaksen/src/unicorn/unicorn_usb/../unicorn_eth/unicorn_ethdrv.o):
Added: dists/trunk/modules/unicorn/unicorn/unicorn_eth/unicorn_ethdrv.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_eth/unicorn_ethdrv.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1531 @@
+/*
+ This driver supports the Unicorn ADSL chipset from STMicroelectronics.
+ The chipset consists of the ADSL DMT transceiver ST70137 and either the
+ ST70134A or ST70136 Analog Front End (AFE).
+ This file contains the ethernet interface and SAR routines.
+*/
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/timer.h>
+#include <linux/errno.h>
+#include <linux/smp_lock.h>
+#include <linux/random.h>
+#include <linux/skbuff.h>
+#include <linux/atm.h>
+#include <linux/atmioc.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/if_ether.h>
+#include <linux/if_arp.h>
+#include <linux/if_pppox.h>
+#include <linux/ip.h>
+#include <linux/proc_fs.h>
+#include <asm/uaccess.h>
+#include "types.h"
+#include "amu/amas.h"
+#include "crc.h"
+#include "unicorn.h"
+#include "debug.h"
+
+#ifdef CONFIG_ATM
+extern struct proc_dir_entry *atm_proc_root;
+#else
+static struct proc_dir_entry *atm_proc_root=NULL;
+#endif
+
+#define DRIVER_NAME "UNICORN-ETH"
+#ifdef ETH_DRIVER
+MODULE_AUTHOR ("fisaksen at bewan.com");
+MODULE_DESCRIPTION ("Ethernet driver for the ST UNICORN ADSL modem.");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
+#endif
+
+const unsigned char PAD[2] =
+ {0x00,0x00};
+const unsigned char BRIDGED_LLC_OUI_PID[10] =
+ {0xAA,0xAA,0x03,0x00,0x80,0xC2,0x00,0x07,0x00,0x00}; // including PAD
+const unsigned char ROUTED_LLC_OUI_PID[8] =
+ {0xAA,0xAA,0x03,0x00,0x00,0x00,0x08,0x00};
+const unsigned char PPPOA_LLC_ENCAPS[4] =
+ {0xfe,0xfe,0x03,0xcf};
+
+
+// poll for data every POLL_TIME msec
+// multiple of 10ms in most cases
+#define POLL_TIME 10
+
+/*
+ * This structure defines an ethernet arp header.
+ */
+struct arphdr_eth
+{
+ unsigned short ar_hrd; /* format of hardware address */
+ unsigned short ar_pro; /* format of protocol address */
+ unsigned char ar_hln; /* length of hardware address */
+ unsigned char ar_pln; /* length of protocol address */
+ unsigned short ar_op; /* ARP opcode (command) */
+ /*
+ * Ethernet looks like this : This bit is variable sized however...
+ */
+ unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
+ __u32 ar_sip; /* sender IP address */
+ unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
+ __u32 ar_tip; /* target IP address */
+} __attribute__((packed));
+
+// Private data
+typedef struct unicorn_ethdrv {
+ /* eth driver */
+ struct net_device *dev;
+ struct sk_buff_head tx_q; // "Normal" transmit queue - UBR
+ struct sk_buff *reas; // Reassembly buffer
+ ADSL_STATUS adsl_status;
+ unsigned long downstream_rate;
+ unsigned long upstream_rate;
+ unsigned long curr_us_rate;
+ unsigned long us_cell_counter;
+ unsigned long curr_ds_rate;
+ unsigned long ds_cell_counter;
+ enum {
+ RFC2364=0,
+ RFC2684_BRIDGED,
+ RFC2684_ROUTED,
+ } protocol;
+ enum {
+ VCMUX=0,
+ LLC
+ } encaps;
+ /* VCC */
+ int vpi;
+ int vci;
+ /* traffic shaping */
+ int link_rate;
+ struct timer_list timer;
+ int ms_counter;
+ int max_cell_counter; // counts max number of cells/sec for traffic shaping
+ struct proc_dir_entry *proc_dir_entry;
+ /* Statistics */
+ struct net_device_stats eth_stats;
+ T_oam_stats oam_stats;
+ /* pci/usb driver entrypoints */
+ struct unicorn_entrypoints *ep;
+} unicorn_ethdrv_t;
+
+// extended skb_data structure used when encoding cells (max 48 bytes)
+struct atm_ext_skb_data {
+ unsigned char aal;
+ union {
+ struct {
+ unsigned int pdu_length;
+ } aal0;
+ struct {
+ unsigned int pdu_length;
+ unsigned long crc;
+ } aal5;
+ } tx;
+ };
+
+#define ATM_EXT_SKB(skb) (((struct atm_ext_skb_data *) (skb)->cb))
+
+
+struct unicorn_ethdrv *unicorn_ethdrv = NULL;
+
+// driver parameters
+static char *if_name = NULL;
+static unsigned char *mac_address=NULL;
+static int VPI= ATM_VPI_UNSPEC;
+static int VCI= ATM_VCI_UNSPEC;
+static char *PROTOCOL = NULL;
+static char *ENCAPS = NULL;
+#if DEBUG
+#ifdef ETH_DRIVER
+unsigned long DebugLevel=0; // ATM_D,DATA_D
+#endif
+#endif
+
+const unsigned char PPPOE_SERVER_ADDR[ETH_ALEN] = {0x00,'P','P','P','O','A'};
+static unsigned short pppoe_unique_session_id = 0;
+
+static int unicorn_eth_open(struct net_device *eth_dev);
+static int unicorn_eth_close(struct net_device *eth_dev);
+static int unicorn_eth_send(struct sk_buff *skb, struct net_device *eth_dev);
+static struct net_device_stats *unicorn_eth_stats(struct net_device *eth_dev);
+static int unicorn_eth_ioctl(struct net_device *eth_dev, struct ifreq *rq, int cmd);
+static int unicorn_eth_change_mtu(struct net_device *eth_dev, int new_mtu);
+static void unicorn_eth_set_multicast(struct net_device *eth_dev);
+static void unicorn_eth_tx_timeout(struct net_device *eth_dev);
+static int unicorn_eth_proc_read (char *page, char **start, off_t off, int count, int *eof, void *data);
+
+const char *get_adsl_status_string(ADSL_STATUS status)
+{
+ switch (status) {
+ case ADSL_STATUS_NOHARDWARE: return "no hardware";
+ case ADSL_STATUS_NOLINK: return "no link";
+ case ADSL_STATUS_ATMREADY: return "ATM ready";
+ default: return "unknown";
+ }
+}
+const char *get_modemstate_string(AMSW_ModemState state)
+{
+ switch(state) {
+ case C_AMSW_IDLE: return "IDLE";
+ case C_AMSW_L3: return "L3";
+ case C_AMSW_LISTENING: return "LISTENING";
+ case C_AMSW_ACTIVATING: return "ACTIVATING";
+ case C_AMSW_Ghs_HANDSHAKING: return "Ghs HANDSHAKING";
+ case C_AMSW_ANSI_HANDSHAKING: return "ANSI HANDSHAKING";
+ case C_AMSW_INITIALIZING: return "INITIALIZING";
+ case C_AMSW_RESTARTING: return "RESTARTING";
+ case C_AMSW_FAST_RETRAIN: return "FAST RETRAIN";
+ case C_AMSW_SHOWTIME_L0: return "SHOWTIME L0";
+ case C_AMSW_SHOWTIME_LQ: return "SHOWTIME LQ";
+ case C_AMSW_SHOWTIME_L1: return "SHOWTIME L1";
+ case C_AMSW_EXCHANGE: return "EXCHANGE";
+ case C_AMSW_TRUNCATE: return "TRUNCATE";
+ case C_AMSW_ESCAPE: return "ESCAPE";
+ case C_AMSW_DISORDERLY: return "DISORDERLY";
+ case C_AMSW_RETRY: return "RETRY";
+ default: return "unknown";
+ }
+}
+
+inline unsigned char get_hex_digit(const char digit[2])
+{
+ int i;
+ unsigned char h=0;
+
+ for (i = 0; i < 2; i++) {
+ char c = digit[i];
+ h <<=4;
+ if (c >= '0' && c <= '9') {
+ h += c - '0';
+ } else if (c >= 'A' && c <= 'F') {
+ h += c - 'A' + 10;
+ } else if (c >= 'a' && c <= 'f') {
+ h += c - 'a' + 10;
+ }
+ }
+ return h;
+}
+
+static void
+unicorn_set_mac(struct net_device *eth_dev, const char *mac)
+{
+ if ((mac != NULL) && (strlen(mac) >= (ETH_ALEN*2))) {
+ int i;
+ for (i=0; i < ETH_ALEN; i++) {
+ eth_dev->dev_addr[i] = get_hex_digit(&mac[i*2]);
+ }
+ eth_dev->dev_addr[0] &= ~0x01; // make sure it is not a broadcast address
+ } else {
+ /* Generate random Ethernet address. */
+ eth_dev->dev_addr[0] = 0x00;
+ get_random_bytes(ð_dev->dev_addr[1],ETH_ALEN-1);
+ }
+ INFO("MAC=%02x:%02x:%02x:%02x:%02x:%02x\n",
+ eth_dev->dev_addr[0],eth_dev->dev_addr[1],eth_dev->dev_addr[2],
+ eth_dev->dev_addr[3],eth_dev->dev_addr[4],eth_dev->dev_addr[5]);
+}
+
+static void make_hw_addr(__u32 ip_addr,unsigned char *hw_addr)
+{
+ hw_addr[0] = 0x00;
+ hw_addr[1] = 0xfe;
+ *(__u32 *)(&hw_addr[2]) = ip_addr;
+}
+
+static AMSW_ModemState get_modemstate(struct unicorn_ethdrv *drv)
+{
+ T_MswCtrl msw_ctrl;
+ AMSW_ModemState modemstate=C_AMSW_IDLE;
+
+ if (drv->ep) {
+ msw_ctrl.code = MSW_CTL_GET_STATE;
+ msw_ctrl.subcode = 0;
+ msw_ctrl.buffer = &modemstate;
+ msw_ctrl.length = sizeof(AMSW_ModemState);
+ drv->ep->msw_control(drv->ep->dev, &msw_ctrl);
+ }
+ DBG(ATM_D,"ADSL modem state %s\n",get_modemstate_string(modemstate));
+ return modemstate;
+}
+
+static int get_link_rate(struct unicorn_ethdrv *drv)
+{
+ int link_rate;
+
+ // get the ADSL link speed
+ if (drv->ep) {
+ drv->ep->get_adsl_linkspeed(drv->ep->dev,&drv->upstream_rate,&drv->downstream_rate);
+ if ((drv->upstream_rate == 0) || (drv->downstream_rate == 0)) {
+ link_rate = 0;
+ } else {
+ link_rate = (drv->upstream_rate*1000)/(8*ATM_CELL_SIZE);
+ }
+ } else {
+ link_rate = 0;
+ }
+ DBG(ATM_D,"upstream_rate=%ld Kbits/s,downstream_rate=%ld Kbits/s,link_rate=%d cells/sec\n",
+ drv->upstream_rate,drv->downstream_rate,link_rate);
+ return link_rate;
+}
+
+static int unicorn_eth_proc_read (char *page, char **start, off_t off, int count, int *eof, void *data)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)data;
+ struct net_device *eth_dev = drv->dev;
+ int size;
+ char *p = page;
+ AMSW_ModemState modemstate = get_modemstate(drv);
+ get_link_rate(drv);
+
+ p += sprintf(p, "ADSL: status %s, modem state %s, US rate %ldKbits/s, DS rate %ldKbits/s\n",
+ get_adsl_status_string(drv->adsl_status),get_modemstate_string(modemstate),
+ drv->upstream_rate,drv->downstream_rate);
+ p += sprintf(p,"Current speed: US %ldKbits/s,DS %ldKbits/s\n",
+ drv->curr_us_rate,drv->curr_ds_rate);
+ p += sprintf(p, "Bridged: %02x:%02x:%02x:%02x:%02x:%02x\n",
+ eth_dev->dev_addr[0], eth_dev->dev_addr[1], eth_dev->dev_addr[2],
+ eth_dev->dev_addr[3], eth_dev->dev_addr[4], eth_dev->dev_addr[5]);
+
+ /* Figure out how much of the page we used */
+ size = p - page;
+ size -= off;
+
+ if (size < count) {
+ *eof = 1;
+ if (size <= 0)
+ return 0;
+ } else {
+ size = count;
+ }
+ /* Fool caller into thinking we started where he told us to in the page */
+ *start = page + off;
+ return size;
+}
+
+static int skb_add_header(struct sk_buff *skb,const unsigned char *header,int len)
+{
+ if (skb_headroom(skb) < len) {
+ if (skb_cow(skb,len)) {
+ return -ENOMEM;
+ }
+ }
+ memcpy(skb_push(skb,len),header,len);
+ return 0;
+}
+
+static inline struct sk_buff *peek_tx_skb(struct unicorn_ethdrv *drv)
+{
+ struct sk_buff *skb;
+
+ skb = skb_peek(&drv->tx_q);
+ return skb;
+}
+
+static inline struct sk_buff *dequeue_tx_skb(struct unicorn_ethdrv *drv)
+{
+ struct sk_buff *skb;
+
+ skb = skb_dequeue(&drv->tx_q);
+ return skb;
+}
+
+static void purge_tx_q(struct unicorn_ethdrv *drv)
+{
+ struct sk_buff *skb;
+
+ // free all buffers in transmit queue
+ while ((skb = dequeue_tx_skb(drv)) != NULL) {
+ dev_kfree_skb_any(skb);
+ // statistics
+ }
+}
+
+static int build_aal0_cell(struct unicorn_ethdrv *drv,unsigned char *cell,struct sk_buff *skb)
+{
+ DBG(ATM_D,"skb->len=%d\n",skb->len);
+
+ if (skb->len == ATM_AAL0_SDU) {
+ // from AAL0 socket
+ memcpy(cell,skb->data,ATM_AAL0_SDU - ATM_CELL_PAYLOAD);
+ skb_pull(skb,ATM_AAL0_SDU - ATM_CELL_PAYLOAD);
+ memcpy(cell+5,skb->data,ATM_CELL_PAYLOAD);
+ skb_pull(skb,ATM_CELL_PAYLOAD);
+ } else {
+ // OAM loopback
+ memcpy(cell,skb->data,ATM_CELL_SIZE);
+ skb_pull(skb,ATM_CELL_SIZE);
+ }
+ DUMP_PACKET(DATA_D,cell,ATM_CELL_SIZE);
+ return 1;
+}
+
+static int build_aal5_cell(struct unicorn_ethdrv *drv,unsigned char *cell,struct sk_buff *skb)
+{
+ struct atm_ext_skb_data *skb_data = ATM_EXT_SKB(skb);
+ int payload_len;
+ int pad_len;
+
+ ASSERT(skb_data != NULL);
+
+ // Add 5 byte ATM header
+ cell[0] = (drv->vpi >> 4) & 0xf;
+ cell[1] = ((drv->vpi & 0xf) << 4) | ((drv->vci >> 12) & 0xf);
+ cell[2] = drv->vci >> 4;
+ cell[3] = (drv->vci & 0xf ) << 4;
+ // The header checksum will be added by the card...
+
+ // Add payload
+ payload_len = skb->len >= ATM_CELL_PAYLOAD ? ATM_CELL_PAYLOAD : skb->len;
+ if (payload_len > 0) {
+ memcpy(cell+5, skb->data, payload_len);
+ skb_pull(skb, payload_len);
+ }
+
+ pad_len = ATM_CELL_PAYLOAD - payload_len;
+ // Is this the last cell ?
+ if (pad_len >= ATM_AAL5_TRAILER) {
+ // Last cell
+ pad_len -= ATM_AAL5_TRAILER;
+ // setting pti bit in last cell
+ cell[3] |= 0x02;
+ }
+
+ DBG(DATA_D,"payload_len=%d,pad_len=%d,pti=%x\n",payload_len,pad_len,cell[3] & 0x2);
+
+ // Add zero padding
+ if (pad_len > 0) {
+ memset(cell+5+payload_len, 0, pad_len);
+ }
+
+ if (cell[3] & 0x02) {
+ // Add AAL5 trailer
+ unsigned char *trailer = cell+ATM_CELL_SIZE-ATM_AAL5_TRAILER;
+ *trailer++ = (unsigned char) 0; /* UU = 0 */
+ *trailer++ = (unsigned char) 0; /* CPI = 0 */
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.pdu_length >> 8);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.pdu_length & 0xff);
+ // Update and add CRC
+ skb_data->tx.aal5.crc = ~crc32(skb_data->tx.aal5.crc, cell+5, ATM_CELL_PAYLOAD-4);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 24);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 16);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc >> 8);
+ *trailer++ = (unsigned char) (skb_data->tx.aal5.crc & 0xff);
+ return 1;
+ } else {
+ // Update CRC
+ skb_data->tx.aal5.crc = crc32(skb_data->tx.aal5.crc, cell+5, ATM_CELL_PAYLOAD);
+ return 0;
+ }
+}
+
+static void snd_poll(struct unicorn_ethdrv *drv)
+{
+ struct unicorn_entrypoints *ep = drv->ep;
+ int max_cells,cells;
+ unsigned char *cell;
+ struct sk_buff *skb;
+ int finished;
+ int t;
+
+ if (!ep) return;
+ ASSERT(ep->snd_getcell != NULL);
+
+ // do traffic shaping
+ drv->ms_counter += POLL_TIME;
+ if (drv->ms_counter >= 1000) {
+ // 1 sec
+ DBG(DATA_D,"max_cell_counter=%d,us_cell_counter=%ld\n",
+ drv->max_cell_counter,drv->us_cell_counter);
+ drv->ms_counter = 0;
+ drv->max_cell_counter = 0;
+ drv->curr_us_rate = (drv->us_cell_counter*ATM_CELL_SIZE*8UL)/1000UL;
+ drv->us_cell_counter = 0;
+
+ // Downstream
+ drv->curr_ds_rate = (drv->ds_cell_counter*ATM_CELL_SIZE*8UL)/1000UL;
+ drv->ds_cell_counter = 0;
+ }
+
+ t = 1000-drv->ms_counter;
+ max_cells = (((drv->link_rate - drv->max_cell_counter) * POLL_TIME) + (t/2))/t;
+ drv->max_cell_counter += max_cells;
+
+ cells=0;
+ skb = peek_tx_skb(drv);
+ while ((cells < max_cells) &&
+ (skb != NULL) &&
+ ((cell = ep->snd_getcell(ep->dev)) != NULL)) {
+ ++cells;
+
+ // statistics
+ ++drv->us_cell_counter;
+
+ switch (ATM_EXT_SKB(skb)->aal) {
+ case ATM_AAL0:
+ finished = build_aal0_cell(drv,cell,skb);
+ break;
+ case ATM_AAL5:
+ finished = build_aal5_cell(drv,cell,skb);
+ break;
+ default:
+ WARN("AAL%d not supported\n",ATM_EXT_SKB(skb)->aal==ATM_AAL0 ? 0 : ATM_EXT_SKB(skb)->aal);
+ finished=1;
+ break;
+ }
+
+ if (finished) {
+ // Finished with this buffer
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14))
+ skb_unlink(skb,&drv->tx_q);
+#else
+ skb_unlink(skb);
+#endif
+ dev_kfree_skb_any(skb);
+ // Get next buffer
+ skb = peek_tx_skb(drv);
+ }
+ }
+
+ if (cells) {
+ ep->start_transmit(ep->dev);
+ DBG(DATA_D,"%d/%d cells\n",cells,max_cells);
+ }
+}
+
+static void oam_loopback(struct unicorn_ethdrv *drv,unsigned char *cell)
+{
+ struct sk_buff *skb;
+ struct atm_ext_skb_data *skb_data;
+
+ DBG(ATM_D,"\n");
+
+ skb = dev_alloc_skb(ATM_CELL_SIZE);
+ if (!skb) {
+ WARN("dev_alloc_skb of size %d failed\n",ATM_CELL_SIZE);
+ return ;
+ }
+ memcpy(skb->data,cell,ATM_CELL_SIZE);
+ skb_put(skb,ATM_CELL_SIZE);
+
+ // AAL0
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->aal = ATM_AAL0;
+ skb_data->tx.aal0.pdu_length = skb->len;
+
+ // put skb on transmit queue
+ skb_queue_tail(&drv->tx_q, skb);
+}
+
+static void rcv_oam(struct unicorn_ethdrv *drv,unsigned char *cell,int vpi,int vci)
+{
+ unsigned char *pdu= cell+5;
+ unsigned char pti = cell[3] & 0x0E;
+ unsigned short rcvdcrc,crc;
+
+ DBG(ATM_D,"vpi=%d,vci=%d,pti=0x%02x,type=0x%02x,indicator=0x%02x,LLID=0x%02x\n",
+ vpi,vci,pti,pdu[0],pdu[1],pdu[6]);
+
+ if (vci == 21) {
+ oam_loopback(drv,cell);
+ return;
+ }
+
+ // Process only OAM-F4 flow and OAM-F5 flow cells
+ switch (pti) {
+ case 0x00: // OAM-F4 flow cell
+ case 0x04: // OAM-F4 flow cell
+ // VCI = 3 -> Segment OAM-F4
+ // VCI = 4 -> End-to-end OAM-F4
+ if (vci != 3 && vci != 4) return;
+ break;
+ case 0x08: // Segment OAM-F5 flow cell
+ case 0x0A: // End-to-end OAM-F5 flow cell
+ break;
+ default:
+ return;
+ }
+
+ // Save the received CRC
+ rcvdcrc = (unsigned short)pdu[ATM_CELL_PAYLOAD-1];
+ rcvdcrc += (unsigned short)pdu[ATM_CELL_PAYLOAD-2]<<8;
+ rcvdcrc &= 0x03FF;
+
+ // Put 0 in the CRC field of the received PDU
+ pdu[ATM_CELL_PAYLOAD-2] &= 0xFC;
+ pdu[ATM_CELL_PAYLOAD-1] = 0;
+
+ // Computes the CRC10 and check for the result
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ if (crc != rcvdcrc) {
+ WARN("Received OAM cell with invalid CRC\n");
+ return;
+ }
+
+ // Increment the counters according to the OAM cell type
+ switch(pdu[0]) {
+ case 0x10:
+ ++drv->oam_stats.rx_AIS;
+ break;
+ case 0x11:
+ ++drv->oam_stats.rx_RDI;
+ break;
+ case 0x14:
+ ++drv->oam_stats.rx_CC;
+ break;
+ case 0x18:
+ if (pdu[6] != 0x6a) { // LLID field
+ if(pdu[1] == 0x01) {
+ ++drv->oam_stats.rx_ne_LB;
+ pdu[1] = 0x00;
+ // clear CRC
+ pdu[ATM_CELL_PAYLOAD-2]=pdu[ATM_CELL_PAYLOAD-1]=0;
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ pdu[ATM_CELL_PAYLOAD-2] = (unsigned char)(crc >> 8);
+ pdu[ATM_CELL_PAYLOAD-1] = (unsigned char)(crc);
+ oam_loopback(drv,cell);
+ return;
+ } else if (pdu[1] == 0x00) {
+ ++drv->oam_stats.rx_fe_LB;
+ }
+ // save the VPI.VCI for auto-configuration
+ if ((drv->vpi == ATM_VPI_UNSPEC) && (drv->vci == ATM_VCI_UNSPEC)) {
+ drv->vpi = vpi;
+ drv->vci = vci;
+ }
+ }
+ break;
+ }
+}
+
+static struct sk_buff *rawcell_decode(struct unicorn_ethdrv *drv, unsigned char *cell)
+{
+ struct sk_buff *skb;
+ unsigned int max_mru = drv->dev->mtu+ATM_CELL_PAYLOAD; // the AAL5 padding may take up to 1 cell
+
+ // get reassembly buffer
+ skb = drv->reas;
+ if (!skb) {
+ skb = drv->reas = dev_alloc_skb(max_mru);
+ if (!skb) {
+ WARN("dev_alloc_skb failed\n");
+ return NULL;
+ }
+ skb->dev = drv->dev;
+ }
+
+ // copy data
+ if (skb->len > (max_mru-ATM_CELL_PAYLOAD)) {
+ skb_trim(skb, 0);
+ }
+ memcpy(skb_put(skb,ATM_CELL_PAYLOAD), cell+5, ATM_CELL_PAYLOAD);
+
+ // check for end of buffer
+ if (cell[3] & 0x2) {
+ // the aal5 buffer ends here, cut the buffer.
+ drv->reas = NULL;
+ } else {
+ drv->reas = skb;
+ skb = NULL;
+ }
+ return skb;
+}
+
+static struct sk_buff *aal5_decode(struct sk_buff *skb)
+{
+ unsigned long crc = CRC32_INITIAL;
+ unsigned long pdu_crc;
+ unsigned int length,pdu_length;
+
+ if (skb->len && (skb->len % ATM_CELL_PAYLOAD)) {
+ WARN("wrong size %d\n",skb->len);
+ goto fail;
+ }
+
+ length = (skb->tail[-6] << 8) + skb->tail[-5];
+ pdu_crc = (skb->tail[-4] << 24) + (skb->tail[-3] << 16) + (skb->tail[-2] << 8) + skb->tail[-1];
+ pdu_length = ((length + 47 + 8)/ 48) * 48;
+
+ DBG(DATA_D,"skb->len=%d,length=%d,pdu_crc=0x%lx,pdu_length=%d\n",skb->len,length,pdu_crc,pdu_length);
+
+ // is skb long enough ?
+ if (skb->len < pdu_length) {
+ WARN("skb to short,skb->len=%d,pdu_length=%d\n",skb->len,pdu_length);
+ goto fail;
+ }
+
+ // is skb too long ?
+ if (skb->len > pdu_length) {
+ WARN("readjusting illegal skb->len %d -> %d\n",skb->len,pdu_length);
+ skb_pull(skb, skb->len - pdu_length);
+ }
+
+ crc = ~crc32(crc,skb->data,pdu_length-4);
+
+ // check crc
+ if (pdu_crc != crc) {
+ WARN("crc check failed!\n");
+ goto fail;
+ }
+
+ // pdu is ok
+ skb_trim(skb, length);
+ return skb;
+
+fail:
+ dev_kfree_skb_any(skb);
+ return NULL;
+}
+
+static void rcv_aal5(struct unicorn_ethdrv *drv,unsigned char *cell)
+{
+ struct sk_buff *skb;
+
+ skb = rawcell_decode(drv,cell);
+ if (!skb)
+ return;
+
+ skb = aal5_decode(skb);
+ if (!skb)
+ goto fail;
+
+ DBG(DATA_D,"vpi=%d,vci=%d\n",drv->vpi,drv->vci);
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+
+ ++drv->eth_stats.rx_packets;
+ drv->eth_stats.rx_bytes += skb->len;
+
+ if (drv->protocol == RFC2684_BRIDGED) {
+ // remove encaps
+ if (drv->encaps == LLC) {
+ if ((skb->len >= sizeof(BRIDGED_LLC_OUI_PID)) &&
+ (memcmp(skb->data,BRIDGED_LLC_OUI_PID,sizeof(BRIDGED_LLC_OUI_PID))==0)) {
+ skb_pull(skb,sizeof(BRIDGED_LLC_OUI_PID));
+ } else {
+ WARN("wrong BRIDGED_LLC_OUI_PID encaps %02x%02x\n",skb->data[0],skb->data[1]);
+ goto fail;
+ }
+ } else {
+ if ((skb->len >= sizeof(PAD)) &&
+ (memcmp(skb->data,PAD,sizeof(PAD))==0)) {
+ skb_pull(skb,sizeof(PAD));
+ } else {
+ WARN("wrong PAD encaps %02x%02x\n",skb->data[0],skb->data[1]);
+ goto fail;
+ }
+ }
+ } else if (drv->protocol == RFC2684_ROUTED) {
+ struct ethhdr ethhdr;
+ struct iphdr *iphdr;
+ // remove encaps
+ if (drv->encaps == LLC) {
+ if ((skb->len >= sizeof(ROUTED_LLC_OUI_PID)) &&
+ (memcmp(skb->data,ROUTED_LLC_OUI_PID,sizeof(ROUTED_LLC_OUI_PID))==0)) {
+ skb_pull(skb,sizeof(ROUTED_LLC_OUI_PID));
+ } else {
+ WARN("wrong ROUTED_LLC_OUI_PID encaps %02x%02x\n",skb->data[0],skb->data[1]);
+ goto fail;
+ }
+ }
+ // add enet header
+ iphdr = (struct iphdr *)skb->data;
+ memcpy(ethhdr.h_dest,drv->dev->dev_addr,ETH_ALEN);
+ make_hw_addr(iphdr->saddr,ethhdr.h_source);
+ ethhdr.h_proto = htons(ETH_P_IP);
+ if (skb_add_header(skb,(unsigned char *)ðhdr.h_dest,ETH_HLEN)) {
+ goto fail;
+ }
+ } else if (drv->protocol == RFC2364) {
+ struct pppoe_hdr pppoe_hdr;
+ struct ethhdr ethhdr;
+ // remove encaps
+ if (drv->encaps == LLC) {
+ if ((skb->len >= sizeof(PPPOA_LLC_ENCAPS)) &&
+ (memcmp(skb->data,PPPOA_LLC_ENCAPS,sizeof(PPPOA_LLC_ENCAPS))==0)) {
+ skb_pull(skb,sizeof(PPPOA_LLC_ENCAPS));
+ } else {
+ WARN("wrong PPPOA_LLC_ENCAPS %02x%02x\n",skb->data[0],skb->data[1]);
+ goto fail;
+ }
+ }
+ // add PPPoE header
+ pppoe_hdr.ver = 1;
+ pppoe_hdr.type = 1;
+ pppoe_hdr.code = 0;
+ pppoe_hdr.sid = htons(pppoe_unique_session_id);
+ pppoe_hdr.length = htons(skb->len);
+ if (skb_add_header(skb,(unsigned char *)&pppoe_hdr,sizeof(struct pppoe_hdr))) {
+ goto fail;
+ }
+ // add enet header
+ memcpy(ethhdr.h_dest,drv->dev->dev_addr,ETH_ALEN);
+ memcpy(ethhdr.h_source,PPPOE_SERVER_ADDR,ETH_ALEN);
+ ethhdr.h_proto = htons(ETH_P_PPP_SES);
+ if (skb_add_header(skb,(unsigned char *)ðhdr.h_dest,ETH_HLEN)) {
+ goto fail;
+ }
+ }
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+
+ drv->dev->last_rx = jiffies;
+ skb->protocol = eth_type_trans(skb,drv->dev);
+ DBG(ATM_D,"skb->len=%d,skb->protocol=%04x\n",skb->len,htons(skb->protocol));
+ netif_rx(skb);
+ return;
+
+fail:
+ if (skb)
+ dev_kfree_skb_any(skb);
+ ++drv->eth_stats.rx_errors;
+ return;
+}
+
+
+static void rcv_poll(struct unicorn_ethdrv *drv)
+{
+ struct unicorn_entrypoints *ep = drv->ep;
+ unsigned char *cell;
+
+ if (!ep) return;
+
+ ASSERT(ep->rcv_getcell != NULL);
+
+ while ((cell = ep->rcv_getcell(ep->dev)) != NULL) {
+ int vpi = ((cell[0] & 0xf) << 4) | (cell[1] >> 4);
+ int vci = ((cell[1] & 0xf) << 12) | (cell[2] << 4) | (cell[3] >> 4);
+ // Check for OAM cells and process them
+ if (((cell[3] & 0x0E) >= 8) || // OAM-F5
+ ((vpi==0) && (vci==21)) || // OAM-F4
+ ((vpi==0) && (vci==3)) ||
+ ((vpi==0) && (vci==4))) {
+ rcv_oam(drv,cell,vpi,vci);
+ } else if ((vpi == drv->vpi) && (vci == drv->vci)) {
+ // statistics
+ ++drv->ds_cell_counter;
+
+ rcv_aal5(drv,cell);
+ } else {
+ DBG(ATM_D,"unknown VPI.VCI %d.%d\n",vpi,vci);
+ }
+ }
+}
+
+static void unicorn_poll_data(unsigned long context)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)context;
+ ADSL_STATUS prev_adsl_status;
+
+ if (!drv->ep || !drv->dev) goto restart;
+
+ prev_adsl_status = drv->adsl_status;
+ drv->adsl_status = drv->ep->get_adsl_status(drv->ep->dev);
+
+ if (drv->adsl_status != prev_adsl_status) {
+ // ADSL state has changed...
+ if (drv->adsl_status == ADSL_STATUS_ATMREADY) {
+ // get the new ADSL link rate
+ drv->link_rate = get_link_rate(drv);
+ //netif_start_queue(drv->dev);
+ } else {
+ drv->link_rate = 0;
+ //netif_stop_queue(drv->dev);
+
+ // free all buffers in transmit queues
+ purge_tx_q(drv);
+ }
+ }
+
+ if (drv->adsl_status == ADSL_STATUS_ATMREADY) {
+ rcv_poll(drv);
+ snd_poll(drv);
+ }
+
+ restart:
+ drv->timer.expires = ((POLL_TIME*HZ)/1000) + jiffies;
+ add_timer(&drv->timer);
+}
+
+
+static void simulate_arp_reply(struct sk_buff *skb,struct net_device *eth_dev)
+{
+ struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
+ struct arphdr_eth *arphdr = (struct arphdr_eth *)&skb->data[ETH_HLEN];
+
+ if (arphdr->ar_op == htons(ARPOP_REQUEST)) {
+ DBG(ATM_D,"ARP request for %d.%d.%d.%d\n",NIPQUAD(arphdr->ar_tip));
+ if ((arphdr->ar_sip != arphdr->ar_tip) && (arphdr->ar_sip != 0L)) {
+ __u32 sip = arphdr->ar_sip;
+ arphdr->ar_op = htons(ARPOP_REPLY);
+ arphdr->ar_sip = arphdr->ar_tip;
+ arphdr->ar_tip = sip;
+ memcpy(arphdr->ar_tha,arphdr->ar_sha,ETH_ALEN);
+ // Make up source HW address using target IP address
+ make_hw_addr(arphdr->ar_sip,arphdr->ar_sha);
+
+ memcpy(ethhdr->h_dest,arphdr->ar_tha,ETH_ALEN);
+ memcpy(ethhdr->h_source,arphdr->ar_sha,ETH_ALEN);
+ skb->protocol = eth_type_trans(skb,eth_dev);
+ skb->dev = eth_dev;
+ DBG(ATM_D,"skb->len=%d,skb->protocol=%04x\n",skb->len,htons(skb->protocol));
+ netif_rx(skb);
+ } else {
+ // Checking my IP address, ignore
+ dev_kfree_skb_any(skb);
+ }
+ } else {
+ DBG(ATM_D,"not ARP request,dropping packet\n");
+ dev_kfree_skb_any(skb);
+ }
+}
+
+static void simulate_pppoe_server_reply(struct sk_buff *skb,struct net_device *eth_dev)
+{
+ struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
+ struct pppoe_hdr *pppoe_hdr = (struct pppoe_hdr *)&skb->data[ETH_HLEN];
+ struct pppoe_tag *tags = (struct pppoe_tag *)&skb->data[ETH_HLEN+sizeof(struct pppoe_hdr)];
+ struct pppoe_tag *ac_name_tag;
+
+ if (skb->len < ETH_HLEN+sizeof(struct pppoe_hdr)) {
+ DBG(ATM_D,"PPPoE packet too short (%d)\n",skb->len);
+ goto drop;
+ }
+
+ switch (pppoe_hdr->code) {
+ case PADI_CODE:
+ DBG(ATM_D,"PADI received,send PADO\n");
+ pppoe_hdr->ver = 1;
+ pppoe_hdr->type = 1;
+ pppoe_hdr->code = PADO_CODE;
+ pppoe_hdr->sid = 0;
+
+ ac_name_tag = (struct pppoe_tag *)((unsigned char *)tags + ntohs(pppoe_hdr->length));
+ ac_name_tag->tag_type = PTT_AC_NAME;
+ ac_name_tag->tag_len = htons(2);
+ ac_name_tag->tag_data[0] = 'S';
+ ac_name_tag->tag_data[1] = 'T';
+
+ pppoe_hdr->length = htons(ntohs(pppoe_hdr->length)+6);
+ break;
+ case PADR_CODE:
+ DBG(ATM_D,"PADR received,send PADS\n");
+ pppoe_hdr->ver = 1;
+ pppoe_hdr->type = 1;
+ pppoe_hdr->code = PADS_CODE;
+ if (++pppoe_unique_session_id == 0)
+ pppoe_unique_session_id = 1;
+ pppoe_hdr->sid = htons(pppoe_unique_session_id);
+ break;
+ case PADT_CODE:
+ DBG(ATM_D,"PADT received\n");
+ goto drop;
+ break;
+ case PADO_CODE:
+ case PADS_CODE:
+ default:
+ goto drop;
+ break;
+ }
+
+ skb->len = ETH_HLEN+sizeof(struct pppoe_hdr)+ntohs(pppoe_hdr->length);
+ skb->tail = skb->data + skb->len;
+ memcpy(ethhdr->h_dest,eth_dev->dev_addr,ETH_ALEN);
+ memcpy(ethhdr->h_source,PPPOE_SERVER_ADDR,ETH_ALEN);
+ skb->protocol = eth_type_trans(skb,eth_dev);
+ skb->dev = eth_dev;
+ DBG(ATM_D,"skb->len=%d,skb->protocol=%04x\n",skb->len,htons(skb->protocol));
+ netif_rx(skb);
+ return;
+
+ drop:
+ DBG(ATM_D,"PPPoE packet dropped\n");
+ dev_kfree_skb_any(skb);
+ return;
+}
+
+static int unicorn_eth_send(struct sk_buff *skb, struct net_device *eth_dev)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *) eth_dev->priv;
+ struct atm_ext_skb_data *skb_data;
+ int status;
+
+ DBG(DATA_D,"vpi=%d,vci=%d,protocol=%d,encaps=%d\n",
+ drv->vpi,drv->vci,drv->protocol,drv->encaps);
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+
+ if (!drv->ep) {
+ WARN("no bus driver\n");
+ status = -ENXIO;
+ goto fail;
+ }
+ if (drv->adsl_status != ADSL_STATUS_ATMREADY) {
+ DBG(ATM_D,"ATM not ready,adsl_status=%d\n",drv->adsl_status);
+ status = -EIO;
+ goto fail;
+ }
+
+ if (drv->protocol == RFC2684_BRIDGED) {
+ // add encaps
+ if (drv->encaps == LLC) {
+ status = skb_add_header(skb,BRIDGED_LLC_OUI_PID,sizeof(BRIDGED_LLC_OUI_PID));
+ } else {
+ status = skb_add_header(skb,PAD,sizeof(PAD));
+ }
+ } else if (drv->protocol == RFC2684_ROUTED) {
+ struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
+ if (ethhdr->h_proto == htons(ETH_P_ARP)) {
+ simulate_arp_reply(skb,eth_dev);
+ return 0;
+ } else if (ethhdr->h_proto == htons(ETH_P_IP)) {
+ // remove ethernet header
+ skb_pull(skb,ETH_HLEN);
+ // add encaps
+ if (drv->encaps == LLC) {
+ status = skb_add_header(skb,ROUTED_LLC_OUI_PID,sizeof(ROUTED_LLC_OUI_PID));
+ } else {
+ status = 0;
+ }
+ } else {
+ status = -EIO; // drop
+ }
+ } else if (drv->protocol == RFC2364) {
+ struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
+ if (ethhdr->h_proto == htons(ETH_P_PPP_DISC)) {
+ simulate_pppoe_server_reply(skb,eth_dev);
+ return 0;
+ } else if (ethhdr->h_proto == htons(ETH_P_PPP_SES)) {
+ // remove ethernet header + PPPOE header
+ skb_pull(skb,ETH_HLEN+sizeof(struct pppoe_hdr));
+ // add encaps
+ if (drv->encaps == LLC) {
+ status = skb_add_header(skb,PPPOA_LLC_ENCAPS,sizeof(PPPOA_LLC_ENCAPS));
+ } else {
+ status = 0;
+ }
+ } else {
+ status = -EIO;// drop
+ }
+ } else {
+ status = -EINVAL;
+ }
+ if (status) {
+ goto fail;
+ }
+ DUMP_PACKET(DATA_D,skb->data,skb->len);
+ ++drv->eth_stats.tx_packets;
+ drv->eth_stats.tx_bytes += skb->len;
+
+ // AAL5
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->aal = ATM_AAL5;
+ skb_data->tx.aal5.pdu_length = skb->len;
+ skb_data->tx.aal5.crc = CRC32_INITIAL;
+
+ // put skb on transmit queue
+ skb_queue_tail(&drv->tx_q, skb);
+ eth_dev->trans_start = jiffies;
+ return 0;
+
+fail:
+ ++drv->eth_stats.tx_errors;
+ DBG(ATM_D,"status=%d\n",status);
+ if (skb) dev_kfree_skb(skb);
+ return 0; // do not return status as this causes panic
+}
+
+void start_poll_timer(struct unicorn_ethdrv *drv)
+{
+ drv->ms_counter = 0;
+ drv->max_cell_counter = 0;
+
+ DBG(ATM_D,"POLL_TIME=%dms\n",POLL_TIME);
+
+ ASSERT(drv->ep != NULL);
+
+ // empty the receive buffer
+ while ((drv->ep->rcv_getcell(drv->ep->dev)) != NULL) {
+ }
+
+ // start send and receive poll timer
+ init_timer(&drv->timer);
+
+ drv->timer.data = (unsigned long)drv;
+ drv->timer.function = unicorn_poll_data;
+ drv->timer.expires = ((POLL_TIME*HZ)/1000) + jiffies;
+
+ add_timer(&drv->timer);
+}
+
+static void stop_poll_timer(struct unicorn_ethdrv *drv)
+{
+ // stop timer
+ del_timer(&drv->timer);
+ // free all buffers in transmit queues
+ purge_tx_q(drv);
+}
+
+static int unicorn_eth_open(struct net_device *eth_dev)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
+
+ DBG(ATM_D,"vpi=%d,vci=%d\n",drv->vpi,drv->vci);
+
+ if (!drv->ep) return -ENXIO;
+
+ drv->reas = NULL;
+
+ // initialize transmit queue
+ skb_queue_head_init(&drv->tx_q);
+
+ drv->adsl_status = drv->ep->get_adsl_status(drv->ep->dev);
+ // get the ADSL link rate
+ drv->link_rate = get_link_rate(drv);
+
+ // Install the proc_read function in /proc/net/atm/
+#ifndef CONFIG_ATM
+ atm_proc_root = proc_mkdir("net/atm",NULL);
+ if (atm_proc_root) atm_proc_root->owner=THIS_MODULE;
+#endif
+ if (atm_proc_root) {
+ drv->proc_dir_entry = create_proc_read_entry("UNICORN:0",0,atm_proc_root,unicorn_eth_proc_read,drv);
+ if (drv->proc_dir_entry) {
+ drv->proc_dir_entry->owner = THIS_MODULE;
+ INFO("created proc entry at /proc/net/atm/UNICORN:0\n");
+ } else {
+ WARN("no proc entry installed\n");
+ }
+ } else {
+ WARN("no proc entry installed\n");
+ }
+
+ // first VCC, start data poll timer
+ start_poll_timer(drv);
+
+ //if (drv->adsl_status == ADSL_STATUS_ATMREADY) {
+ netif_start_queue(eth_dev);
+ //}
+ return 0;
+}
+
+static int
+unicorn_eth_close(struct net_device *eth_dev)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
+
+ DBG(ATM_D,"\n");
+
+ netif_stop_queue(eth_dev);
+
+ // freeing resources
+ if (drv->reas) {
+ dev_kfree_skb_any(drv->reas);
+ drv->reas = NULL;
+ }
+
+ // freeing address
+ drv->vpi = ATM_VPI_UNSPEC;
+ drv->vci = ATM_VCI_UNSPEC;
+
+ // last VCC, stop data poll timer
+ stop_poll_timer(drv);
+
+#ifndef CONFIG_ATM
+ if (atm_proc_root) remove_proc_entry("UNICORN:0",atm_proc_root);
+#endif
+ return 0;
+}
+
+static struct net_device_stats *unicorn_eth_stats(struct net_device *eth_dev)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
+ return &drv->eth_stats;
+}
+
+static int oam_send(struct unicorn_ethdrv *drv,int type,int vpi,int vci)
+{
+ struct sk_buff *skb;
+ struct atm_ext_skb_data *skb_data;
+ unsigned char *hdr,*pdu;
+ unsigned short crc;
+ static unsigned long tag = 0x0L;
+ const unsigned char lb_id[] = {
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF};
+ const unsigned char src_id[] = {
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A,
+ 0x6A,0x6A,0x6A,0x6A};
+
+ DBG(ATM_D,"vpi=%d,vci=%d\n",vpi,vci);
+
+ if (drv->adsl_status != ADSL_STATUS_ATMREADY) {
+ DBG(ATM_D,"ATM not ready,adsl_status=%d\n",drv->adsl_status);
+ return -EIO;
+ }
+
+ skb = dev_alloc_skb(ATM_CELL_SIZE);
+ if (!skb) {
+ return -ENOMEM;
+ }
+ skb->dev = drv->dev;
+
+ hdr = skb->data;
+
+ // fill vpi
+ hdr[0] = vpi >> 4;
+ hdr[1] = (vpi & 0x0F) << 4;
+
+ // fill vci
+ hdr[1] |= (vci >> 12);
+ hdr[2] = (vci >> 4) & 0xFF;
+ if (type == ATM_OAM_F4) {
+ hdr[3] = 0x00; // OAM F4
+ } else {
+ hdr[3] = 0x0A; // OAM F5
+ }
+ hdr[3] |= ((vci & 0x0F) << 4);
+ // update the HEC
+ hdr[4] = hecCompute(hdr);
+
+ pdu = hdr+5;
+ // loopback function
+ pdu[0] = 0x18;
+ pdu[1] = 0x01;
+
+ // fill the correlation tag
+ pdu[2] = (unsigned char)(tag >> 24);
+ pdu[3] = (unsigned char)(tag >> 16);
+ pdu[4] = (unsigned char)(tag >> 8);
+ pdu[5] = (unsigned char)tag;
+ tag++;
+
+ // fill the loopback id
+ memcpy(pdu+6,lb_id,16);
+
+ // fill the Src Id
+ memcpy(pdu+22,src_id,16);
+
+ // fill the unused bytes
+ memcpy(pdu+38,src_id,8);
+
+ // calculate CRC
+ pdu[ATM_CELL_PAYLOAD-2]=pdu[ATM_CELL_PAYLOAD-1]=0;
+ crc = crc10(0,pdu,ATM_CELL_PAYLOAD);
+ pdu[ATM_CELL_PAYLOAD-2] = (unsigned char)(crc >> 8);
+ pdu[ATM_CELL_PAYLOAD-1] = (unsigned char)(crc);
+
+ ++drv->oam_stats.tx_LB;
+
+ skb_put(skb,ATM_CELL_SIZE);
+
+ // AAL0
+ skb_data = ATM_EXT_SKB(skb);
+ skb_data->aal = ATM_AAL0;
+ skb_data->tx.aal0.pdu_length = skb->len;
+
+ // put skb on transmit queue
+ skb_queue_tail(&drv->tx_q, skb);
+ return 0;
+}
+
+static int net_control(struct unicorn_ethdrv *drv,T_MswCtrl *ctrl)
+{
+ int err;
+
+ switch (ctrl->code) {
+ case NET_CTL_SET_VPI_VCI:
+ {
+ T_atm_channel *vpi_vci=ctrl->buffer;
+ drv->vpi = vpi_vci->vpi;
+ drv->vci = vpi_vci->vci;
+ ctrl->retcode = err = 0;
+ ctrl->length = 0;
+ }
+ break;
+ case NET_CTL_GET_VPI_VCI:
+ {
+ T_atm_channel *vpi_vci=ctrl->buffer;
+ vpi_vci->type = ATM_AAL5;
+ vpi_vci->vpi = drv->vpi;
+ vpi_vci->vci = drv->vci;
+ ctrl->length = sizeof(T_atm_channel);
+ ctrl->retcode = err = 0;
+ }
+ break;
+ case NET_CTL_TX_OAM_CELL:
+ {
+ T_atm_channel *tx_oam = ctrl->buffer;
+ err = oam_send(drv,tx_oam->type,tx_oam->vpi,tx_oam->vci);
+ ctrl->retcode = err;
+ ctrl->length = 0;
+ }
+ break;
+ case NET_CTL_GET_OAM_STATS:
+ {
+ memcpy(ctrl->buffer,&drv->oam_stats,sizeof(T_oam_stats));
+ ctrl->length = sizeof(T_oam_stats);
+ ctrl->retcode = err = 0;
+ }
+ break;
+ case NET_CTL_RESET_OAM_STATS:
+ {
+ memset(&drv->oam_stats,0,sizeof(T_oam_stats));
+ ctrl->retcode = err = 0;
+ ctrl->length = 0;
+
+ }
+ break;
+ default:
+ err = -ENOTTY;
+ break;
+ }
+ return err;
+}
+
+static int unicorn_eth_ioctl(struct net_device *eth_dev, struct ifreq *rq, int cmd)
+{
+ struct unicorn_ethdrv *drv = (struct unicorn_ethdrv *)eth_dev->priv;
+ T_MswCtrl ctrl;
+ void *user_buffer;
+ int err = -ENOTTY;
+
+ DBG(DATA_D,"if %s,cmd=%x\n",rq->ifr_name,cmd);
+
+ if (!drv->ep) return -ENXIO;
+
+ switch (cmd) {
+ case ETH_MSW_CTL:
+ err = copy_from_user(&ctrl,rq->ifr_data,sizeof(T_MswCtrl));
+ // if a buffer is provided, copy it to kernel space
+ if ((ctrl.length) && (ctrl.buffer)) {
+ user_buffer = ctrl.buffer;
+ ctrl.buffer = kmalloc(ctrl.length,GFP_KERNEL);
+ if (!ctrl.buffer) return -ENOMEM;
+ err = copy_from_user(ctrl.buffer,user_buffer,ctrl.length);
+ } else {
+ user_buffer = NULL;
+ }
+
+ // do the ioctl...
+ if (ctrl.code < 32) {
+ ASSERT(drv->ep->msw_control != NULL);
+ err = drv->ep->msw_control(drv->ep->dev,&ctrl);
+ } else if (ctrl.code < 64) {
+ err = net_control(drv,&ctrl);
+ } else {
+ }
+ if ((ctrl.length) && (ctrl.buffer)) {
+ err = copy_to_user(user_buffer,ctrl.buffer,ctrl.length);
+ kfree(ctrl.buffer);
+ ctrl.buffer = user_buffer;
+ }
+ break;
+ }
+ return err;
+}
+
+static int
+unicorn_eth_change_mtu(struct net_device *eth_dev, int new_mtu)
+{
+ DBG(ATM_D,"MTU=%d\n",new_mtu);
+ eth_dev->mtu = new_mtu;
+ return 0;
+}
+
+static void
+unicorn_eth_set_multicast(struct net_device *eth_dev)
+{
+}
+
+static void
+unicorn_eth_tx_timeout(struct net_device *eth_dev)
+{
+ WARN("\n");
+}
+
+MODULE_PARM(if_name,"s");
+MODULE_PARM(mac_address, "s");
+MODULE_PARM(VPI, "i");
+MODULE_PARM(VCI, "i");
+MODULE_PARM(PROTOCOL, "s");
+MODULE_PARM(ENCAPS, "s");
+#if DEBUG
+#ifdef ETH_DRIVER
+MODULE_PARM(DebugLevel, "i");
+#endif
+#endif
+
+int unicorn_eth_init(void)
+{
+ struct net_device *eth_dev;
+ struct unicorn_ethdrv *drv;
+
+ INFO("v %d.%d.%d, " __TIME__ " " __DATE__"\n",
+ (VERS>>8)&0xf,(VERS>>4)&0xf,VERS&0xf);
+ INFO("PROTOCOL=%s,VPI=%d,VCI=%d,ENCAPS=%s\n",
+ PROTOCOL ? PROTOCOL : "",VPI,VCI,ENCAPS ? ENCAPS : "");
+
+ if (unicorn_ethdrv) {
+ WARN("driver already opened\n");
+ return -ENXIO;
+ }
+
+ eth_dev = alloc_etherdev(sizeof(struct unicorn_ethdrv));
+ if (!eth_dev || !eth_dev->priv) {
+ WARN("no memory for drv data\n");
+ return -ENOMEM;
+ }
+ unicorn_ethdrv = drv = eth_dev->priv;
+ memset(drv, 0, sizeof(struct unicorn_ethdrv));
+ SET_MODULE_OWNER(eth_dev);
+ drv->dev = eth_dev;
+ drv->adsl_status = ADSL_STATUS_NOHARDWARE;
+ drv->vpi = VPI;
+ drv->vci = VCI;
+
+ drv->protocol = RFC2684_BRIDGED;
+ drv->encaps = LLC;
+ if (PROTOCOL) {
+ if (strcmp(PROTOCOL,"pppoatm")==0) {
+ drv->protocol = RFC2364;
+ drv->encaps = VCMUX;
+ } else if (strcmp(PROTOCOL,"pppoe")==0) {
+ drv->protocol = RFC2684_BRIDGED;
+ drv->encaps = LLC;
+ } else if (strcmp(PROTOCOL,"br2684")==0) {
+ drv->protocol = RFC2684_BRIDGED;
+ drv->encaps = LLC;
+ } else if (strcmp(PROTOCOL,"ipoatm")==0) {
+ drv->protocol = RFC2684_ROUTED;
+ drv->encaps = VCMUX;
+ } else {
+ }
+ }
+ if (ENCAPS) {
+ if ((strcmp(ENCAPS,"vc-encaps")==0) ||
+ (strcmp(ENCAPS,"null")==0)) {
+ drv->encaps = VCMUX;
+ } else if (strcmp(ENCAPS,"llc-encaps")==0) {
+ drv->encaps = LLC;
+ }
+ }
+ DBG(ATM_D,"protocol=%d,encaps=%d\n",drv->protocol,drv->encaps);
+
+ if (drv->protocol == RFC2364) {
+ eth_dev->mtu = ETH_DATA_LEN+8;
+ } else {
+ eth_dev->mtu = ETH_DATA_LEN;
+ }
+
+ if (if_name) {
+ strncpy (eth_dev->name,if_name,IFNAMSIZ);
+ } else {
+ strncpy (eth_dev->name,UNICORN_ETH_NAME,IFNAMSIZ);
+ }
+ // set MAC address,
+ unicorn_set_mac(eth_dev,mac_address);
+
+ eth_dev->open = unicorn_eth_open;
+ eth_dev->stop = unicorn_eth_close;
+ eth_dev->do_ioctl = unicorn_eth_ioctl;
+ eth_dev->change_mtu = unicorn_eth_change_mtu;
+ eth_dev->hard_start_xmit = unicorn_eth_send;
+ eth_dev->get_stats = unicorn_eth_stats;
+ eth_dev->set_multicast_list = unicorn_eth_set_multicast;
+ eth_dev->tx_timeout = unicorn_eth_tx_timeout;
+ eth_dev->watchdog_timeo = HZ*5;
+
+ return 0;
+}
+
+void unicorn_eth_cleanup(void)
+{
+ struct unicorn_ethdrv *drv = unicorn_ethdrv;
+
+ DBG(ATM_D,"\n");
+
+ if (drv) {
+ if (drv->dev) {
+ kfree(drv->dev);
+ }
+ unicorn_ethdrv = NULL;
+ }
+}
+
+#ifdef ETH_DRIVER
+module_init(unicorn_eth_init);
+module_exit(unicorn_eth_cleanup);
+#endif
+
+extern int unicorn_attach(struct unicorn_entrypoints *entrypoints)
+{
+ int status;
+ struct unicorn_ethdrv *drv = unicorn_ethdrv;
+
+ DBG(ATM_D,"entrypoints=%p\n",entrypoints);
+
+ if (!unicorn_ethdrv) {
+#ifdef ETH_DRIVER
+ return -ENXIO;
+#else
+ status = unicorn_eth_init();
+ if (status) {
+ return status;
+ }
+#endif
+ }
+ drv = unicorn_ethdrv;
+
+ ASSERT(entrypoints->dev != NULL);
+ ASSERT(entrypoints->snd_getcell != NULL);
+ ASSERT(entrypoints->rcv_getcell != NULL);
+ ASSERT(entrypoints->start_transmit != NULL);
+ ASSERT(entrypoints->get_adsl_status != NULL);
+ ASSERT(entrypoints->get_adsl_linkspeed != NULL);
+ drv->ep = entrypoints;
+
+ if (register_netdev(drv->dev)) {
+ WARN("register_netdev failed\n");
+ return -ENXIO;
+ }
+ DBG(ATM_D,"Ethernet interface %s registered,MTU=%d\n",
+ drv->dev->name,drv->dev->mtu);
+ return 0;
+}
+
+extern int unicorn_detach(void)
+{
+ struct unicorn_ethdrv *drv = unicorn_ethdrv;
+
+ DBG(ATM_D,"\n");
+
+ if (!drv) {
+ return -ENXIO;
+ }
+ DBG(ATM_D,"Unregister Ethernet interface %s\n",drv->dev->name);
+ unregister_netdev(drv->dev);
+ drv->adsl_status = ADSL_STATUS_NOHARDWARE;
+ drv->ep = NULL;
+#ifdef ETH_DRIVER
+#else
+ unicorn_eth_cleanup();
+#endif
+ return 0;
+}
+
+extern int unicorn_timer(void)
+{
+ return 0;
+}
Added: dists/trunk/modules/unicorn/unicorn/unicorn_pci/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_pci/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,112 @@
+#
+## Makefile for UNICORN PCI ADSL Modem
+#
+
+src ?= .
+obj ?= .
+
+ifndef KERNEL_SOURCES
+KERNEL_SOURCES=/usr/src/linux
+endif
+ifndef HPATH
+HPATH=$(KERNEL_SOURCES)/include
+endif
+
+ifndef VERS
+VERS=0
+endif
+
+ifndef KVERS
+KVERS = `uname -r`
+endif
+
+ifndef PATCHLEVEL
+PATCHLEVEL=$(shell grep -s PATCHLEVEL ${KERNEL_SOURCES}/Makefile | head -n 1 | sed s/'PATCHLEVEL = '//)
+endif
+
+ifndef MODDIR
+MODDIR=$(PWD)
+endif
+
+include $(KERNEL_SOURCES)/.config
+
+#
+# -DUSE_HW_TIMER - set this to use 2ms PCI hardware timer
+# -DPCI_BRIDGE_WORKAROUND - set this to work with low performance PCI bridges
+# -DKT400 - set this if you have a MSI KT4 motherboard or similar
+COPTIONS =
+
+# make parameters
+CC=gcc
+LD=ld
+
+INCLUDES := -I$(src)/../include -I$(src)/../
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, add path to kernel includes
+INCLUDES += -I$(HPATH)
+endif
+EXTRA_CFLAGS := -DVERS=$(VERS) -D_PCI_DRIVER -DDEBUG=1 $(INCLUDES) $(COPTIONS)
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, need to specify CFLAGS
+CFLAGS := -O2 -fomit-frame-pointer -Wall -Wno-trigraphs -fno-strict-aliasing -fno-common
+EXTRA_CFLAGS += -D__KERNEL__ -DMODULE
+CFLAGS += $(EXTRA_CFLAGS)
+endif
+CXXFLAGS = -fno-rtti -fno-exceptions $(CFLAGS) $(EXTRA_CFLAGS)
+
+OBJS = unicorn_pcidrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_pci.o
+OBJS_ATM = ../unicorn_atm/unicorn_atmdrv.o
+OBJS_ETH = ../unicorn_eth/unicorn_ethdrv.o
+ifdef CONFIG_REGPARM
+MODEM_LIB = $(src)/../arch/i386/modem_ant_PCI_LINUX.o.regparm3
+else
+MODEM_LIB = $(src)/../arch/i386/modem_ant_PCI_LINUX.o
+endif
+LIBM = $(src)/../libm/libm.a
+
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, use old build process
+modules: unicorn_pci_atm.o unicorn_pci_eth.o
+modules_install: install_atm install_eth
+else
+# kernel 2.6, use kernel build process
+modules:
+ make CC=$(CC) -C $(KERNEL_SOURCES) SUBDIRS=$(MODDIR) modules
+modules_install:
+ make CC=$(CC) -C $(KERNEL_SOURCES) SUBDIRS=$(MODDIR) modules_install
+endif
+
+obj-m := unicorn_pci_atm.o unicorn_pci_eth.o
+
+unicorn_pci_atm-objs := $(OBJS) $(OBJS_ATM)
+
+unicorn_pci_eth-objs := $(OBJS) $(OBJS_ETH)
+
+EXTRA_LDFLAGS := $(MODEM_LIB) $(LIBM)
+
+unicorn_pci_atm.o: $(unicorn_pci_atm-objs)
+ $(LD) -r $(EXTRA_LDFLAGS) -o $@ $(unicorn_pci_atm-objs)
+
+unicorn_pci_eth.o: $(unicorn_pci_eth-objs)
+ $(LD) -r $(EXTRA_LDFLAGS) -o $@ $(unicorn_pci_eth-objs)
+
+install_atm: unicorn_pci_atm.o
+# remove old versions
+ /bin/rm -f $(DESTDIR)/lib/modules/$(KVERS)/kernel/drivers/atm/unicorn_*.o
+
+ mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/extra
+ cp $^ $(DESTDIR)/lib/modules/$(KVERS)/extra/
+
+install_eth: unicorn_pci_eth.o
+# remove old versions
+ /bin/rm -f $(DESTDIR)/lib/modules/$(KVERS)/kernel/drivers/atm/unicorn_*.o
+
+ mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/extra
+ cp $^ $(DESTDIR)/lib/modules/$(KVERS)/extra/
+
+clean:
+ /bin/rm -f $(unicorn_pci_atm-objs)
+ /bin/rm -f $(unicorn_pci_eth-objs)
+ /bin/rm -f unicorn_pci_atm.* unicorn_pci_eth.*
+ /bin/rm -f .*.cmd
+ /bin/rm -rf .tmp_versions
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/unicorn_pci/unicorn_pcidrv.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_pci/unicorn_pcidrv.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,2339 @@
+/*
+ This driver supports the Unicorn ADSL chipset from STMicroelectronics.
+ The chipset consists of the ADSL DMT transceiver ST70137 and either the
+ ST70134A, ST70136 or ST20174 Analog Front End (AFE).
+ This file contains the PCI specific routines.
+*/
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/interrupt.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <asm/byteorder.h>
+#include "types.h"
+#include "hal.h"
+#include "hard.h"
+#include "rapi.h"
+#include "amu/amas.h"
+#include "unicorn.h"
+#include "debug.h"
+
+#ifndef VERS
+#define VERS 0
+#endif
+
+MODULE_AUTHOR ("fisaksen at bewan.com");
+MODULE_DESCRIPTION ("Driver for the ST UNICORN PCI ADSL modem chip.");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("Proprietary");
+#endif
+
+
+#define PCI_VENDOR_ID_ST 0x104a
+#define PCI_DEVICE_ID_UNICORN 0x0500
+
+#define ATM_CELL_SIZE 53
+//----------------------------------------------------------------------
+// Macros to read/write the little endian PCI bus
+//----------------------------------------------------------------------
+static inline void PCI_PUT_DWORD(DWORD value,volatile void *base,int reg)
+{
+ writel(value,(PBYTE)base + reg);
+}
+
+static inline DWORD PCI_GET_DWORD(volatile void *base,int reg)
+{
+ return readl((PBYTE)base + reg);
+}
+
+#ifdef BIG_ENDIAN
+static inline void PCI_SWAP_BUF(DWORD *buf,DWORD size)
+{
+ int i;
+ for (i=0; i < size; i++)
+ swab32(buf[i]);
+}
+#else
+#define PCI_SWAP_BUF(buf,size)
+#endif
+
+//----------------------------------------------------------------------
+// Delay in microseconds
+//----------------------------------------------------------------------
+#define DELAY(us) mdelay(us)
+
+//----------------------------------------------------------------------
+// driver parameters
+//----------------------------------------------------------------------
+#if DEBUG
+unsigned long DebugLevel=0;
+#endif
+
+//----------------------------------------------------------------------
+// MSW paramters
+//----------------------------------------------------------------------
+//unsigned long ActivationMode = MSW_MODE_MULTI;
+unsigned long ActivationMode = MSW_MODE_ANSI;
+
+//extern unsigned long ActivationTaskTimeout;
+extern unsigned long ActTimeout;
+extern unsigned long DownstreamRate;
+unsigned long DownstreamRate=8192; // In Kbits/sec
+extern unsigned long ExchangeDelay;
+extern unsigned long FmPollingRate;
+extern unsigned long g_RefGain;
+extern unsigned short g_TeqMode;
+extern unsigned long InitTimeout;
+extern unsigned long Interoperability;
+extern unsigned long LCD_Trig;
+extern unsigned long LOS_LOF_Trig;
+extern unsigned long RetryTime;
+extern unsigned long TrainingDelay;
+//extern unsigned long TruncateMode;
+extern unsigned long useRFC019v;
+extern unsigned long useRFC029v;
+//extern unsigned long useRFC033v;
+extern unsigned long useRFC040v;
+extern unsigned long useRFC041v;
+extern unsigned long useRFCFixedRate;
+extern unsigned long useVCXO;
+extern unsigned long _no_TS652;
+
+extern unsigned long eocTrace;
+extern unsigned long useAOCChannel;
+extern unsigned long setINITIALDAC;
+extern unsigned long useAFE;
+extern unsigned long pilotRealloc;
+extern unsigned long _newCToneDetection_;
+
+extern unsigned long pilotRootPowerWorkAround;
+extern unsigned long _gi_step_;
+extern unsigned long _teq_new_delay_;
+extern unsigned long TNumberOfCarrier;
+extern unsigned long highCarrierOff;
+extern unsigned long decreaseHighCarrier;
+extern unsigned long _boostPowerGdmt_;
+extern unsigned long g_ModemState;
+extern unsigned long _trellisact_;
+extern unsigned long pvo_pembdpllpolarity;
+
+unsigned long AutoActivation=1;
+unsigned long LoopbackMode=0;
+unsigned long MswDebugLevel=2;
+unsigned long last_report = 0L;
+AMSW_ModemFailure last_failure = C_AMSW_NO_HARDWARE;
+AMSW_ModemEvent last_event = (AMSW_ModemEvent)-1L;
+DWORD adsl_system_time = 0L;
+ADSL_STATUS adsl_status = ADSL_STATUS_NOHARDWARE;
+unsigned short adsl_us_cellrate = 0;
+unsigned short adsl_ds_cellrate = 0;
+unsigned long GlobalRemove=0;
+
+extern unsigned long timer_int_counter;
+unsigned long timer_int_counter=0;
+
+//----------------------------------------------------------------------
+// Exported functions
+//----------------------------------------------------------------------
+unsigned char *unicorn_snd_getcell(struct unicorn_dev *dev);
+int unicorn_start_transmit(struct unicorn_dev *dev);
+unsigned char *unicorn_rcv_getcell(struct unicorn_dev *dev);
+int unicorn_msw_control(struct unicorn_dev *dev,T_MswCtrl *ctrl);
+ADSL_STATUS unicorn_get_adsl_status(struct unicorn_dev *dev);
+int unicorn_get_adsl_linkspeed(struct unicorn_dev *dev,
+ unsigned long *us_rate,unsigned long *ds_rate);
+
+
+//----------------------------------------------------------------------
+// R/W objects
+//----------------------------------------------------------------------
+#define ATM_READS 4 // ATM downstream DMA buffers
+#define ATM_WRITES 2 // ATM upstream DMA buffers
+#define CELL_LENGTH PCI_CELL_LENGTH
+
+struct send_atm {
+ unsigned long turn_write; // Current Write buffer
+ unsigned long turn_send; // Current sending buffer
+ unsigned char *bufs[ATM_WRITES];
+ unsigned long lens[ATM_WRITES];
+ unsigned long busy[ATM_WRITES];
+ unsigned long maxlen;
+ unsigned long bufofs;
+ unsigned long send_pending;
+ BOOLEAN started;
+ unsigned long long cell_count;
+ spinlock_t lock;
+};
+
+struct recv_atm {
+ unsigned long turn_read;
+ unsigned char *bufs[ATM_READS];
+ unsigned long maxlen;
+ BOOLEAN started;
+ int turn_recv;
+ unsigned long bufofs;
+ unsigned long long cell_count;
+ spinlock_t lock;
+};
+
+//#define OBC_LOCK(sem) down(sem)
+#define OBC_LOCK(sem) \
+if (down_trylock(sem)) { \
+ DBG(PCI_D,"down_trylock failed\n"); \
+ down(sem); \
+}
+#define OBC_UNLOCK(sem) up(sem)
+
+struct unicorn_dev {
+ struct pci_dev *pci_dev;
+ volatile DWORD *mem; // Memory Range of the PCI Card
+ DWORD mem_size; // size of PCI memory
+ void *dma_buffer; // DMA Kernel Buffer
+ struct send_atm send_atm; // US ATM object for transmission
+ struct recv_atm recv_atm; // DS ATM object for transmission
+ WORD isr_enable_mask; // Enable bits in the ISR register
+ WORD lacfw; // copy of LACFW register
+ DWORD isdr_enable_mask; // Enable bits in the ISDR register
+ DWORD pcfw; // copy of PCFW register
+ unsigned int dma_phys_addr; // DMA buffer physical address
+ volatile PBYTE dma_virtual_addr; // DMA buffer virtual address
+
+ unsigned long obc_pending; // OBC command pending
+ struct semaphore obc_lock; // To protect access to OBC
+ DWORD obc_sem; // To wait for OBC command completed
+
+ BOOLEAN started; // Device is started
+ BOOLEAN stopping; // Device is being stopped
+ BOOLEAN msw_started; // True if the MSW is (manually) started
+};
+struct unicorn_dev unicorn_pci_dev;
+
+struct unicorn_entrypoints unicorn_pci_entrypoints = {
+ &unicorn_pci_dev,
+ unicorn_snd_getcell,
+ unicorn_rcv_getcell,
+ unicorn_start_transmit,
+ unicorn_msw_control,
+ unicorn_get_adsl_status,
+ unicorn_get_adsl_linkspeed
+};
+
+//----------------------------------------------------------------------
+// Start the ATM upstream DMA
+//----------------------------------------------------------------------
+void StartAtmUsXfer(struct unicorn_dev *dev,unsigned long turn,unsigned char *buffer,unsigned long length)
+{
+ DWORD ptr;
+ DWORD size;
+
+ ptr = dev->dma_phys_addr+offsetof(DMA_MEMORY,AtmUsBuf);
+ ptr += turn*PCI_US_BUF_SIZE*sizeof(DWORD);
+ size = length/sizeof(DWORD);
+
+ DBG(RW_D,"turn=%ld,ptr=%lx\n",turn,ptr);
+
+ if (turn & 1) {
+ PCI_PUT_DWORD(ptr,dev->mem,PR_US_PTR_2);
+ PCI_PUT_DWORD(size,dev->mem,PR_US_SIZE_2);
+ PCI_PUT_DWORD(LACFW_EDMA_US2,dev->mem,PR_LACFW_SET);
+ } else {
+ PCI_PUT_DWORD(ptr,dev->mem,PR_US_PTR_1);
+ PCI_PUT_DWORD(size,dev->mem,PR_US_SIZE_1);
+ PCI_PUT_DWORD(LACFW_EDMA_US1,dev->mem,PR_LACFW_SET);
+ }
+}
+
+//----------------------------------------------------------------------
+// Start the ATM downstream DMA
+//----------------------------------------------------------------------
+void StartAtmDsXfer(struct unicorn_dev *dev,unsigned long turn)
+{
+ DWORD ptr;
+
+ if (dev->stopping) return;
+ ptr = dev->dma_phys_addr+offsetof(DMA_MEMORY,AtmDsBuf);
+ ptr += turn*PCI_DS_BUF_SIZE*sizeof(DWORD);
+
+ DBG(RW_D,"turn=%ld,ptr=%lx\n",turn,ptr);
+
+ if (turn & 1) {
+ PCI_PUT_DWORD(ptr,dev->mem,PR_DS_PTR_2);
+ PCI_PUT_DWORD(LACFW_EDMA_DS2,dev->mem,PR_LACFW_SET);
+ } else {
+ PCI_PUT_DWORD(ptr,dev->mem,PR_DS_PTR_1);
+ PCI_PUT_DWORD(LACFW_EDMA_DS1,dev->mem,PR_LACFW_SET);
+ }
+}
+
+//----------------------------------------------------------------------
+// send_atm_init:
+//----------------------------------------------------------------------
+static void send_atm_init(struct unicorn_dev *dev,
+ unsigned char *buffer,unsigned long size)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int i;
+
+ DBG(RW_D,"buffer=%p,size=%ld\n",buffer,size);
+
+ send_atm->maxlen = size;
+ send_atm->bufofs = 0;
+ send_atm->turn_write = 0;
+ send_atm->turn_send = 0;
+ for (i=0; i <ATM_WRITES; i++) {
+ send_atm->bufs[i] = buffer+i*size;
+ send_atm->lens[i] = 0;
+ send_atm->busy[i] = 0;
+ }
+ send_atm->send_pending = 0;
+ send_atm->started = FALSE;
+ send_atm->cell_count = 0;
+ send_atm->lock = SPIN_LOCK_UNLOCKED;
+}
+
+//----------------------------------------------------------------------
+// send_atm_exit:
+//----------------------------------------------------------------------
+static void send_atm_exit(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ send_atm->started = FALSE;
+}
+
+//----------------------------------------------------------------------
+// recv_atm_init
+//----------------------------------------------------------------------
+static void recv_atm_init(struct unicorn_dev *dev,
+ unsigned char *buffer,unsigned long size)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int i;
+
+ DBG(RW_D,"buffer=%p,size=%ld\n",buffer,size);
+
+ recv_atm->maxlen = size;
+ recv_atm->turn_read = 0;
+ recv_atm->cell_count = 0;
+
+ recv_atm->started = FALSE;
+ recv_atm->turn_recv = 0;
+ recv_atm->bufofs = 0;
+
+ for (i=0; i<ATM_READS; i++) {
+ recv_atm->bufs[i] = buffer+i*size;
+ memset(recv_atm->bufs[i],0,size);
+ }
+ recv_atm->lock = SPIN_LOCK_UNLOCKED;
+}
+
+//----------------------------------------------------------------------
+// recv_atm_exit:
+//----------------------------------------------------------------------
+static void recv_atm_exit(struct unicorn_dev *dev)
+{
+}
+
+//----------------------------------------------------------------------
+// atm_send_complete:
+//----------------------------------------------------------------------
+static void atm_send_complete(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+ unsigned long flags;
+
+ DBG(RW_D,"\n");
+
+ spin_lock_irqsave(&send_atm->lock, flags);
+ send_atm->send_pending--;
+ t = send_atm->turn_send;
+ if (test_and_clear_bit(0,&send_atm->busy[t])) {
+ send_atm->lens[t] = 0;
+ t = (t+1)&(ATM_WRITES-1);
+ send_atm->turn_send = t;
+ }
+ spin_unlock_irqrestore(&send_atm->lock, flags);
+}
+
+//----------------------------------------------------------------------
+// clear_buffer
+//----------------------------------------------------------------------
+static void clear_buffer(struct recv_atm *recv_atm,int i)
+{
+ unsigned long n;
+ PDWORD p = (PDWORD)recv_atm->bufs[i];
+ for (n=PCI_CELL_LENGTH-4; n<recv_atm->maxlen; n+=PCI_CELL_LENGTH)
+ {
+ p[n/sizeof(DWORD)] = 0;
+ }
+}
+
+//----------------------------------------------------------------------
+// atm_start_rcv
+//----------------------------------------------------------------------
+static void atm_start_rcv(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int i;
+
+ if (recv_atm->started) return;
+
+ recv_atm->started = TRUE;
+ recv_atm->turn_recv = 0;
+ recv_atm->turn_read = 0;
+ recv_atm->bufofs = 0;
+
+ for (i=0; i<ATM_READS; i++) {
+ clear_buffer(recv_atm,i);
+ }
+
+ StartAtmDsXfer(dev,recv_atm->turn_recv++);
+ StartAtmDsXfer(dev,recv_atm->turn_recv);
+}
+
+//----------------------------------------------------------------------
+// atm_start_snd
+//----------------------------------------------------------------------
+static void atm_start_snd(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+
+ send_atm->started = TRUE;
+}
+
+//----------------------------------------------------------------------
+// atm_recv_complete
+//----------------------------------------------------------------------
+static void atm_recv_complete(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ PDWORD pf;
+ unsigned long flags;
+
+ DBG(RW_D,"\n");
+
+ spin_lock_irqsave(&recv_atm->lock, flags);
+
+ // point to the next DMA buffer
+ recv_atm->turn_recv = (recv_atm->turn_recv+1)&(ATM_READS-1);
+
+ // If the last cell of the buffer is not cleared
+ // increment the read pointer before starting the DMA
+ // We loose the contents of the buffer
+ pf = (PDWORD)(recv_atm->bufs[recv_atm->turn_recv]+PCI_DS_BUF_SIZE-4);
+ if (*pf) {
+ WARN("ERROR: ATM DownStream buffer overflow\n");
+ clear_buffer(recv_atm,recv_atm->turn_recv);
+ recv_atm->turn_read = (recv_atm->turn_recv+1)&(ATM_READS-1);
+ recv_atm->bufofs = 0;
+ }
+ spin_unlock_irqrestore(&recv_atm->lock, flags);
+
+ // Start the DMA
+ StartAtmDsXfer(dev,recv_atm->turn_recv);
+}
+
+
+//======================================================================
+// REPORTS ADSL status from the MSW
+//======================================================================
+
+//----------------------------------------------------------------------
+// Modem Software Event Report for user-mode application
+//----------------------------------------------------------------------
+static const char *get_msw_event_string(AMSW_ModemEvent event)
+{
+ static char s[8];
+
+ switch(event) {
+ case C_AMSW_PEER_ATU_FOUND: return "PEER ATU FOUND";
+ case C_AMSW_RESTART_REQUEST: return "RESTART REQUES";
+ case C_AMSW_ACTIVATION_REQUEST: return "ACTIVATION REQUEST";
+ case C_AMSW_TO_INITIALIZING: return "TO INITIALIZING";
+ case C_AMSW_SHOWTIME: return "AMSW SHOWTIME";
+ case C_AMSW_L3_EXECUTED: return "L3 EXECUTED";
+ case C_AMSW_L3_REJECTED: return "L3 REJECTED";
+ case C_AMSW_L1_EXECUTED: return "L1 REJECTED";
+ case C_AMSW_L1_REJECTED: return "L1 REJECTED";
+ case C_AMSW_L0_REJECTED: return "L0 REJECTED";
+ case C_AMSW_RESTART_ACCEPTABLE: return "RESTART ACCEPTABLE";
+ case C_AMSW_SUICIDE_REQUEST: return "SUICIDE REQUEST";
+ case C_AMSW_RESTART_NOT_ACCEPTABLE: return "RESTART NOT ACCEPTABLE";
+ }
+ sprintf(s,"(%d)",event);
+ return s;
+}
+
+static const char *get_msw_failure_string(AMSW_ModemFailure failure)
+{
+ static char s[8];
+
+ switch(failure) {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS: return "UNCOMPATIBLE LINECONDITION";
+ case C_AMSW_NO_LOCK_POSSIBLE: return "NO LOCK POSSIBLE";
+ case C_AMSW_PROTOCOL_ERROR: return "PROTOCOL ERROR";
+ case C_AMSW_MESSAGE_ERROR: return "MESSAGE ERROR";
+ case C_AMSW_SPURIOUS_ATU_DETECTED: return "SPURIOUS ATU DETECTED";
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE: return "DS REQ BITRATE TOO HIGH FOR LITE";
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE: return "INTERLEAVED PROFILE REQUIRED FOR LITE";
+ case C_AMSW_FORCED_SILENCE: return "FORCED SILENCE";
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE: return "UNSELECTABLE OPERATION MODE";
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN: return "STATE REFUSED BY GOLDEN";
+ }
+ sprintf(s,"(%d)",failure);
+ return s;
+}
+
+static const char *get_msw_state_string(AMSW_ModemState state)
+{
+ static char s[8];
+
+ switch(state) {
+ case C_AMSW_IDLE: return "IDLE";
+ case C_AMSW_L3: return "L3";
+ case C_AMSW_LISTENING: return "LISTENING";
+ case C_AMSW_ACTIVATING: return "ACTIVATING";
+ case C_AMSW_Ghs_HANDSHAKING: return "Ghs HANDSHAKING";
+ case C_AMSW_ANSI_HANDSHAKING: return "ANSI HANDSHAKING";
+ case C_AMSW_INITIALIZING: return "INITIALIZING";
+ case C_AMSW_RESTARTING: return "RESTARTING";
+ case C_AMSW_FAST_RETRAIN: return "FAST RETRAIN";
+ case C_AMSW_SHOWTIME_L0: return "SHOWTIME L0";
+ case C_AMSW_SHOWTIME_LQ: return "SHOWTIME LQ";
+ case C_AMSW_SHOWTIME_L1: return "SHOWTIME L1";
+ case C_AMSW_EXCHANGE: return "EXCHANGE";
+ case C_AMSW_TRUNCATE: return "TRUNCATE";
+ case C_AMSW_ESCAPE: return "ESCAPE";
+ case C_AMSW_DISORDERLY: return "DISORDERLY";
+ case C_AMSW_RETRY: return "RETRY";
+ }
+ sprintf(s,"(%d)",state);
+ return s;
+}
+
+void msw_report_event(DWORD type,DWORD code)
+{
+ DBG(RAPI_D,"type=%ld,code=%ld\n",type,code);
+
+ last_report = (type << 16) | code;
+ switch (type) {
+ case MSW_EVENT_NONE:
+ break;
+ case MSW_EVENT_REPORT:
+ INFO("MSW event: %s\n",get_msw_event_string(code));
+ last_event = code;
+ break;
+ case MSW_EVENT_FAILURE:
+ INFO("MSW failure: %s\n",get_msw_failure_string(code));
+ last_failure = code;
+ break;
+ case MSW_EVENT_STATE:
+ INFO("MSW state: %s\n",get_msw_state_string(code));
+ break;
+ case MSW_EVENT_CANCEL:
+ break;
+ case AMU_EVENT_ACT_TIMEOUT:
+ INFO("AMU_EVENT_ACT_TIMEOUT\n");
+ last_failure = C_AMSW_AMU_EVENT_ACT_TIMEOUT;
+ break;
+ case AMU_EVENT_INI_TIMEOUT:
+ INFO("AMU_EVENT_INI_TIMEOUT\n");
+ last_failure = C_AMSW_AMU_EVENT_INI_TIMEOUT;
+ break;
+ case AMU_EVENT_SHUTDOWN:
+ INFO("AMU_EVENT_SHUTDOWN\n");
+ last_failure = C_AMSW_AMU_EVENT_SHUTDOWN;
+ break;
+ case AMU_EVENT_RETRY:
+ INFO("AMU_EVENT_RETRY\n");
+ last_failure = C_AMSW_EVENT_RETRY;
+ break;
+ }
+}
+
+//----------------------------------------------------------------------
+// Set the showtime FLAG
+//----------------------------------------------------------------------
+void setShowtime(void)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+
+ INFO("AdslStatus=%d\n",adsl_status);
+
+ switch(adsl_status)
+ {
+ case ADSL_STATUS_NOHARDWARE:
+ case ADSL_STATUS_ATMREADY:
+ break;
+ case ADSL_STATUS_NOLINK:
+ adsl_system_time = xtm_gettime();
+ adsl_status = ADSL_STATUS_ATMREADY;
+ dev->recv_atm.cell_count = 0;
+ dev->send_atm.cell_count = 0;
+ atm_start_snd(dev);
+ atm_start_rcv(dev);
+ break;
+ }
+}
+
+//----------------------------------------------------------------------
+// Reset the showtime FLAG
+//----------------------------------------------------------------------
+void resetShowtime(void)
+{
+ INFO("AdslStatus=%d\n",adsl_status);
+
+ switch(adsl_status)
+ {
+ case ADSL_STATUS_NOHARDWARE:
+ case ADSL_STATUS_NOLINK:
+ break;
+ case ADSL_STATUS_ATMREADY:
+ adsl_status = ADSL_STATUS_NOLINK;
+ adsl_us_cellrate = 0;
+ adsl_ds_cellrate = 0;
+ break;
+ }
+}
+
+//----------------------------------------------------------------------
+// reports ATM cell rates
+//----------------------------------------------------------------------
+void setAtmRate(
+ unsigned short upRate,
+ unsigned short downRate
+ )
+{
+ INFO("upRate=%dcells/s,downRate=%dcells/s\n",upRate,downRate);
+
+ adsl_us_cellrate= upRate;
+ adsl_ds_cellrate= downRate;
+}
+
+//----------------------------------------------------------------------
+// Copy the TOSCA hardware interrupt table applying a OR to the result
+// This function is called from the hardware ISR
+//----------------------------------------------------------------------
+static void CopyHardIntrTable(struct unicorn_dev *dev)
+{
+ int i;
+
+ for (i=0; i<14; i++) {
+ tosca_hardITABLE[i] |= PCI_GET_DWORD(dev->mem,PR_ITABLE+(i*sizeof(DWORD)));
+ }
+}
+
+//----------------------------------------------------------------------
+// OBC command interrupt received
+//----------------------------------------------------------------------
+static void obc_interrupt(struct unicorn_dev *dev)
+{
+ if (test_and_clear_bit(0, &dev->obc_pending)) {
+ xsm_v(dev->obc_sem);
+ } else {
+ DBG(INTR_D,"spurious OBC interrupt\n");
+ }
+}
+
+
+//----------------------------------------------------------------------
+// Interrupt Service Routine (ISR) for IRQ Irq
+//----------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static irqreturn_t unicorn_isr(int irq, void *context, struct pt_regs *regs)
+#else
+static void unicorn_isr(int irq, void *context, struct pt_regs *regs)
+#endif
+{
+ struct unicorn_dev *dev = context;
+ DWORD mask; // Mask to apply to read the register
+ DWORD rmask; // Mask to apply to reset the interrupts
+ DWORD isdr; // IDSR register
+ WORD isr; // ISR register
+
+loop:
+ isdr = PCI_GET_DWORD(dev->mem,PR_ISDR);
+ DBG(INTR_D,"ISDR=%lx\n",isdr);
+ if ((isdr & PISDR_IF) == 0) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_HANDLED;
+#else
+ return;
+#endif
+ }
+ rmask = dev->isdr_enable_mask;
+
+ // PCI parity error and bus error check
+ if (isdr & (PISDR_PEIF|PISDR_BEIF)) {
+ WARN("PCI Parity/Bus Error !!!!!\n");
+ dev->isdr_enable_mask = 0; // disable all interrupts
+ PCI_PUT_DWORD(PISDR_IF,dev->mem,PR_ISDR); // Clear all interrupts pending
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_HANDLED;
+#else
+ return;
+#endif
+ }
+
+ // ATM US DMA interrupt pointer 1
+ mask = PISDR_DMA_US1_IF;
+ if (isdr & mask) {
+ DBG(INTR_D,"ATM US ptr1 DMA interrupt\n");
+ rmask |= mask;
+
+ atm_send_complete(dev);
+ }
+
+ // ATM US DMA interrupt pointer 2
+ mask = PISDR_DMA_US2_IF;
+ if (isdr & mask) {
+ DBG(INTR_D,"ATM US ptr2 DMA interrupt\n");
+ rmask |= mask;
+
+ atm_send_complete(dev);
+ }
+
+ // ATM DS DMA interrupt pointer 1
+ mask = PISDR_DMA_DS1_IF;
+ if (isdr & mask) {
+ DBG(INTR_D,"ATM DS ptr1 DMA interrupt\n");
+ rmask |= mask;
+
+ atm_recv_complete(dev);
+ }
+
+ // ATM DS DMA interrupt pointer 2
+ mask = PISDR_DMA_DS2_IF;
+ if (isdr & mask) {
+ DBG(INTR_D,"ATM DS ptr2 DMA interrupt\n");
+ rmask |= mask;
+
+ atm_recv_complete(dev);
+ }
+
+ // OBC DMA interrupt
+ mask = PISDR_DMA_OBC_IF;
+ if (isdr & mask) {
+ DBG(INTR_D,"OBC DMA interrupt\n");
+ rmask |= mask;
+
+ obc_interrupt(dev);
+ }
+
+ // ACTD interrupt
+ mask = PISDR_ACTDIF;
+ if (isdr & mask) {
+ DBG(INTR_D,"ACTD interrupt\n");
+ rmask |= mask;
+ }
+
+ // ADSL interrupts
+ mask = PISDR_AIF1 | PISDR_AIF2;
+ if ((isdr & mask) == 0) {
+ PCI_PUT_DWORD(rmask,dev->mem,PR_ISDR);
+ goto loop;
+ }
+ rmask |= mask;
+ PCI_PUT_DWORD(rmask,dev->mem,PR_ISDR);
+
+ isr = (WORD)PCI_GET_DWORD(dev->mem,PR_ISR);
+ DBG(INTR_D,"ADSL uP interrupt,ISR=%04x\n",isr);
+ rmask = dev->isr_enable_mask;
+
+ // TOSCA macrocell interrupt
+ mask = ISR_TOIF | ISR_TOIFS;
+ if (isr & mask) {
+ DBG(INTR_D,"TOSCA macrocell interrupt\n");
+ CopyHardIntrTable(dev);
+ rmask |= mask;
+
+ // Wake up TOSCA interrupt_task
+ tosca_interrupt();
+ }
+
+ // Timer interrupt
+ mask = ISR_TIMIF;
+ if (isr & mask) {
+ DBG(INTR_D,"Timer interrupt\n");
+ rmask |= mask;
+ ++timer_int_counter;
+#ifdef USE_HW_TIMER
+ unicorn_timer();
+#endif
+ }
+
+ // GPIO interrupt
+ mask = ISR_GPIFA | ISR_GPIFB;
+ if (isr & mask) {
+ WARN("GPIO interrupt\n");
+ rmask |= mask;
+ }
+
+ // OBC Slave Command Complete interrupt
+ mask = ISR_OSIF;
+ if (isr & mask) {
+ DBG(INTR_D,"OBC Slave Command Complete interrupt\n");
+ rmask |= mask;
+
+ obc_interrupt(dev);
+ }
+
+ // OBC Master Command Complete interrupt
+ mask = ISR_OMIF;
+ if (isr & mask) {
+ DBG(INTR_D,"OBC Master Command Complete interrupt\n");
+ rmask |= mask;
+ }
+ PCI_PUT_DWORD((WORD)rmask,dev->mem,PR_ISR);
+ goto loop;
+}
+
+//======================================================================
+// FUNCTIONS TO ACCESS THE HARDWARE
+//======================================================================
+
+//----------------------------------------------------------------------
+// Set the Loopback mode
+//----------------------------------------------------------------------
+void set_loopback_mode(int loop)
+{
+ ST_STATUS status;
+ T_SlaveDirData p;
+
+ DBG(1,"loop=%d\n",loop);
+
+ p.iaddr = 0x32;
+ p.idata = loop ? 0x18 : 0;
+ p.status = 0xE821;
+ status = PCI_SlaveWriteDirect(&p);
+ if (status == FAILURE) {
+ WARN("PCI_SlaveWriteDirect failed\n");
+ return;
+ }
+ if (loop) {
+ p.iaddr = 0x0c44;
+ p.idata = 0x2800;
+ p.status = 0xE821;
+ status = PCI_SlaveWriteDirect(&p);
+ if (status == FAILURE) {
+ WARN("PCI_SlaveWriteDirect failed\n");
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+// Starts the hardware
+//----------------------------------------------------------------------
+static void start_hardware(struct unicorn_dev *dev)
+{
+ dev->isdr_enable_mask =
+ PISDR_AIE1 | PISDR_AIE2 |
+ PISDR_DMA_OBC_IE |
+ PISDR_DMA_US_IE | PISDR_DMA_DS_IE |
+ PISDR_PEIE | PISDR_BEIE | PISDR_ACTDIE;
+ dev->isr_enable_mask = ISR_OSIE | ISR_TOIES | ISR_TIMIE;
+ // dev->lacfw = 0; // half ATM cell max DMA burst size
+ dev->lacfw = LACFW_W_DS_SIZE | LACFW_W_US_SIZE; // ATM cell max DMA burst size
+ //dev->lacfw = LACFW_W_DS_SIZE | LACFW_W_US_SIZE | LACFW_W_WR_SIZE | LACFW_W_RD_SIZE; // max DMA burst size
+
+ //STM: 27-11-2000: Sequence of reset for new AFE
+
+ PCI_PUT_DWORD(0x10,dev->mem,PR_PCFW); //STM: release AFE reset
+
+ DELAY(100);
+
+ PCI_PUT_DWORD(0x30,dev->mem,PR_PCFW); //STM enable TOSCA clock
+ PCI_PUT_DWORD(0x32,dev->mem,PR_PCFW); //STM: reset ADSL uP
+ PCI_PUT_DWORD(0x30,dev->mem,PR_PCFW); //STM: release reset ADSL uP
+ dev->pcfw = 0x30;
+
+ DELAY(100);
+
+ PCI_PUT_DWORD(dev->isdr_enable_mask,dev->mem,PR_ISDR);
+ PCI_PUT_DWORD((WORD)dev->isr_enable_mask,dev->mem,PR_ISR);
+ PCI_PUT_DWORD((WORD)0x8000,dev->mem,PR_IMASKS);
+ PCI_PUT_DWORD((WORD)0x0100,dev->mem,PR_IADR_IRQ);
+ PCI_PUT_DWORD( dev->lacfw,dev->mem,PR_LACFW);
+
+ PCI_PUT_DWORD(PCI_DS_BUF_SIZE,dev->mem,PR_DS_SIZE_1);
+ PCI_PUT_DWORD(PCI_DS_BUF_SIZE,dev->mem,PR_DS_SIZE_2);
+
+ if (LoopbackMode) {
+ set_loopback_mode(1);
+
+ atm_start_snd(dev);
+ atm_start_rcv(dev);
+ }
+
+#ifdef USE_HW_TIMER
+ // Start TIMER_A (2ms periodic)
+ PCI_PUT_DWORD(0xFFFF,dev->mem,PR_TIM_REG_A);
+#endif
+#ifdef PCI_BRIDGE_WORKAROUND
+ pci_write_config_byte(dev->pci_dev,PCI_CACHE_LINE_SIZE, 0x02);
+#endif
+ // Program a new value for the PCI DMA access grant timeout
+ pci_write_config_byte(dev->pci_dev, PCI_LATENCY_TIMER, 255);
+#ifdef KT400
+ // Fix for MSI KT4 Ultra motherboard
+ pci_write_config_byte(dev->pci_dev, 0x40, 0);
+ pci_write_config_byte(dev->pci_dev, 0x41, 0);
+#else
+ pci_write_config_byte(dev->pci_dev, 0x40, 255);
+ pci_write_config_byte(dev->pci_dev, 0x41, 255);
+#endif
+}
+
+//----------------------------------------------------------------------
+// Stops the hardware
+//----------------------------------------------------------------------
+static void stop_hardware(struct unicorn_dev *dev)
+{
+ DBG(1,"\n");
+
+ dev->isdr_enable_mask = 0;
+ dev->isr_enable_mask = 0;
+ dev->lacfw = 0;
+
+ PCI_PUT_DWORD((WORD)0,dev->mem,PR_TIM_REG_A);
+ PCI_PUT_DWORD((LACFW_EDMA_DS | LACFW_EDMA_US),dev->mem,PR_LACFW_CLR);
+ PCI_PUT_DWORD((LACFW_EDMA_WROBC | LACFW_EDMA_RDOBC),dev->mem,PR_LACFW_CLR);
+
+ //PCI_PUT_DWORD(0,dev->mem,PR_LACFW);
+ PCI_PUT_DWORD(0,dev->mem,PR_ISDR);
+ PCI_PUT_DWORD((WORD)0,dev->mem,PR_ISR);
+}
+
+//----------------------------------------------------------------------
+// Find the PCI device
+//----------------------------------------------------------------------
+static struct pci_dev *find_unicorn(void)
+{
+ struct pci_dev *pci_dev;
+
+ pci_dev = NULL;
+ do {
+ pci_dev = pci_find_device(PCI_VENDOR_ID_ST,
+ PCI_DEVICE_ID_UNICORN,
+ pci_dev);
+ if (pci_dev) {
+ DBG(1,"vendor=%04x,device=%04x,irq=%d\n",
+ pci_dev->vendor,pci_dev->device,pci_dev->irq);
+ if (pci_enable_device(pci_dev)) {
+ // try next card
+ WARN("can't enable PCI device\n");
+ } else {
+ // found
+ break;
+ }
+ }
+ } while (pci_dev);
+ return pci_dev;
+}
+
+//----------------------------------------------------------------------
+// Start the PCI device
+//----------------------------------------------------------------------
+int start_device(struct unicorn_dev *dev,struct pci_dev *pci_dev)
+{
+ unsigned long phys_base;
+ int status;
+
+ dev->pci_dev = pci_dev;
+
+ pci_set_master(pci_dev);
+
+ // Initialize the Common DMA buffer
+ dev->dma_buffer = pci_alloc_consistent(pci_dev,sizeof(DMA_MEMORY),&dev->dma_phys_addr);
+ if (dev->dma_buffer == NULL) {
+ WARN("Failed to initialize common DMA buffer\n");
+ return -ENOMEM;
+ }
+ dev->dma_virtual_addr = dev->dma_buffer;
+ DBG(1,"DMA addr=%p, phys addr%x\n",dev->dma_buffer,dev->dma_phys_addr);
+
+ // Initialize the memory mapped region
+ phys_base = pci_resource_start(pci_dev,0);
+ if (phys_base == 0) {
+ WARN("Failed to initialize PCI memory\n");
+ return -ENXIO;
+ }
+
+ status = pci_request_regions(pci_dev, "unicorn_pci");
+ if (status) {
+ WARN("Failed to initialize PCI memory,status=%d\n",status);
+ return status;
+ }
+
+ dev->mem_size = pci_resource_len(pci_dev,0);
+ dev->mem = ioremap(phys_base,dev->mem_size);
+ if (dev->mem == NULL) {
+ WARN("Failed to map PCI memory\n");
+ return -ENXIO;
+ }
+ DBG(1,"PCI base phys addr=%lx,addr=%p,size=%ld\n",
+ phys_base,dev->mem,dev->mem_size);
+
+ // Initialize and connect the interrupt
+ status = request_irq(pci_dev->irq, unicorn_isr, SA_SHIRQ, "unicorn_pci", dev);
+ if (status) {
+ WARN("Failed to connect Interrupt,status=%d\n",status);
+ return status;
+ }
+
+ // Initialize the R/W
+ send_atm_init(dev,dev->dma_virtual_addr+offsetof(DMA_MEMORY,AtmUsBuf),
+ PCI_US_BUF_SIZE*sizeof(DWORD));
+
+ recv_atm_init(dev,dev->dma_virtual_addr+offsetof(DMA_MEMORY,AtmDsBuf),
+ PCI_DS_BUF_SIZE*sizeof(DWORD));
+
+ // Initialize OBC objects
+ init_MUTEX(&dev->obc_lock);
+ if ((xsm_create("OBC ",0,0,&dev->obc_sem)) != SUCCESS) {
+ return -ENOMEM;
+ }
+
+ // Start the Hardware Device
+ start_hardware(dev);
+ dev->started = TRUE;
+ adsl_status = ADSL_STATUS_NOLINK;
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Stop the PCI device
+//----------------------------------------------------------------------
+void stop_device(struct unicorn_dev *dev)
+{
+ struct pci_dev *pci_dev;
+
+ DBG(1,"\n");
+
+ if ((pci_dev = dev->pci_dev) == NULL) {
+ return;
+ }
+
+ adsl_status = ADSL_STATUS_NOHARDWARE;
+
+ // Stop receiving and transmitting
+ send_atm_exit(dev);
+ recv_atm_exit(dev);
+
+ // Shutdown the Modem Software
+ if (dev->started)
+ if (dev->msw_started) {
+ rapi_lock();
+ msw_stop();
+ msw_exit();
+ rapi_unlock();
+ dev->msw_started = FALSE;
+ }
+
+ // Release RAPI Objects
+ dev->stopping = TRUE; // PC Crash Fix: 01/31/2001
+
+ // disable any interrupt source in the device
+ if (dev->started) {
+ stop_hardware(dev);
+ // Release interrupt
+ free_irq(dev->pci_dev->irq, dev);
+ // Device is not Started anymore
+ dev->started = FALSE;
+ }
+
+ // Disable memory mapping and busmastering
+ pci_disable_device(pci_dev);
+
+ // Release DMA buffer
+ if (dev->dma_buffer) {
+ pci_free_consistent(pci_dev,sizeof(DMA_MEMORY),dev->dma_buffer,dev->dma_phys_addr);
+ dev->dma_buffer = NULL;
+ }
+ dev->dma_phys_addr = 0;
+ dev->dma_virtual_addr = NULL;
+
+ if (dev->mem) {
+ iounmap((void *)dev->mem);
+ dev->mem = NULL;
+ }
+ pci_release_regions(pci_dev);
+ dev->mem_size = 0L;
+}
+
+
+//----------------------------------------------------------------------
+// CheckObcBuffer
+//----------------------------------------------------------------------
+BOOLEAN CheckObcBuffer (struct unicorn_dev *dev,DWORD *buf,UINT n)
+{
+ PBYTE p;
+
+ if ((DWORD)buf & 3) return FALSE;
+ p = (PBYTE)buf + n*sizeof(DWORD);
+ if (p > dev->dma_virtual_addr+offsetof(DMA_MEMORY,AtmUsBuf)) return FALSE;
+ return TRUE;
+}
+
+//----------------------------------------------------------------------
+// ObcBufHardAddr
+//----------------------------------------------------------------------
+static inline DWORD ObcBufHardAddr (struct unicorn_dev *dev,DWORD *buf)
+{
+ return dev->dma_phys_addr + ((PBYTE)buf - dev->dma_virtual_addr);
+}
+
+
+//----------------------------------------------------------------------
+// Waits for OBC command complete
+//----------------------------------------------------------------------
+static ST_STATUS WaitForObcCmdComplete(struct unicorn_dev *dev)
+{
+ ST_STATUS status;
+
+ // wait for semaphore to be free
+ status = xsm_p(dev->obc_sem, 0, OBC_CMD_TIMEOUT);
+ if (status != SUCCESS) {
+ WARN("wait for obc failed (timed out)\n");
+ clear_bit(0, &dev->obc_pending);
+ }
+ return status;
+}
+
+//----------------------------------------------------------------------
+// ObcReset
+//----------------------------------------------------------------------
+static void ObcReset(struct unicorn_dev *dev)
+{
+ // Force STOP ACCESS in status register and OBC FIFO clear pulse
+ DWORD data;
+
+ WARN("Resetting OBC...\n");
+
+ data = PCI_GET_DWORD(dev->mem,PR_STATUS);
+ PCI_PUT_DWORD((data&~3)|0x200,dev->mem,PR_STATUS);
+}
+
+
+//======================================================================
+// HAL API ENTRY POINTS FOR KERNEL MODE MSW
+//======================================================================
+
+//----------------------------------------------------------------------
+// PCI_init
+//----------------------------------------------------------------------
+ST_STATUS PCI_init(
+ DWORD **CMDptrW1,DWORD **CMDptrW2,DWORD **CMDptrRd,
+ WORD **ITABLEptr,WORD **IMASKptr
+ )
+
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ PBYTE p = dev->dma_virtual_addr;
+
+ DBG(1,"dma_virtual_addr=%p\n",p);
+
+ if (!p) return FAILURE;
+ *CMDptrW1 = (PDWORD)(p + offsetof(DMA_MEMORY,CmdBufW1));
+ *CMDptrW2 = (PDWORD)(p + offsetof(DMA_MEMORY,CmdBufW2));
+ *CMDptrRd = (PDWORD)(p + offsetof(DMA_MEMORY,CmdBufRd));
+ *ITABLEptr = tosca_softITABLE;
+ *IMASKptr = tosca_softITABLE + 14;
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// PCI_directWrite
+//----------------------------------------------------------------------
+ST_STATUS PCI_directWrite (WORD addr,DWORD data)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ int special;
+
+ if (addr > dev->mem_size-4) {
+ WARN("invalid address %x\n",addr);
+ return FAILURE;
+ }
+
+ OBC_LOCK(&dev->obc_lock);
+
+ DBG(PCI_D,"addr=%04x,data=%08lx\n",addr,data);
+ special = (addr == PR_STATUS) && (data == 0xe835);
+ if (special) {
+ set_bit(0, &dev->obc_pending);
+ }
+ PCI_PUT_DWORD(data,dev->mem,addr);
+
+ if (special) {
+ // Wait for RBigi MessageWrite to complete
+ if (WaitForObcCmdComplete(dev) != SUCCESS) return FAILURE;
+ }
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// PCI_directRead
+//----------------------------------------------------------------------
+ST_STATUS PCI_directRead(WORD addr,DWORD *data)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+
+ if (addr > dev->mem_size-4) {
+ WARN("invalid address %x\n",addr);
+ return FAILURE;
+ }
+
+ OBC_LOCK(&dev->obc_lock);
+
+ *data = PCI_GET_DWORD(dev->mem,addr);
+ DBG(PCI_D,"addr=%04x,data=%08lx\n",addr,*data);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return SUCCESS;
+}
+
+#define MAX_RETRIES 2
+
+//----------------------------------------------------------------------
+// PCI_SlaveWriteDirect
+//----------------------------------------------------------------------
+ST_STATUS PCI_SlaveWriteDirect (T_SlaveDirData *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"idata=%08lx,iaddr=%08lx,status=%08lx\n",p->idata,p->iaddr,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD((WORD)p->idata,dev->mem,PR_IDATA);
+ PCI_PUT_DWORD((WORD)p->iaddr,dev->mem,PR_IADR);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_SlaveReadDirect
+//----------------------------------------------------------------------
+ST_STATUS PCI_SlaveReadDirect (T_SlaveDirData *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"iaddr=%08lx,status=%08lx\n",p->iaddr,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD((WORD)p->iaddr,dev->mem,PR_IADR);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ p->idata = (WORD)PCI_GET_DWORD(dev->mem,PR_IDATA);
+ DBG(PCI_D,"idata=%08lx\n",p->idata);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_SlaveRMWrite
+//----------------------------------------------------------------------
+ST_STATUS PCI_SlaveRMWrite (T_SlaveMaskData *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"idata=%08lx,iaddr=%08lx,mask=%08lx,status=%08lx\n",
+ p->idata,p->iaddr,p->mask,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD((WORD)p->idata,dev->mem,PR_IDATA);
+ PCI_PUT_DWORD((WORD)p->iaddr,dev->mem,PR_IADR);
+ PCI_PUT_DWORD((WORD)p->mask,dev->mem,PR_IRMW);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_SlaveWriteIndirect
+//----------------------------------------------------------------------
+ST_STATUS PCI_SlaveWriteIndirect (T_SlaveIndData *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"idata[0]=%08lx,idata[1]=%08lx,idata[2]=%08lx,icntrl=%08lx,iaddr=%08lx,status=%08lx\n",
+ p->idata[0],p->idata[1],p->idata[2],p->icntrl,p->iaddr,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD((WORD)p->idata[0],dev->mem,PR_IDATA_1);
+ PCI_PUT_DWORD((WORD)p->idata[1],dev->mem,PR_IDATA_2);
+ PCI_PUT_DWORD((WORD)p->idata[2],dev->mem,PR_IDATA_3);
+ PCI_PUT_DWORD((WORD)p->icntrl,dev->mem,PR_IDATA);
+ PCI_PUT_DWORD((WORD)p->iaddr,dev->mem,PR_IADR);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_SlaveReadIndirect
+//----------------------------------------------------------------------
+ST_STATUS PCI_SlaveReadIndirect (T_SlaveIndData *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"icntrl=%08lx,iaddr=%08lx,status=%08lx\n",
+ p->icntrl,p->iaddr,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD((WORD)p->icntrl,dev->mem,PR_IDATA);
+ PCI_PUT_DWORD((WORD)p->iaddr,dev->mem,PR_IADR);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ p->idata[0] = (WORD)PCI_GET_DWORD(dev->mem,PR_IDATA_1);
+ p->idata[1] = (WORD)PCI_GET_DWORD(dev->mem,PR_IDATA_2);
+ p->idata[2] = (WORD)PCI_GET_DWORD(dev->mem,PR_IDATA_3);
+ DBG(PCI_D,"idata[0]=%08lx,idata[1]=%08lx,idata[2]=%08lx\n",
+ p->idata[0],p->idata[1],p->idata[2]);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterWriteDirBlock
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterWriteDirBlock (T_MasterWBlock *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,wrSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->wrSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD(LACFW_EDMA_WROBC,dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterReadDirBlock
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterReadDirBlock (T_MasterRBlock *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+ if (!CheckObcBuffer(dev,p->resBuff,p->rdSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,resBuff=%p,wrSize=%08lx,rdSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->resBuff,p->wrSize,p->rdSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->resBuff),dev->mem,PR_RD_PTR);
+ PCI_PUT_DWORD(p->rdSize,dev->mem,PR_RD_SIZE);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD((LACFW_EDMA_WROBC+LACFW_EDMA_RDOBC),dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ PCI_SWAP_BUF(p->resBuff,p->rdSize);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterWriteIndBlock
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterWriteIndBlock (T_MasterWBlock *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+
+ DBG(PCI_D,"cmdBuff=%p,wrSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->wrSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD(LACFW_EDMA_WROBC,dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterReadIndBlock
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterReadIndBlock (T_MasterRBlock *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+ if (!CheckObcBuffer(dev,p->resBuff,p->rdSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,resBuff=%p,wrSize=%08lx,rdSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->resBuff,p->wrSize,p->rdSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->resBuff),dev->mem,PR_RD_PTR);
+ PCI_PUT_DWORD(p->rdSize,dev->mem,PR_RD_SIZE);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD((LACFW_EDMA_WROBC+LACFW_EDMA_RDOBC),dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ PCI_SWAP_BUF(p->resBuff,p->rdSize);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterWriteDirBurst
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterWriteDirBurst (T_MasterWBurst *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,baseAddr=%08lx,wrSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->baseAddr,p->wrSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD((WORD)p->baseAddr,dev->mem,PR_IADR_BURST);
+ PCI_PUT_DWORD((WORD)p->wrSize,dev->mem,PR_SIZE_BURST);
+ PCI_PUT_DWORD((WORD)0x8000,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD(LACFW_EDMA_WROBC,dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterReadDirBurst
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterReadDirBurst (T_MasterRBurst *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->resBuff,p->rdSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"resBuff=%p,baseAddr=%08lx,wrSize=%08lx,rdSize=%08lx,status=%08lx\n",
+ p->resBuff,p->baseAddr,p->wrSize,p->rdSize,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->resBuff),dev->mem,PR_RD_PTR);
+ PCI_PUT_DWORD(p->rdSize,dev->mem,PR_RD_SIZE);
+ PCI_PUT_DWORD((WORD)p->baseAddr,dev->mem,PR_IADR_BURST);
+ PCI_PUT_DWORD((WORD)p->wrSize,dev->mem,PR_SIZE_BURST);
+ PCI_PUT_DWORD((WORD)0x8000,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD(LACFW_EDMA_RDOBC,dev->mem,PR_LACFW_SET);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ PCI_SWAP_BUF(p->resBuff,p->rdSize);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterWriteIndBurst
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterWriteIndBurst (T_MasterWBurst *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->wrSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,baseAddr=%08lx,wrSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->baseAddr,p->wrSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->wrSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->wrSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD((WORD)p->baseAddr,dev->mem,PR_IADR_BURST);
+ PCI_PUT_DWORD((WORD)(p->wrSize/3),dev->mem,PR_SIZE_BURST);
+ PCI_PUT_DWORD((WORD)0x8000,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ PCI_PUT_DWORD(LACFW_EDMA_WROBC,dev->mem,PR_LACFW_SET);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MasterReadIndBurst
+//----------------------------------------------------------------------
+ST_STATUS PCI_MasterReadIndBurst (T_MasterRBurst *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->resBuff,p->rdSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"resBuff=%p,baseAddr=%08lx,wrSize=%08lx,rdSize=%08lx,status=%08lx\n",
+ p->resBuff,p->baseAddr,p->wrSize,p->rdSize,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->resBuff),dev->mem,PR_RD_PTR);
+ PCI_PUT_DWORD(p->rdSize,dev->mem,PR_RD_SIZE);
+ PCI_PUT_DWORD((WORD)p->baseAddr,dev->mem,PR_IADR_BURST);
+ PCI_PUT_DWORD((WORD)p->wrSize,dev->mem,PR_SIZE_BURST);
+ PCI_PUT_DWORD((WORD)0x8000,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD(LACFW_EDMA_RDOBC,dev->mem,PR_LACFW_SET);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ PCI_SWAP_BUF(p->resBuff,p->rdSize);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MessageRead
+//----------------------------------------------------------------------
+ST_STATUS PCI_MessageRead (T_Msg *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->reqSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,SocAddr=%08lx,SocCntrl=%08lx,mask=%08lx,reqSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->SocAddr,p->SocCntrl,p->mask,p->reqSize,p->status);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_RD_PTR);
+ PCI_PUT_DWORD(p->reqSize,dev->mem,PR_RD_SIZE);
+ PCI_PUT_DWORD((WORD)p->SocAddr,dev->mem,PR_IADR_MSG);
+ PCI_PUT_DWORD((WORD)p->SocCntrl,dev->mem,PR_IADR_CHK);
+ PCI_PUT_DWORD((WORD)p->mask,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD((WORD)p->reqSize,dev->mem,PR_SIZE_BURST);
+ PCI_PUT_DWORD(LACFW_EDMA_RDOBC,dev->mem,PR_LACFW_SET);
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ }
+ p->exeSize = PCI_GET_DWORD(dev->mem,PR_RD_MOVED);
+ PCI_SWAP_BUF(p->cmdBuff,p->reqSize);
+
+ DBG(PCI_D,"exeSize=%08lx\n",p->exeSize);
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// PCI_MessageWrite
+//----------------------------------------------------------------------
+ST_STATUS PCI_MessageWrite (T_Msg *p)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ ST_STATUS status=FAILURE;
+ int retry;
+
+ if (!CheckObcBuffer(dev,p->cmdBuff,p->reqSize)) return FAILURE;
+
+ OBC_LOCK(&dev->obc_lock);
+ set_bit(0, &dev->obc_pending);
+
+ DBG(PCI_D,"cmdBuff=%p,SocAddr=%08lx,SocCntrl=%08lx,mask=%08lx,reqSize=%08lx,status=%08lx\n",
+ p->cmdBuff,p->SocAddr,p->SocCntrl,p->mask,p->reqSize,p->status);
+
+ PCI_SWAP_BUF(p->cmdBuff,p->reqSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ PCI_PUT_DWORD(ObcBufHardAddr(dev,p->cmdBuff),dev->mem,PR_WR_PTR);
+ PCI_PUT_DWORD(p->reqSize,dev->mem,PR_WR_SIZE);
+ PCI_PUT_DWORD((WORD)p->SocAddr,dev->mem,PR_IADR_MSG);
+ PCI_PUT_DWORD((WORD)p->SocCntrl,dev->mem,PR_IADR_CHK);
+ PCI_PUT_DWORD((WORD)p->mask,dev->mem,PR_IMASKM);
+ PCI_PUT_DWORD((WORD)p->reqSize,dev->mem,PR_SIZE_BURST);
+
+ //STM bigi
+ //write status for all msg except RBigi long packet
+ if(p->reqSize < 128) {
+ PCI_PUT_DWORD((WORD)p->status,dev->mem,PR_STATUS);
+ DBG(PCI_D,"status=%08lx\n",p->status);
+ }
+ PCI_PUT_DWORD(LACFW_EDMA_WROBC,dev->mem,PR_LACFW_SET);
+
+ // STM 25/10/2000
+ if(p->reqSize < 128) {
+ if ((status = WaitForObcCmdComplete(dev)) != SUCCESS) {
+ ObcReset(dev);
+ } else {
+ break;
+ }
+ p->exeSize = PCI_GET_DWORD(dev->mem,PR_WR_MOVED);
+ DBG(PCI_D,"exeSize=%08lx\n",p->exeSize);
+ } else {
+ status = SUCCESS;
+ break;
+ }
+ }
+
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+#ifdef NOT_USED
+//----------------------------------------------------------------------
+// PCI_ReadConfigHeader
+//----------------------------------------------------------------------
+ST_STATUS PCI_ReadConfigHeader (PVOID Buffer,ULONG Offset,ULONG Count)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ unsigned char *val=Buffer;
+
+ if (Offset+Count > 64) {
+ WARN("failed, invalid argument\n");
+ return FAILURE;
+ }
+ DBG(PCI_D,"buffer=%p,offset=%08lx,count=%08lx\n",
+ Buffer,Offset,Count);
+
+ while (Count--) {
+ if (pci_read_config_byte(dev->pci_dev, Offset++, val++)) {
+ WARN("pci_read_config_byte failed\n");
+ return FAILURE;
+ }
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// PCI_WriteConfigHeader
+//----------------------------------------------------------------------
+ST_STATUS PCI_WriteConfigHeader (PVOID Buffer,ULONG Offset,ULONG Count)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ unsigned char *val=Buffer;
+
+ if (Offset+Count > 64) {
+ WARN("failed, invalid argument\n");
+ return FAILURE;
+ }
+ DBG(PCI_D,"buffer=%p,offset=%08lx,count=%08lx\n",
+ Buffer,Offset,Count);
+
+ while (Count--) {
+ if (pci_write_config_byte(dev->pci_dev, Offset++, *val++)) {
+ WARN("pci_write_config_byte failed\n");
+ return FAILURE;
+ }
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// PCI_ReadDeviceSpecificConfig
+//----------------------------------------------------------------------
+ST_STATUS PCI_ReadDeviceSpecificConfig (PVOID Buffer,ULONG Offset,ULONG Count)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ unsigned char *val=Buffer;
+
+ if (Offset+Count > 192) {
+ WARN("failed, invalid argument\n");
+ return FAILURE;
+ }
+ DBG(PCI_D,"buffer=%p,offset=%08lx,count=%08lx\n",
+ Buffer,Offset,Count);
+
+ while (Count--) {
+ if (pci_read_config_byte(dev->pci_dev, Offset++, val++)) {
+ WARN("pci_read_config_byte failed\n");
+ return FAILURE;
+ }
+ Offset++;
+ val++;
+ }
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// PCI_WriteDeviceSpecificConfig
+//----------------------------------------------------------------------
+ST_STATUS PCI_WriteDeviceSpecificConfig (PVOID Buffer,ULONG Offset,ULONG Count)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ unsigned char *val=Buffer;
+
+ if (Offset+Count > 192) {
+ WARN("failed, invalid argument\n");
+ return FAILURE;
+ }
+ DBG(PCI_D,"buffer=%p,offset=%08lx,count=%08lx\n",
+ Buffer,Offset,Count);
+
+ while (Count--) {
+ if (pci_write_config_byte(dev->pci_dev, Offset++, *val++)) {
+ WARN("pci_write_config_byte failed\n");
+ return FAILURE;
+ }
+
+ }
+ return SUCCESS;
+}
+#endif
+
+//----------------------------------------------------------------------
+// unicorn_snd_getcell:
+// Returns a pointer to the transmit buffer
+//----------------------------------------------------------------------
+unsigned char *unicorn_snd_getcell(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+ ULONG n;
+ PBYTE p;
+
+ if (!send_atm->started) {
+ WARN("ATM Tx I/O error\n");
+ return NULL;
+ }
+
+ t = send_atm->turn_write;
+ if (send_atm->lens[t] > 0) return NULL;
+
+ n = send_atm->maxlen - send_atm->bufofs;
+ if (n < CELL_LENGTH) return NULL;
+
+ p = send_atm->bufs[t] + send_atm->bufofs;
+
+ // next cell
+ send_atm->bufofs += CELL_LENGTH;
+ send_atm->cell_count++;
+ return p;
+}
+
+//----------------------------------------------------------------------
+// unicorn_start_transmit:
+// Start transmit DMA
+//----------------------------------------------------------------------
+int unicorn_start_transmit(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+ unsigned long n;
+ unsigned long flags;
+
+ DBG(RW_D,"\n");
+
+ spin_lock_irqsave(&send_atm->lock, flags);
+
+ t = send_atm->turn_write;
+ n = send_atm->bufofs;
+ if (n > 0) {
+ send_atm->lens[t] = n;
+ send_atm->turn_write = (t+1)&(ATM_WRITES-1);
+ send_atm->bufofs = 0;
+ set_bit(0,&send_atm->busy[t]);
+ send_atm->send_pending++;
+ spin_unlock_irqrestore(&send_atm->lock, flags);
+ StartAtmUsXfer(dev,t,send_atm->bufs[t],n);
+ return n;
+ }
+ spin_unlock_irqrestore(&send_atm->lock, flags);
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// unicorn_rcv_getcell:
+// Returns a pointer to the next cell header in the receive buffer
+//----------------------------------------------------------------------
+unsigned char *unicorn_rcv_getcell(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int t;
+ PBYTE p;
+ PDWORD pf;
+ unsigned long flags;
+
+ spin_lock_irqsave(&recv_atm->lock, flags);
+
+ t = recv_atm->turn_read;
+ p = recv_atm->bufs[t] + recv_atm->bufofs;
+ pf = (PDWORD)(p+PCI_CELL_LENGTH-4);
+
+ if (*pf) {
+ *pf = 0;
+ recv_atm->bufofs += PCI_CELL_LENGTH;
+ if (recv_atm->bufofs == recv_atm->maxlen) {
+ recv_atm->turn_read = (t+1)&(ATM_READS-1);
+ recv_atm->bufofs = 0;
+ }
+ recv_atm->cell_count++;
+ } else {
+ p = NULL;
+ }
+
+ spin_unlock_irqrestore(&recv_atm->lock, flags);
+ return p;
+}
+
+//----------------------------------------------------------------------
+// Modem Software Control functions
+//----------------------------------------------------------------------
+int unicorn_msw_control(struct unicorn_dev *dev,T_MswCtrl *ctrl)
+{
+ static unsigned long old_report = 0L;
+ ctrl->retcode = -1;
+
+ DBG(RW_D,"code=%lx,subcode=%lx,buffer=%p,length=%ld\n",
+ ctrl->code,ctrl->subcode,ctrl->buffer,ctrl->length);
+
+ switch(ctrl->code) {
+ case MSW_CTL_INIT:
+ if (ctrl->subcode <= 0) break;
+ if (ctrl->subcode >= 16) break;
+ ActivationMode = ctrl->subcode ;
+ dev->msw_started = TRUE;
+ rapi_lock();
+ msw_init(ActivationMode);
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_EXIT:
+ rapi_lock();
+ msw_exit();
+ rapi_unlock();
+ dev->msw_started = FALSE;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_START:
+ rapi_lock();
+ msw_start();
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_STOP:
+ rapi_lock();
+ msw_stop();
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_SET_CONFIG:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_setModemConfiguration(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_GET_CONFIG:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getModemConfiguration(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_GET_DATA:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getData(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_GET_STATE:
+ if (ctrl->length < sizeof(AMSW_ModemState)) break;
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getModemState((AMSW_ModemState*)ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_REQ_CHANGE:
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_requestModemStateChange((AMSW_ModemState)ctrl->subcode);
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_DYING_GASP:
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_dyingGasp();
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+ case MSW_CTL_SETCARRIERCONSTELLATION:
+ ctrl->retcode = AMSW_ANT_setCarrierConstellation(ctrl->subcode);
+ break;
+ case MSW_CTL_WAIT_EVENT:
+ if (ctrl->length < sizeof(unsigned long)) break;
+ if (ctrl->buffer == NULL) break;
+ if (last_report != old_report) {
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_wait_event((unsigned long*)ctrl->buffer);
+ rapi_unlock();
+ old_report = last_report;
+ } else {
+ ctrl->buffer = 0;
+ //ctrl->length = 0;
+ }
+ break;
+ case MSW_CTL_VERSION_INFO:
+ if (ctrl->length < sizeof(unsigned long)) break;
+ if (ctrl->buffer == NULL) break;
+ *((unsigned long *)ctrl->buffer) = VERS;
+ ctrl->retcode = 0;
+ break;
+ case MSW_CTL_STATE_INFO:
+ if (ctrl->length < sizeof(T_StateInfo)) break;
+ if (ctrl->buffer == NULL) break;
+ {
+ T_StateInfo *info = (T_StateInfo *)ctrl->buffer;
+ info->State = g_ModemState;
+ ctrl->retcode = 0;
+ if (info->State == C_AMSW_IDLE) {
+ last_event = (AMSW_ModemEvent)-1;
+ }
+ if (info->State == C_AMSW_SHOWTIME_L0) {
+ last_failure = (AMSW_ModemFailure)-1;
+ info->TimeCnctd = xtm_elapse(adsl_system_time);
+ } else {
+ info->TimeCnctd = 0;
+ }
+ info->Report = last_event;
+ info->Failure = last_failure;
+ info->RcvdCells = dev->recv_atm.cell_count;
+ info->SentCells = dev->send_atm.cell_count;
+ }
+ break;
+ case MSW_CTL_SET_DEBUG_LEVEL:
+ DebugLevel = ctrl->subcode;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+ case MSW_CTL_SET_MSW_DEBUG_LEVEL:
+ MswDebugLevel = ctrl->subcode;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+ }
+
+ DBG(RW_D,"retcode=%ld,length=%ld\n",ctrl->retcode,ctrl->length);
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// unicorn_get_adsl_status
+//----------------------------------------------------------------------
+ADSL_STATUS unicorn_get_adsl_status(struct unicorn_dev *dev)
+{
+ return adsl_status;
+}
+
+//----------------------------------------------------------------------
+// unicorn_get_adsl_linkspeed
+//----------------------------------------------------------------------
+int unicorn_get_adsl_linkspeed(struct unicorn_dev *dev,
+ unsigned long *us_rate,unsigned long *ds_rate)
+{
+ int status;
+
+ if (adsl_status != ADSL_STATUS_ATMREADY) {
+ *us_rate = 0;
+ *ds_rate = 0;
+ status = -ENXIO;
+ } else {
+ *us_rate = (adsl_us_cellrate * ATM_CELL_SIZE*8UL)/1000UL;
+ *ds_rate = (adsl_ds_cellrate * ATM_CELL_SIZE*8UL)/1000UL;
+ status = 0;
+ }
+ return status;
+}
+
+/* module parameters for MSW */
+MODULE_PARM(ActivationMode, "i");
+//MODULE_PARM(ActivationTaskTimeout, "i");
+MODULE_PARM(ActTimeout, "i");
+MODULE_PARM(AutoActivation, "i");
+//MODULE_PARM(BreakOnEntry, "i");
+MODULE_PARM(DownstreamRate, "i");
+MODULE_PARM(eocTrace, "i");
+//MODULE_PARM(ExchangeDelay, "i");
+MODULE_PARM(FmPollingRate, "i");
+//MODULE_PARM(g_RefGain, "i");
+MODULE_PARM(g_TeqMode, "i");
+MODULE_PARM(InitTimeout, "i");
+MODULE_PARM(Interoperability, "i");
+MODULE_PARM(LCD_Trig, "i");
+MODULE_PARM(LOS_LOF_Trig, "i");
+MODULE_PARM(LoopbackMode, "i");
+MODULE_PARM(MswDebugLevel, "i");
+MODULE_PARM(RetryTime, "i");
+MODULE_PARM(setINITIALDAC, "i");
+//MODULE_PARM(TrainingDelay, "i");
+//MODULE_PARM(TruncateMode, "i");
+MODULE_PARM(useAFE, "i");
+//MODULE_PARM(useRFC019v, "i");
+//MODULE_PARM(useRFC029v, "i");
+//MODULE_PARM(useRFC033v, "i");
+//MODULE_PARM(useRFC040v, "i");
+MODULE_PARM(useRFC041v, "i");
+//MODULE_PARM(useRFCFixedRate, "i");
+//MODULE_PARM(useVCXO, "i");
+//MODULE_PARM(_no_TS652, "i");
+#if DEBUG
+MODULE_PARM(DebugLevel, "i");
+#endif
+
+static int __init
+unicorn_pci_init(void)
+{
+ int status;
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+ struct pci_dev *pci_dev;
+
+ pci_dev = find_unicorn();
+ if (!pci_dev) {
+ WARN("no PCI cards found\n");
+ return -ENXIO;
+ }
+ // guess type of AFE
+ if (!useAFE) {
+ if (pci_dev->subsystem_device == 0xA888) {
+ useAFE = 70134;
+ } else if (pci_dev->subsystem_device == 0xA889) {
+ useAFE = 20174;
+ } else {
+ useAFE = 20174;
+ }
+
+ }
+ INFO("AFE %ld\n",useAFE);
+
+ pilotRealloc=1;
+ _newCToneDetection_ = 1;
+ setINITIALDAC = 93;
+ if (useAFE == 70134) {
+ _no_TS652 = 0;
+ g_RefGain=28;
+ } else if (useAFE == 70136) {
+ _no_TS652 = 1;
+ g_RefGain=26;
+ } else if (useAFE == 20174) {
+ _no_TS652 = 1;
+ g_RefGain=20;
+ } else {
+ WARN("unknown AFE %ld\n",useAFE);
+ }
+
+ useVCXO = 0;
+
+ useAOCChannel = 2;
+ DownstreamRate = 8128;
+
+ pilotRootPowerWorkAround = TRUE;
+ _gi_step_ = 1;
+ _teq_new_delay_ = 1;
+ //TNumberOfCarrier;
+ highCarrierOff = 240;
+ decreaseHighCarrier = 12;
+ _boostPowerGdmt_ = 1;
+ useRFC019v = 0;
+ useRFC029v = 8000;
+ useRFC040v = 0;
+ useRFCFixedRate = 1;
+ TrainingDelay = 120;
+ ExchangeDelay = 20;
+ _trellisact_ = 1;
+ pvo_pembdpllpolarity=1;
+
+ Interoperability=0;
+
+ INFO("v %d.%d.%d, " __TIME__ " " __DATE__"\n",
+ (VERS>>8)&0xf,(VERS>>4)&0xf,VERS&0xf);
+
+ INFO("MSW parameters: \nActivationMode=%lx\nActTimeout=%ld\nAutoActivation=%ld\nDebugLevel=%ld\nDownstreamRate=%ld\n",
+ ActivationMode,ActTimeout,AutoActivation,DebugLevel,DownstreamRate);
+ INFO("ExchangeDelay=%ld\nFmPollingRate=%ld\ng_RefGain=%ld\ng_Teqmode=%x\nInitTimeout=%ld\nInteroperability=%ld\n",
+ ExchangeDelay,FmPollingRate,g_RefGain,g_TeqMode,InitTimeout,Interoperability);
+ INFO("LCD_Trig=%ld\nLOS_LOF_Trig=%ld\nLoopbackMode=%ld\nMswDebugLevel=%ld\nRetryTime=%ld\nTrainingDelay=%ld\n",
+ LCD_Trig,LOS_LOF_Trig,LoopbackMode,MswDebugLevel,RetryTime,TrainingDelay);
+
+ INFO("useRFC019v=%ld\nuseRFC029v=%ld\nuseRFC040v=%ld\nuseRFC041v=%ld\nsetINITIALDAC=%ld\n",
+ useRFC019v,useRFC029v,useRFC040v,useRFC041v,setINITIALDAC);
+ INFO("useRFCFixedRate=%ld\nuseVCXO=%ld\n_no_TS652=%ld\n",
+ useRFCFixedRate,useVCXO,_no_TS652);
+
+ INFO("driver parameters: DebugLevel=%ld\n",
+ DebugLevel);
+
+ // Initialize RAPI
+ if ((status = rapi_init()) != 0) {
+ WARN("inititalization of RAPI failed\n");
+ return -ENOMEM;
+ }
+
+ // Initialize PCI card
+ if ((status = start_device(dev,pci_dev)) != 0) {
+ WARN("inititalization of PCI failed\n");
+ return status;
+ }
+
+ // Tell ATM driver we are initialized
+ if ((status = unicorn_attach(&unicorn_pci_entrypoints)) != 0) {
+ WARN("inititalization of ATM driver failed\n");
+ return status;
+ }
+
+ // Start the Modem Software
+ if (ActivationMode) {
+ rapi_lock();
+ msw_init(ActivationMode);
+ dev->msw_started = TRUE;
+ xtm_wkafter(100);
+ if (AutoActivation) {
+ msw_start();
+ }
+ rapi_unlock();
+ }
+
+
+ // If loopback mode, no need for line activation to enable ATM
+ if (LoopbackMode) {
+ setShowtime();
+ setAtmRate(1000,1000);
+ }
+ return 0;
+}
+
+static void __exit
+unicorn_pci_cleanup(void)
+{
+ struct unicorn_dev *dev = &unicorn_pci_dev;
+
+ DBG(1,"\n");
+
+ unicorn_detach();
+
+ stop_device(dev);
+
+ rapi_exit();
+
+ INFO("driver removed\n");
+}
+
+module_init(unicorn_pci_init);
+module_exit(unicorn_pci_cleanup);
+
+static struct pci_device_id unicorn_pci_tbl[] __initdata = {
+ {PCI_VENDOR_ID_ST, PCI_DEVICE_ID_UNICORN, PCI_ANY_ID, PCI_ANY_ID},
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE(pci, unicorn_pci_tbl);
+
Added: dists/trunk/modules/unicorn/unicorn/unicorn_usb/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_usb/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,104 @@
+#
+## Makefile for UNICORN USB ADSL Modem
+#
+
+src ?= .
+obj ?= .
+
+ifndef KERNEL_SOURCES
+KERNEL_SOURCES=/usr/src/linux
+endif
+ifndef HPATH
+HPATH=$(KERNEL_SOURCES)/include
+endif
+
+ifndef VERS
+VERS=0
+endif
+
+ifndef KVERS
+KVERS = `uname -r`
+endif
+
+ifndef PATCHLEVEL
+PATCHLEVEL=$(shell grep -s PATCHLEVEL ${KERNEL_SOURCES}/Makefile | head -n 1 | sed s/'PATCHLEVEL = '//)
+endif
+
+ifndef MODDIR
+MODDIR=$(PWD)
+endif
+
+# OPTIONS
+#
+COPTIONS =
+
+# make parameters
+CC=gcc
+LD=ld
+
+INCLUDES := -I$(src)/../include -I$(src)/../
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, add path to kernel includes
+INCLUDES += -I$(HPATH)
+endif
+EXTRA_CFLAGS := -DVERS=$(VERS) -D_USB_DRIVER -DDEBUG=1 $(INCLUDES) $(COPTIONS)
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, need to specify CFLAGS
+CFLAGS := -O2 -fomit-frame-pointer -Wall -Wno-trigraphs -fno-strict-aliasing -fno-common
+EXTRA_CFLAGS += -D__KERNEL__ -DMODULE
+CFLAGS += $(EXTRA_CFLAGS)
+endif
+CXXFLAGS = -fno-rtti -fno-exceptions $(CFLAGS) $(EXTRA_CFLAGS)
+
+OBJS = unicorn_usbdrv.o ../msw/linrapi.o ../msw/msw.o ../msw/crc.o ../amu/amas.o ../amu/amu.o ../amu/bsp_usb.o
+OBJS_ATM = ../unicorn_atm/unicorn_atmdrv.o
+OBJS_ETH = ../unicorn_eth/unicorn_ethdrv.o
+MODEM_LIB = $(src)/../arch/i386/modem_ant_USB_LINUX.o
+LIBM = $(src)/../libm/libm.a
+
+ifeq ($(PATCHLEVEL),4)
+# kernel 2.4, use old build process
+modules: unicorn_usb_atm.o unicorn_usb_eth.o
+modules_install: install_atm install_eth
+else
+# kernel 2.6, use kernel build process
+modules:
+ make CC=$(CC) -C $(KERNEL_SOURCES) SUBDIRS=$(MODDIR) modules
+modules_install:
+ make CC=$(CC) -C $(KERNEL_SOURCES) SUBDIRS=$(MODDIR) modules_install
+endif
+
+obj-m := unicorn_usb_atm.o unicorn_usb_eth.o
+
+unicorn_usb_atm-objs := $(OBJS) $(OBJS_ATM)
+
+unicorn_usb_eth-objs := $(OBJS) $(OBJS_ETH)
+
+EXTRA_LDFLAGS := $(MODEM_LIB) $(LIBM)
+
+unicorn_usb_atm.o: $(unicorn_usb_atm-objs)
+ $(LD) -r $(EXTRA_LDFLAGS) -o $@ $(unicorn_usb_atm-objs)
+
+unicorn_usb_eth.o: $(unicorn_usb_eth-objs)
+ $(LD) -r $(EXTRA_LDFLAGS) -o $@ $(unicorn_usb_eth-objs)
+
+install_atm: unicorn_usb_atm.o
+# remove old versions
+ /bin/rm -f $(DESTDIR)/lib/modules/$(KVERS)/kernel/drivers/atm/unicorn_*.o
+
+ mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/extra
+ cp $^ $(DESTDIR)/lib/modules/$(KVERS)/extra/
+
+install_eth: unicorn_usb_eth.o
+# remove old versions
+ /bin/rm -f $(DESTDIR)/lib/modules/$(KVERS)/kernel/drivers/atm/unicorn_*.o
+
+ mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/extra
+ cp $^ $(DESTDIR)/lib/modules/$(KVERS)/extra/
+
+clean:
+ /bin/rm -f $(unicorn_usb_atm-objs)
+ /bin/rm -f $(unicorn_usb_eth-objs)
+ /bin/rm -f unicorn_usb_atm.* unicorn_usb_eth.*
+ /bin/rm -f .*.cmd
+ /bin/rm -rf .tmp_versions
\ No newline at end of file
Added: dists/trunk/modules/unicorn/unicorn/unicorn_usb/unicorn_usbdrv.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorn_usb/unicorn_usbdrv.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,2355 @@
+/*
+ This driver supports the Unicorn ADSL chipset from STMicroelectronics.
+ The chipset consists of the ADSL DMT transceiver ST70137 and the ST70136
+ Analog Front End (AFE).
+ This file contains the USB specific routines.
+*/
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(CONFIG_MODVERSIONS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <linux/delay.h>
+#include <linux/atmdev.h>
+#include <asm/byteorder.h>
+#include "types.h"
+#include "hal.h"
+#include "hard.h"
+#include "rapi.h"
+#include "amu/amas.h"
+#include "crc.h"
+#include "unicorn.h"
+#include "debug.h"
+
+
+// Compatability stuff
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+typedef struct usb_iso_packet_descriptor iso_packet_descriptor_t;
+#ifndef FILL_BULK_URB
+#define FILL_BULK_URB usb_fill_bulk_urb
+#endif
+#ifndef FILL_INT_URB
+#define FILL_INT_URB usb_fill_int_urb
+#endif
+#ifndef USB_ISO_ASAP
+#define USB_ISO_ASAP URB_ISO_ASAP
+#endif
+#ifndef USB_ST_DATAUNDERRUN
+#define USB_ST_DATAUNDERRUN (-EREMOTEIO)
+#endif
+#ifndef USB_ST_BANDWIDTH_ERROR
+#define USB_ST_BANDWIDTH_ERROR (-ENOSPC) /* too much bandwidth used */
+#endif
+#define ALLOC_URB(iso_pkts) usb_alloc_urb(iso_pkts,GFP_ATOMIC)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20))
+typedef struct iso_packet_descriptor iso_packet_descriptor_t;
+#define ALLOC_URB(iso_pkts) usb_alloc_urb(iso_pkts)
+#else
+#define ALLOC_URB(iso_pkts) usb_alloc_urb(iso_pkts)
+#endif
+
+
+MODULE_AUTHOR ("fisaksen at bewan.com");
+MODULE_DESCRIPTION ("ATM driver for the ST UNICORN ADSL modem.");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("Proprietary");
+#endif
+
+
+// Use alternative setting 1 on interface 0 to use ISOC transfers and optimal speed
+#define ALT_SETTING 1
+// Use alternative setting 4 on interface 0 to use ISOC transfers and least USB bandwidth used
+//#define ALT_SETTING 4
+
+#define RETRY_UNDERRUN 1
+
+/*
+ * Submit an URB with error reporting
+ */
+static int SUBMIT_URB(struct urb* urb)
+{
+ int status;
+ if (urb && !GlobalRemove) {
+ DBG(USB_D,"usb_submit_urb,urb=%p,length=%d\n",urb,urb->transfer_buffer_length);
+ urb->hcpriv = 0;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ status = usb_submit_urb(urb,GFP_ATOMIC);
+#else
+ status = usb_submit_urb(urb);
+#endif
+ if (status < 0) {
+ WARN("usb_submit_urb failed,status=%d\n", status);
+ GlobalRemove = TRUE;
+ }
+ } else {
+ WARN("no urb or GlobalRemove\n");
+ status = -1;
+ }
+ return status;
+}
+
+/*
+ * Unlink an URB with error reporting. This is a macro so
+ * the __FUNCTION__ returns the caller function name.
+ */
+#define UNLINK_URB(urb) \
+({ \
+ int status; \
+ if (urb) { \
+ DBG(USB_D,"usb_unlink_urb,urb=%p,actual_length=%d\n",urb,urb->actual_length); \
+ if ((status = usb_unlink_urb(urb)) < 0) { \
+ DBG(1,"usb_unlink_urb failed,status=%d\n", status); \
+ } \
+ } else { \
+ WARN("no urb\n"); \
+ status = -1; \
+ } \
+ status; \
+})
+
+#if DEBUG
+static void dump_urb(struct urb *urb)
+{
+ int i;
+
+ printk(KERN_DEBUG "hcpriv=%p,dev=%p,pipe=%x,status=%d,transfer_flags=%d\n",
+ urb->hcpriv,urb->dev,urb->pipe,urb->status,urb->transfer_flags);
+ printk(KERN_DEBUG "bandwidth=%d,start_frame=%u,interval=%d,error_count=%d\n",
+ urb->bandwidth,urb->start_frame,urb->interval,urb->error_count);
+ // buffers
+ printk(KERN_DEBUG "transfer_buffer=%p,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->transfer_buffer,urb->transfer_buffer_length,urb->actual_length);
+ for (i=0; i < urb->number_of_packets; i++) {
+ iso_packet_descriptor_t *frame = &urb->iso_frame_desc[i];
+ printk(KERN_DEBUG "[%d],status=%d,actual_length=%d,length=%d,offset=%d\n",
+ i,frame->status,frame->actual_length,frame->length,frame->offset);
+
+ }
+}
+#endif
+
+//#define DUMP_URB(urb) dump_urb(urb)
+#define DUMP_URB(urb)
+
+static void fill_isoc_urb(struct urb *urb, struct usb_device *dev,
+ unsigned int pipe, void *buf, int length, int packet_size, usb_complete_t complete,
+ void *context)
+{
+ spin_lock_init(&urb->lock);
+ urb->dev=dev;
+ urb->pipe=pipe;
+ urb->transfer_buffer=buf;
+ urb->transfer_buffer_length=length;
+ urb->transfer_flags=USB_ISO_ASAP;
+ urb->start_frame = -1;
+ urb->interval = 1;
+ urb->complete=complete;
+ urb->context=context;
+ {
+ iso_packet_descriptor_t *frame = urb->iso_frame_desc;
+ int offset = 0;
+ int num_packets=0;
+
+ while (length) {
+ frame->offset = offset;
+ frame->length = MIN(packet_size,length);
+ frame->actual_length = 0;
+ offset += frame->length;
+ length -= frame->length;
+ num_packets++;
+ frame++;
+ }
+ urb->number_of_packets = num_packets;
+ }
+}
+
+//----------------------------------------------------------------------
+// Macros to read/write the little endian USB bus
+//----------------------------------------------------------------------
+#ifdef __BIG_ENDIAN__
+static inline void USB_SWAP_BUF(WORD *buf,WORD size)
+{
+ int i;
+ for (i=0; i < size; i++)
+ buf[i] = cpu_to_le16(buf[i]);
+}
+#else
+#define USB_SWAP_BUF(buf,size)
+#endif
+
+//----------------------------------------------------------------------
+// driver parameters
+//----------------------------------------------------------------------
+#if DEBUG
+unsigned long DebugLevel=0;
+#endif
+int FrameNumber=0;
+
+
+//----------------------------------------------------------------------
+// MSW paramters
+//----------------------------------------------------------------------
+//unsigned long ActivationMode = MSW_MODE_MULTI;
+unsigned long ActivationMode = MSW_MODE_ANSI;
+
+extern unsigned long ActTimeout;
+extern unsigned long DownstreamRate;
+unsigned long DownstreamRate=3400; // In Kbits/sec
+extern unsigned long eocTrace;
+extern unsigned long ExchangeDelay;
+extern unsigned long FmPollingRate;
+extern unsigned long g_RefGain;
+extern unsigned short g_TeqMode;
+extern unsigned long InitTimeout;
+extern unsigned long Interoperability;
+extern unsigned long LCD_Trig;
+extern unsigned long LOS_LOF_Trig;
+extern unsigned long RetryTime;
+extern unsigned long TrainingDelay;
+//extern unsigned long TruncateMode;
+extern unsigned long useAFE;
+extern unsigned long pilotRealloc;
+extern unsigned long _newCToneDetection_;
+extern unsigned long useRFC019v;
+extern unsigned long useRFC029v;
+//extern unsigned long useRFC033v;
+extern unsigned long useRFC040v;
+extern unsigned long useRFC041v;
+extern unsigned long useRFCFixedRate;
+extern unsigned long useVCXO;
+extern unsigned long _no_TS652;
+extern unsigned long txPower;
+extern unsigned long pollingEoc;
+
+extern unsigned long eocTrace;
+extern unsigned long useAOCChannel;
+extern unsigned long setINITIALDAC;
+
+extern unsigned long pilotRootPowerWorkAround;
+extern unsigned long _gi_step_;
+extern unsigned long _teq_new_delay_;
+extern unsigned long TNumberOfCarrier;
+extern unsigned long highCarrierOff;
+extern unsigned long decreaseHighCarrier;
+extern unsigned long _boostPowerGdmt_;
+extern unsigned long g_ModemState;
+extern unsigned long ep2Enable;
+extern unsigned long ep3Enable;
+
+unsigned long AutoActivation=1;
+unsigned long LoopbackMode=0;
+unsigned long MswDebugLevel=2;
+unsigned long last_report = 0L;
+AMSW_ModemFailure last_failure = C_AMSW_NO_HARDWARE;
+AMSW_ModemEvent last_event = (AMSW_ModemEvent)-1L;
+DWORD adsl_system_time = 0L;
+ADSL_STATUS adsl_status = ADSL_STATUS_NOHARDWARE;
+unsigned short adsl_us_cellrate = 0;
+unsigned short adsl_ds_cellrate = 0;
+
+unsigned long GlobalRemove=0;
+int gLedXmit = 0; // Transmit data indicator
+int gLedRecv = 0; // Receive data indicator
+int gAtmUsbError=0;
+
+
+//ULONG use2Biq = 0; // Relay variable to delay the initilization of BiqCorr
+
+
+
+//----------------------------------------------------------------------
+// Exported functions
+//----------------------------------------------------------------------
+unsigned char *unicorn_snd_getcell(struct unicorn_dev *dev);
+int unicorn_start_transmit(struct unicorn_dev *dev);
+unsigned char *unicorn_rcv_getcell(struct unicorn_dev *dev);
+int unicorn_msw_control(struct unicorn_dev *dev,T_MswCtrl *ctrl);
+ADSL_STATUS unicorn_get_adsl_status(struct unicorn_dev *dev);
+int unicorn_get_adsl_linkspeed(struct unicorn_dev *dev,
+ unsigned long *us_rate,unsigned long *ds_rate);
+
+
+//----------------------------------------------------------------------
+// R/W objects
+//----------------------------------------------------------------------
+#define CELL_LENGTH USB_CELL_LENGTH
+
+struct send_atm {
+ BOOLEAN started;
+ int turn_write; // Current Write buffer
+ int turn_send; // Current sending buffer
+ unsigned char *bufs[ATM_WRITES];
+ int lens[ATM_WRITES];
+ unsigned long busy[ATM_WRITES];
+ int maxlen;
+ int bufofs;
+ unsigned long long cell_count;
+ spinlock_t lock;
+};
+
+struct recv_atm {
+ BOOLEAN started;
+ unsigned char turn_read;
+ unsigned char turn_recv;
+ unsigned char *cells[256];
+ int maxlen;
+ int pipe_index;
+ int num_reads;
+ unsigned long long cell_count;
+ spinlock_t lock;
+};
+
+#define OBC_READ_CMD 0x01 // Set if Read OBC command
+#define OBC_CMD_INT_LO 0x02 // Set after the USB INT_LO interrupt
+#define OBC_CMD_INT 0x04 // Set after the USB OBC interrupt
+#define OBC_WRITE_CPLT 0x08 // Set after the OBC write completion
+#define OBC_READ_CPLT 0x10 // Set after the OBC read IRP completion
+
+#define OBC_LOCK(sem) down(sem)
+#if 0
+#define OBC_LOCK(sem) \
+if (down_trylock(sem)) { \
+ DBG(1,"down_trylock failed\n"); \
+ rapi_unlock(); \
+ down(sem); \
+ rapi_lock(); \
+}
+#endif
+#define OBC_UNLOCK(sem) up(sem)
+
+struct unicorn_dev {
+ struct usb_device *usb_dev;
+ int alternate_setting;
+ struct send_atm send_atm; // US ATM object for transmission
+ struct recv_atm recv_atm; // DS ATM object for transmission
+ struct urb *int_in_pipe[2]; // Endpoint 1
+ struct urb *obc_iso_out; // Endpoint 2
+ struct urb *obc_iso_in; // Endpoint 3
+ struct urb *atm_write[ATM_WRITES]; // ATM US Transfer (EP 4)
+ struct urb *atm_read[ATM_READS]; // ATM DS transfer (EP 5)
+ struct urb *obc_int_out; // Endpoint 6
+ struct urb *obc_int_in; // Endpoint 7
+
+ USB_MEMORY *usb_mem; // Pointer to the USB buffers
+ volatile PBYTE dma_virtual_addr; // DMA buffer virtual address
+ DWORD obc_sem; // To wait for previous OBC command
+ unsigned long obc_flags; // OBC Flags
+ struct semaphore obc_lock;
+ BOOLEAN started;
+ BOOLEAN msw_started; // True if the MSW is (manually) started
+};
+
+struct unicorn_dev unicorn_usb_dev;
+
+struct unicorn_entrypoints unicorn_usb_entrypoints = {
+ &unicorn_usb_dev,
+ unicorn_snd_getcell,
+ unicorn_rcv_getcell,
+ unicorn_start_transmit,
+ unicorn_msw_control,
+ unicorn_get_adsl_status,
+ unicorn_get_adsl_linkspeed
+};
+
+//----------------------------------------------------------------------
+// atm_send_complete:
+//----------------------------------------------------------------------
+static void atm_send_complete(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+
+ DBG(RW_D,"\n");
+
+ t = send_atm->turn_send;
+ if (test_and_clear_bit(0,&send_atm->busy[t])) {
+ send_atm->lens[t] = 0;
+ t = (t+1)&(ATM_WRITES-1);
+ send_atm->turn_send = t;
+ } else {
+ WARN("busy ??\n");
+ }
+}
+
+//----------------------------------------------------------------------
+// ATM US transfer complete
+//----------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void AtmUsXferComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void AtmUsXferComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+
+ DBG(RW_D,"status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+
+ if (urb->status == 0) {
+ atm_send_complete(dev);
+ } else {
+ WARN("status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ atm_send_complete(dev);
+ }
+}
+
+//----------------------------------------------------------------------
+// Start the ATM upstream DMA
+//----------------------------------------------------------------------
+static void StartAtmUsXfer(struct unicorn_dev *dev,int turn,unsigned char *buffer,int length)
+{
+ struct urb *urb = dev->atm_write[turn];
+
+ DBG(RW_D,"(%d,%d)\n",turn,length);
+
+ if (GlobalRemove) return;
+
+ if (dev->alternate_setting != 2) {
+ // Fill the isochronous URB
+ fill_isoc_urb(urb, dev->usb_dev, usb_sndisocpipe(dev->usb_dev,EP_ATM_ISO_OUT),
+ buffer, length,
+ usb_maxpacket(dev->usb_dev,
+ usb_sndisocpipe(dev->usb_dev,EP_ATM_ISO_OUT),1),
+ AtmUsXferComplete, dev);
+ } else {
+ // Fill the bulk URB
+ FILL_BULK_URB(urb, dev->usb_dev, usb_sndbulkpipe(dev->usb_dev,EP_ATM_ISO_OUT),
+ buffer, length,
+ AtmUsXferComplete, dev);
+ }
+ SUBMIT_URB(urb);
+}
+
+//----------------------------------------------------------------------
+// ATM DS transfer complete
+//----------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void AtmDsXferComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void AtmDsXferComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int cells;
+ unsigned char *cell;
+
+ DBG(INTR_D,"status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+
+ if (GlobalRemove) return;
+ if (!recv_atm->started) return;
+
+ if ((urb->status == USB_ST_DATAUNDERRUN) && (urb->actual_length > 0)) urb->status = 0;
+ if (urb->status) {
+ WARN("urb->status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ // try again...
+ }
+
+ if (urb->actual_length > 0) {
+ if (usb_pipeisoc(urb->pipe)) {
+ int i;
+ // ISOC
+ for (i=0; i < urb->number_of_packets; i++) {
+ iso_packet_descriptor_t *frame = &urb->iso_frame_desc[i];
+ cells = frame->actual_length/USB_CELL_LENGTH;
+ cell = (unsigned char *)urb->transfer_buffer+frame->offset;
+ while (cells--) {
+ DBG(RW_D,"turn_recv=%d,cell=%p\n",recv_atm->turn_recv,cell);
+
+ recv_atm->cells[recv_atm->turn_recv++] = cell;
+ cell += USB_CELL_LENGTH;
+ }
+ }
+ } else {
+ // BULK
+ cells = urb->actual_length/USB_CELL_LENGTH;
+ cell = (unsigned char *)urb->transfer_buffer;
+ while (cells--) {
+ DBG(RW_D,"turn_recv=%d,cell=%p\n",recv_atm->turn_recv,cell);
+ // check CRC
+ if (!hecCheck(cell)) {
+ WARN("HEC error\n");
+ gAtmUsbError=1;
+ }
+ recv_atm->cells[recv_atm->turn_recv++] = cell;
+ cell += USB_CELL_LENGTH;
+ }
+ }
+ }
+ urb->dev = dev->usb_dev;
+ urb->transfer_flags = USB_ISO_ASAP;
+ SUBMIT_URB(urb);
+}
+
+//----------------------------------------------------------------------
+// atm_stop_rcv:
+//----------------------------------------------------------------------
+static void atm_stop_rcv(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int i;
+
+ DBG(1,"started=%d\n",recv_atm->started);
+
+ if (!recv_atm->started) return;
+ for (i=0; i < recv_atm->num_reads; i++) {
+ struct urb *urb = dev->atm_read[i];
+ UNLINK_URB(urb);
+ }
+ recv_atm->started = FALSE;
+}
+
+
+//----------------------------------------------------------------------
+// atm_start_rcv
+//----------------------------------------------------------------------
+static void atm_start_rcv(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ int i;
+ unsigned char *buffer;
+ int size;
+ int packet_size;
+
+ if (recv_atm->started) return;
+ recv_atm->turn_recv = 0;
+ recv_atm->turn_read = 0;
+ recv_atm->pipe_index = 0;
+
+ // Initialize the R/W
+ buffer = (unsigned char *)dev->usb_mem->AtmDsBuf;
+ if (dev->alternate_setting != 2) {
+ // ISOC
+ size = ATM_DS_CELLS_PER_PKT*USB_CELL_LENGTH*ATM_DS_ISO_PACKETS;
+ recv_atm->num_reads = ATM_READS;
+ packet_size = usb_maxpacket(dev->usb_dev,usb_rcvisocpipe(dev->usb_dev,EP_ATM_ISO_IN),0);
+ } else {
+ // BULK
+ size = ATM_DS_CELLS_PER_PKT*USB_CELL_LENGTH*1;
+ recv_atm->num_reads = ATM_READS;
+ packet_size = 0;
+ }
+ recv_atm->maxlen = size;
+ recv_atm->cell_count = 0;
+
+ DBG(1,"buffer=%p,size=%d,packet_size=%d,num_reads=%d\n",
+ buffer,size,packet_size,recv_atm->num_reads);
+
+ for (i=0; i < recv_atm->num_reads; i++) {
+ struct urb *urb = dev->atm_read[i];
+
+ if (dev->alternate_setting != 2) {
+ // Fill the isochronous URB
+ fill_isoc_urb(urb, dev->usb_dev, usb_rcvisocpipe(dev->usb_dev,EP_ATM_ISO_IN),
+ buffer+(i*size), recv_atm->maxlen, packet_size,
+ AtmDsXferComplete, dev);
+ SUBMIT_URB(dev->atm_read[i]);
+ } else {
+ // Fill the bulk URB
+ FILL_BULK_URB(urb, dev->usb_dev, usb_rcvbulkpipe(dev->usb_dev,EP_ATM_ISO_IN),
+ buffer+(i*size), recv_atm->maxlen,
+ AtmDsXferComplete, dev);
+ SUBMIT_URB(dev->atm_read[i]);
+ }
+ }
+ recv_atm->started = TRUE;
+}
+
+//----------------------------------------------------------------------
+// atm_stop_snd
+//----------------------------------------------------------------------
+static void atm_stop_snd(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int i;
+
+ DBG(1,"started=%d\n",send_atm->started);
+
+ if (!send_atm->started) return;
+ send_atm->started = FALSE;
+ send_atm->turn_send = 0;
+ send_atm->turn_write = 0;
+
+ for (i=0; i < ATM_WRITES; i++) {
+ send_atm->lens[i] = 0;
+ }
+}
+
+//----------------------------------------------------------------------
+// atm_start_snd
+//----------------------------------------------------------------------
+static void atm_start_snd(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int i;
+ unsigned char *buffer;
+ int size;
+
+ DBG(1,"started=%d\n",send_atm->started);
+
+ if (send_atm->started) return;
+ send_atm->bufofs = 0;
+ send_atm->turn_send = 0;
+ send_atm->turn_write = 0;
+
+ // Initialize the R/W
+ buffer = (unsigned char *)dev->usb_mem->AtmUsBuf;
+ send_atm->maxlen = size = ATM_US_CELLS_PER_PKT*USB_CELL_LENGTH*ATM_US_ISO_PACKETS;
+ for (i=0; i < ATM_WRITES; i++) {
+ send_atm->bufs[i] = buffer+i*size;
+ send_atm->lens[i] = 0;
+ send_atm->busy[i] = 0;
+ }
+ send_atm->cell_count = 0;
+ send_atm->started = TRUE;
+}
+
+
+//======================================================================
+// REPORTS ADSL status from the MSW
+//======================================================================
+
+//----------------------------------------------------------------------
+// Modem Software Event Report for user-mode application
+//----------------------------------------------------------------------
+static const char *get_msw_event_string(AMSW_ModemEvent event)
+{
+ static char s[8];
+
+ switch(event) {
+ case C_AMSW_PEER_ATU_FOUND: return "PEER ATU FOUND";
+ case C_AMSW_RESTART_REQUEST: return "RESTART REQUES";
+ case C_AMSW_ACTIVATION_REQUEST: return "ACTIVATION REQUEST";
+ case C_AMSW_TO_INITIALIZING: return "TO INITIALIZING";
+ case C_AMSW_SHOWTIME: return "AMSW SHOWTIME";
+ case C_AMSW_L3_EXECUTED: return "L3 EXECUTED";
+ case C_AMSW_L3_REJECTED: return "L3 REJECTED";
+ case C_AMSW_L1_EXECUTED: return "L1 REJECTED";
+ case C_AMSW_L1_REJECTED: return "L1 REJECTED";
+ case C_AMSW_L0_REJECTED: return "L0 REJECTED";
+ case C_AMSW_RESTART_ACCEPTABLE: return "RESTART ACCEPTABLE";
+ case C_AMSW_SUICIDE_REQUEST: return "SUICIDE REQUEST";
+ case C_AMSW_RESTART_NOT_ACCEPTABLE: return "RESTART NOT ACCEPTABLE";
+ }
+ sprintf(s,"(%d)",event);
+ return s;
+}
+
+static const char *get_msw_failure_string(AMSW_ModemFailure failure)
+{
+ static char s[8];
+
+ switch(failure) {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS: return "UNCOMPATIBLE LINECONDITION";
+ case C_AMSW_NO_LOCK_POSSIBLE: return "NO LOCK POSSIBLE";
+ case C_AMSW_PROTOCOL_ERROR: return "PROTOCOL ERROR";
+ case C_AMSW_MESSAGE_ERROR: return "MESSAGE ERROR";
+ case C_AMSW_SPURIOUS_ATU_DETECTED: return "SPURIOUS ATU DETECTED";
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE: return "DS REQ BITRATE TOO HIGH FOR LITE";
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE: return "INTERLEAVED PROFILE REQUIRED FOR LITE";
+ case C_AMSW_FORCED_SILENCE: return "FORCED SILENCE";
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE: return "UNSELECTABLE OPERATION MODE";
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN: return "STATE REFUSED BY GOLDEN";
+ }
+ sprintf(s,"(%d)",failure);
+ return s;
+}
+
+static const char *get_msw_state_string(AMSW_ModemState state)
+{
+ static char s[8];
+
+ switch(state) {
+ case C_AMSW_IDLE: return "IDLE";
+ case C_AMSW_L3: return "L3";
+ case C_AMSW_LISTENING: return "LISTENING";
+ case C_AMSW_ACTIVATING: return "ACTIVATING";
+ case C_AMSW_Ghs_HANDSHAKING: return "Ghs HANDSHAKING";
+ case C_AMSW_ANSI_HANDSHAKING: return "ANSI HANDSHAKING";
+ case C_AMSW_INITIALIZING: return "INITIALIZING";
+ case C_AMSW_RESTARTING: return "RESTARTING";
+ case C_AMSW_FAST_RETRAIN: return "FAST RETRAIN";
+ case C_AMSW_SHOWTIME_L0: return "SHOWTIME L0";
+ case C_AMSW_SHOWTIME_LQ: return "SHOWTIME LQ";
+ case C_AMSW_SHOWTIME_L1: return "SHOWTIME L1";
+ case C_AMSW_EXCHANGE: return "EXCHANGE";
+ case C_AMSW_TRUNCATE: return "TRUNCATE";
+ case C_AMSW_ESCAPE: return "ESCAPE";
+ case C_AMSW_DISORDERLY: return "DISORDERLY";
+ case C_AMSW_RETRY: return "RETRY";
+ }
+ sprintf(s,"(%d)",state);
+ return s;
+}
+
+void msw_report_event(DWORD type,DWORD code)
+{
+ DBG(RAPI_D,"type=%ld,code=%ld\n",type,code);
+
+ last_report = (type << 16) | code;
+ switch (type) {
+ case MSW_EVENT_NONE:
+ break;
+ case MSW_EVENT_REPORT:
+ INFO("MSW event: %s\n",get_msw_event_string(code));
+ last_event = code;
+ break;
+ case MSW_EVENT_FAILURE:
+ INFO("MSW failure: %s\n",get_msw_failure_string(code));
+ last_failure = code;
+ break;
+ case MSW_EVENT_STATE:
+ INFO("MSW state: %s\n",get_msw_state_string(code));
+ break;
+ case MSW_EVENT_CANCEL:
+ break;
+ case AMU_EVENT_ACT_TIMEOUT:
+ INFO("AMU_EVENT_ACT_TIMEOUT\n");
+ last_failure = C_AMSW_AMU_EVENT_ACT_TIMEOUT;
+ break;
+ case AMU_EVENT_INI_TIMEOUT:
+ INFO("AMU_EVENT_INI_TIMEOUT\n");
+ last_failure = C_AMSW_AMU_EVENT_INI_TIMEOUT;
+ break;
+ case AMU_EVENT_SHUTDOWN:
+ INFO("AMU_EVENT_SHUTDOWN\n");
+ last_failure = C_AMSW_AMU_EVENT_SHUTDOWN;
+ break;
+ case AMU_EVENT_RETRY:
+ INFO("AMU_EVENT_RETRY\n");
+ last_failure = C_AMSW_EVENT_RETRY;
+ break;
+ }
+}
+
+//----------------------------------------------------------------------
+// Set the showtime FLAG
+//----------------------------------------------------------------------
+void setShowtime(void)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+
+ INFO("AdslStatus=%d\n",adsl_status);
+
+ switch(adsl_status)
+ {
+ case ADSL_STATUS_NOHARDWARE:
+ case ADSL_STATUS_ATMREADY:
+ break;
+ case ADSL_STATUS_NOLINK:
+ adsl_system_time = xtm_gettime();
+ adsl_status = ADSL_STATUS_ATMREADY;
+ dev->recv_atm.cell_count = 0;
+ dev->send_atm.cell_count = 0;
+ atm_start_snd(dev);
+ atm_start_rcv(dev);
+ break;
+ }
+}
+
+//----------------------------------------------------------------------
+// Reset the showtime FLAG
+//----------------------------------------------------------------------
+void resetShowtime(void)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+
+ INFO("AdslStatus=%d\n",adsl_status);
+
+ switch(adsl_status)
+ {
+ case ADSL_STATUS_NOHARDWARE:
+ case ADSL_STATUS_NOLINK:
+ break;
+ case ADSL_STATUS_ATMREADY:
+ adsl_status = ADSL_STATUS_NOLINK;
+ adsl_us_cellrate = 0;
+ adsl_ds_cellrate = 0;
+ atm_stop_snd(dev);
+ atm_stop_rcv(dev);
+ break;
+ }
+}
+
+void HandleAtmError(void)
+{
+ if (gAtmUsbError) {
+ gAtmUsbError = 0;
+ WARN("Reset ATM FIFO\n");
+ USB_controlWrite(UR_CFW,0xA2);
+ USB_controlWrite(UR_CFW,0x22);
+ }
+}
+
+
+// --------------------------------
+// Led monitoring (FHLP 10/30/2001)
+// --------------------------------
+void HandleLeds(void)
+{
+ // called periodic frm AMUTask
+ static WORD Leds = 0;
+ static WORD LastLeds = 0;
+ static int LedDelay = 0;
+
+ // Led monitoring (FHLP 10/30/2001)
+ // --------------------------------
+ switch(g_ModemState)
+ {
+ default:
+ LedDelay = 0;
+ Leds = LED_POWER + LED_INIT;
+ break;
+
+ case C_AMSW_ACTIVATING:
+ case C_AMSW_INITIALIZING:
+ case C_AMSW_Ghs_HANDSHAKING:
+ case C_AMSW_ANSI_HANDSHAKING:
+ if (++LedDelay == 2)
+ {
+ LedDelay = 0;
+ Leds = LED_POWER + LED_INIT;
+ }
+ else
+ {
+ Leds = LED_POWER;
+ }
+ break;
+
+ case C_AMSW_SHOWTIME_L0:
+ case C_AMSW_SHOWTIME_LQ:
+ case C_AMSW_SHOWTIME_L1:
+ Leds = LED_POWER;
+ if (gLedXmit || gLedRecv)
+ {
+ gLedXmit = 0;
+ gLedRecv = 0;
+ Leds += (LastLeds & LED_SHOWTIME) ^ LED_SHOWTIME;
+ }
+ else Leds += LED_SHOWTIME;
+ break;
+ }
+ if (Leds != LastLeds)
+ {
+ USB_controlWrite(UR_GPIO_DATA,Leds);
+ }
+ LastLeds = Leds;
+}
+
+//----------------------------------------------------------------------
+// reports ATM cell rates
+//----------------------------------------------------------------------
+void setAtmRate(
+ unsigned short upRate,
+ unsigned short downRate
+ )
+{
+ INFO("upRate=%dcells/s,downRate=%dcells/s\n",upRate,downRate);
+
+ adsl_us_cellrate = upRate;
+ adsl_ds_cellrate = downRate;
+}
+
+//----------------------------------------------------------------------
+// Copy the TOSCA hardware interrupt table applying a OR to the result
+// This function is called from the hardware ISR
+//----------------------------------------------------------------------
+static void CopyHardIntrTable(struct unicorn_dev *dev,WORD *IntBuf)
+{
+ int i;
+
+ for (i=0; i<14; i++) {
+ tosca_hardITABLE[i] |= cpu_to_le16(IntBuf[i+3]);
+ }
+}
+
+//----------------------------------------------------------------------
+// OBC command interrupt received
+//----------------------------------------------------------------------
+static void ObcCmdCompletion(struct unicorn_dev *dev)
+{
+ DBG(INTR_D,"obc_flags=%02lx\n",dev->obc_flags);
+
+ if ((dev->obc_flags == (OBC_CMD_INT | OBC_CMD_INT_LO | OBC_WRITE_CPLT)) ||
+ (dev->obc_flags == (OBC_CMD_INT | OBC_CMD_INT_LO | OBC_WRITE_CPLT | OBC_READ_CMD | OBC_READ_CPLT))) {
+ dev->obc_flags = 0;
+ xsm_v(dev->obc_sem);
+ }
+
+}
+
+//----------------------------------------------------------------------
+// Interrupt In pipe completion routine
+//----------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void IntInComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void IntInComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+ WORD *IntBuf = urb->transfer_buffer;
+ WORD isdr = cpu_to_le16(IntBuf[0]);
+ WORD mask;
+ WORD isr;
+
+ DBG(INTR_D,"status=%d,actual_length=%d,ISDR=%04x\n",urb->status,urb->actual_length,isdr);
+ if (urb->status == 0) {
+ // ok
+ } else if (urb->status == USB_ST_DATAUNDERRUN) {
+ // retry
+ WARN("retry,status=%d\n",urb->status);
+ goto retry;
+ } else {
+ // fatal error
+ WARN("fatal error,status=%d\n",urb->status);
+ GlobalRemove = TRUE;
+ dev->started = FALSE;
+ urb->dev = dev->usb_dev;
+ urb->interval = 0;
+ //UNLINK_URB(urb);
+ return;
+ }
+ if ((urb->actual_length != 2) && (urb->actual_length != 6) && (urb->actual_length != 34)) {
+ WARN("actual_length=%d\n",urb->actual_length);
+ goto retry;
+ }
+
+ // ACTD interrupt
+ if (isdr & UISDR_ACTDIF) {
+ WARN("ACTD interrupt\n");
+ }
+
+ // INT_LO interrupt
+ if (isdr & UISDR_INT_LO) {
+ DBG(INTR_D,"INT_LO interrupt\n");
+ dev->obc_flags |= OBC_CMD_INT_LO;
+ ObcCmdCompletion(dev);
+ }
+
+ // Utopia FIFO interrupts
+ if (isdr & UISDR_UTIRQ1) {
+ DBG(INTR_D,"Utopia rising edge FIFO interrupt\n");
+ }
+ if (isdr & UISDR_UTIRQ2) {
+ DBG(INTR_D,("Utopia falling edge FIFO interrupt\n"));
+ }
+
+ // Error interrupts
+ if (isdr & UISDR_ERF) {
+ if (isdr & UISDR_ERR_ATM) {
+ WARN("ATM Operation Error interrupt\n");
+ gAtmUsbError = 1;
+ }
+ if (isdr & UISDR_ERR_OBC) {
+ WARN("WR OBC Operation Error interrupt\n");
+ }
+ if (isdr & UISDR_ERR_PIPE) {
+ WARN("ERROR: WR OBC Access Error interrupt\n");
+ }
+ }
+
+ // ADSL interrupts
+ mask = UISDR_TIRQ1 | UISDR_TIRQ2;
+ if (isdr & mask) {
+
+ isr = cpu_to_le16(IntBuf[1]);
+ DBG(INTR_D,"ADSL uP Interrupt,ISR = %04x\n",isr);
+
+ // TOSCA macrocell interrupt
+ mask = ISR_TOIFS;
+ if (isr & mask) {
+ if (urb->actual_length >= 34) {
+ DBG(INTR_D,("TOSCA macrocell interrupt\n"));
+ CopyHardIntrTable(dev,IntBuf);
+ tosca_interrupt();
+ } else {
+ DBG(INTR_D,"TOSCA macrocell interrupt, too short, actual_length=%d\n",urb->actual_length);
+ }
+ }
+
+ // Timer interrupt
+ mask = ISR_TIMIF;
+ if (isr & mask) {
+ WARN("Timer interrupt\n");
+ }
+
+ // GPIO interrupt
+ mask = ISR_GPIFA | ISR_GPIFB;
+ if (isr & mask) {
+ WARN("GPIO interrupt\n");
+ }
+
+ // OBC Slave Command Complete interrupt
+ mask = ISR_OSIF;
+ if (isr & mask){
+ DBG(INTR_D,"OBC Slave Command Complete interrupt\n");
+ dev->obc_flags |= (OBC_CMD_INT | OBC_CMD_INT_LO);
+ ObcCmdCompletion(dev);
+ }
+
+ // OBC Master Command Complete interrupt
+ mask = ISR_OMIF;
+ if (isr & mask) {
+ DBG(INTR_D,"OBC Master Command Complete interrupt\n");
+ dev->obc_flags |= OBC_CMD_INT;
+ ObcCmdCompletion(dev);
+ }
+ }
+retry:
+ // Prepare URB for next transfer
+ urb->dev = dev->usb_dev;
+ urb->status = 0;
+ urb->actual_length = 0;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ SUBMIT_URB(urb);
+#endif
+ return;
+}
+
+//=====================================================================
+// FUNCTIONS TO ACCESS THE HARDWARE
+//======================================================================
+
+
+//----------------------------------------------------------------------
+// Starts the hardware
+//----------------------------------------------------------------------
+static ST_STATUS start_hardware(struct unicorn_dev *dev)
+{
+ DBG(1,"\n");
+
+ // Initialize the USB Configuration register
+ if (USB_controlWrite(UR_CFW,0x22) == FAILURE) {
+ WARN("USB_controlWrite(UR_CFW) failed\n");
+ return FAILURE;
+ }
+
+ // Initialize the UR_IADR_IRQ register
+ if (USB_controlWrite(UR_IADR_IRQ,0x100) == FAILURE) {
+ WARN("USB_controlWrite(UR_IADR_IRQ) failed\n");
+ return FAILURE;
+ }
+
+ // Initialize the ADSL uP Interrupt register
+ if (USB_controlWrite(UR_ISR,
+ ISR_OSIE | ISR_OMIE | ISR_TOIES) == FAILURE) {
+ WARN("USB_controlWrite(UR_ISR) failed\n");
+ return FAILURE;
+ }
+
+ // Initialize the USB Interrupt & Data register
+ if (USB_controlWrite(UR_ISDR,
+ UISDR_IE | UISDR_LOE |
+ UISDR_TIE1 | UISDR_TIE2 | UISDR_UTIE1 | UISDR_UTIE2) == FAILURE) {
+ WARN("USB_controlWrite(UR_ISDR) failed\n");
+ return FAILURE;
+ }
+
+ // LED initialization
+ USB_controlWrite(UR_GPIO_DIR,0xFFF1); // Activate GPIO for leds
+ USB_controlWrite(UR_GPIO_DATA,0x0E00); // Leds are off
+
+ return SUCCESS;
+}
+
+//----------------------------------------------------------------------
+// Stops the hardware
+//----------------------------------------------------------------------
+static void stop_hardware(struct unicorn_dev *dev)
+{
+ DBG(1,"\n");
+
+ USB_controlWrite(UR_ISDR,0);
+ USB_controlWrite(UR_ISR,0);
+ USB_controlWrite(UR_CFW,0x1800);
+ USB_controlWrite(UR_GPIO_DATA,0); // Leds are off
+}
+
+//----------------------------------------------------------------------
+// Sets the MSW parameters to correct values
+//----------------------------------------------------------------------
+static void set_msw_params(void)
+{
+ if (!useAFE) useAFE=20174;
+ if (useAFE == 70136) {
+ setINITIALDAC = 93;
+ g_RefGain = 38;
+ txPower = 10;
+ } else if (useAFE == 20174) {
+ setINITIALDAC = 0;
+ g_RefGain = 22;
+ txPower = 14;
+ } else {
+ WARN("unknown AFE %ld\n",useAFE);
+ }
+ _no_TS652 = 1;
+ useVCXO = 0;
+
+ useAOCChannel = 0;
+ pollingEoc = 1;
+
+ pilotRootPowerWorkAround = TRUE;
+ _gi_step_ = 1;
+ _teq_new_delay_ = 1;
+ //TNumberOfCarrier;
+ highCarrierOff = 230;
+ decreaseHighCarrier = 12;
+ _boostPowerGdmt_ = 1;
+ useRFC019v = 0;
+ useRFC029v = 8000;
+ useRFC040v = 0;
+ useRFCFixedRate = 1;
+
+ ep2Enable = 0;
+ ep3Enable = 0;
+ pilotRealloc=0;
+ //_newCToneDetection_=1;
+
+ //Interoperability = 1;
+
+ INFO("MSW parameters: \nActivationMode=%lx\nActTimeout=%ld\nAutoActivation=%ld\nDebugLevel=%ld\nDownstreamRate=%ld\n",
+ ActivationMode,ActTimeout,AutoActivation,DebugLevel,DownstreamRate);
+ INFO("ExchangeDelay=%ld\nFmPollingRate=%ld\ng_RefGain=%ld\ng_Teqmode=%x\nInitTimeout=%ld\nInteroperability=%ld\n",
+ ExchangeDelay,FmPollingRate,g_RefGain,g_TeqMode,InitTimeout,Interoperability);
+ INFO("LCD_Trig=%ld\nLOS_LOF_Trig=%ld\nLoopbackMode=%ld\nMswDebugLevel=%ld\nRetryTime=%ld\nTrainingDelay=%ld\n",
+ LCD_Trig,LOS_LOF_Trig,LoopbackMode,MswDebugLevel,RetryTime,TrainingDelay);
+
+ INFO("useRFC019v=%ld\nuseRFC029v=%ld\nuseRFC040v=%ld\nuseRFC041v=%ld\nsetINITIALDAC=%ld\n",
+ useRFC019v,useRFC029v,useRFC040v,useRFC041v,setINITIALDAC);
+
+ INFO("useRFCFixedRate=%ld\nuseVCXO=%ld\n_no_TS652=%ld\nuseAFE=%ld\ntxPower=%ld\n",
+ useRFCFixedRate,useVCXO,_no_TS652,useAFE,txPower);
+}
+
+//----------------------------------------------------------------------
+// Start the USB device
+//----------------------------------------------------------------------
+static int start_device(struct unicorn_dev *dev,struct usb_device *usb_dev)
+{
+ int status;
+ struct urb *urb;
+ int i;
+
+ dev->usb_dev = usb_dev;
+
+ // Select alternate setting to match speed/bandwidth used
+ dev->alternate_setting = ALT_SETTING;
+
+ if ((status = usb_set_interface (usb_dev, 0, dev->alternate_setting)) < 0) {
+ if (status == USB_ST_BANDWIDTH_ERROR) {
+ WARN("insufficient USB bandwidth\n");
+ return status;
+ } else {
+ WARN("usb_set_interface (alt %d) failed,status=%d\n",
+ dev->alternate_setting,status);
+ return status;
+ }
+ }
+
+ //============================
+ // Initialize the USB pipes...
+ //============================
+
+ // EP_INTERRUPT
+ for (i=0; i < 2; i++) {
+ if ((urb = ALLOC_URB(0)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->int_in_pipe[i] = urb;
+ }
+
+ // EP_OBC_ISO_OUT
+ if ((urb = ALLOC_URB(MAX_ISO_PACKETS)) == NULL) {
+ WARN("usb_alloc_urbfailed\n");
+ return -ENOMEM;
+ }
+ dev->obc_iso_out = urb;
+
+ // EP_OBC_ISO_IN
+ if ((urb = ALLOC_URB(MAX_ISO_PACKETS)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->obc_iso_in = urb;
+
+ // EP_ATM_ISO_OUT
+ for (i=0; i < ATM_WRITES; i++) {
+ if ((urb = ALLOC_URB(MAX_ISO_PACKETS)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->atm_write[i] = urb;
+ }
+
+ // EP_ATM_ISO_IN
+ for (i=0; i < ATM_READS; i++) {
+ if ((urb = ALLOC_URB(MAX_ISO_PACKETS)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->atm_read[i] = urb;
+ }
+
+ // EP_OBC_INT_OUT
+ if ((urb = ALLOC_URB(0)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->obc_int_out = urb;
+
+ // EP_OBC_INT_IN
+ if ((urb = ALLOC_URB(0)) == NULL) {
+ WARN("usb_alloc_urb failed\n");
+ return -ENOMEM;
+ }
+ dev->obc_int_in = urb;
+
+ // Allocate memory
+ if ((dev->usb_mem = kmalloc(sizeof(USB_MEMORY),GFP_DMA)) == NULL) {
+ WARN("kmalloc failed\n");
+ return -1;
+ }
+
+ // Initialize OBC objects
+ init_MUTEX(&dev->obc_lock);
+ if ((xsm_create("OBC ",0,0,&dev->obc_sem)) != SUCCESS) {
+ return -1;
+ }
+
+ for (i=0; i < 1; i++) {
+ urb = dev->int_in_pipe[i];
+ // Fill the interrupt URB ...
+ FILL_INT_URB(urb, usb_dev,
+ usb_rcvintpipe(usb_dev, EP_INTERRUPT),
+ dev->usb_mem->IntBuf[i],sizeof(dev->usb_mem->IntBuf[i]),
+ IntInComplete,dev,1);
+
+ // ... and start it
+ SUBMIT_URB(urb);
+ }
+
+ // Start the Hardware Device
+ start_hardware(dev);
+
+ dev->started = TRUE;
+ adsl_status = ADSL_STATUS_NOLINK;
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Stop the USB device
+//----------------------------------------------------------------------
+static void stop_device(struct unicorn_dev *dev)
+{
+ struct urb *urb;
+ int i;
+
+ DBG(1,"\n");
+
+ adsl_status = ADSL_STATUS_NOHARDWARE;
+
+ // Stop receiving and transmitting
+ atm_stop_rcv(dev);
+ atm_stop_snd(dev);
+
+ // Shutdown the Modem Software
+ if (dev->started) {
+ if (dev->msw_started) {
+ rapi_lock();
+ msw_stop();
+ msw_exit();
+ rapi_unlock();
+ dev->msw_started = FALSE;
+ }
+ dev->started = FALSE;
+ }
+
+ if (!GlobalRemove) {
+ stop_hardware(dev);
+ }
+
+ //============================
+ // Terminate the USB pipes...
+ //============================
+
+ // EP_INTERRUPT
+ for (i=0; i < 2; i++) {
+ if ((urb = dev->int_in_pipe[i])) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->int_in_pipe[i] = NULL;
+ }
+ }
+
+ // EP_OBC_ISO_OUT
+ if ((urb = dev->obc_iso_out)) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->obc_iso_out = NULL;
+ }
+
+ // EP_OBC_ISO_IN
+ if ((urb = dev->obc_iso_in)) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->obc_iso_in = NULL;
+ }
+
+ // EP_ATM_ISO_OUT
+ for (i=0; i < ATM_WRITES; i++) {
+ if ((urb = dev->atm_write[i])) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->atm_write[i] = NULL;
+ }
+ }
+
+ // EP_ATM_ISO_IN
+ for (i=0; i < ATM_READS; i++) {
+ if ((urb = dev->atm_read[i])) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->atm_read[i] = NULL;
+ }
+ }
+
+ // EP_OBC_INT_OUT
+ if ((urb = dev->obc_int_out)) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->obc_int_out = NULL;
+ }
+
+ // EP_OBC_INT_IN
+ if ((urb = dev->obc_int_in)) {
+ usb_unlink_urb(urb);
+ usb_free_urb(urb);
+ dev->obc_int_in = NULL;
+ }
+ if (dev->usb_mem) {
+ kfree(dev->usb_mem);
+ dev->usb_mem = NULL;
+ }
+
+}
+
+//----------------------------------------------------------------------
+// CheckObcBuffer:
+//----------------------------------------------------------------------
+static BOOLEAN CheckObcBuffer(struct unicorn_dev *dev,WORD *buf,UINT n)
+{
+ PBYTE p = (PBYTE)buf + n*sizeof(WORD);
+ if (GlobalRemove) return FALSE;
+ if (p < dev->dma_virtual_addr) return FALSE;
+ if (p > dev->dma_virtual_addr+offsetof(USB_MEMORY,AtmUsBuf)) return FALSE;
+ return TRUE;
+}
+
+//----------------------------------------------------------------------
+// Waits for OBC command complete
+//----------------------------------------------------------------------
+static ST_STATUS WaitForObcCmdComplete(struct unicorn_dev *dev)
+{
+ // wait for semaphore to be free
+ if (xsm_p(dev->obc_sem, 0, OBC_CMD_TIMEOUT) != SUCCESS) {
+ WARN("wait for obc failed (timed out),obc_flags=%02lx\n",dev->obc_flags);
+ dev->obc_flags = 0;
+ return FAILURE;
+ }
+ return SUCCESS;
+}
+
+//-----------------------------------------------------------------------------
+// ObcWriteIsocComplete:
+//-----------------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void ObcWriteIsocComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void ObcWriteIsocComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+
+ DBG(INTR_D,"status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+
+ if (urb->transfer_buffer_length == urb->actual_length) urb->status = 0;
+
+ if (urb->status == 0) {
+ dev->obc_flags |= OBC_WRITE_CPLT;
+ ObcCmdCompletion(dev);
+ } else {
+ WARN("status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ //GlobalRemove = TRUE;
+ }
+}
+
+//-----------------------------------------------------------------------------
+// ObcWriteIntComplete:
+//-----------------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void ObcWriteIntComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void ObcWriteIntComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+
+ DBG(INTR_D,"status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+
+ if (urb->transfer_buffer_length == urb->actual_length) urb->status = 0;
+
+ if (urb->status == 0) {
+ dev->obc_flags |= OBC_WRITE_CPLT;
+ ObcCmdCompletion(dev);
+ } else {
+ WARN("status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ //GlobalRemove = TRUE;
+ }
+ urb->interval = 0; // set this to 0 to avoid to be re-scheduled
+}
+
+//-----------------------------------------------------------------------------
+// ObcReadIsocComplete:
+//-----------------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void ObcReadIsocComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void ObcReadIsocComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+
+ DBG(INTR_D,"status=%d,transfer_buffer_length=%d,actual_length=%d,start_frame=%u\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length,urb->start_frame);
+
+ if (GlobalRemove) return;
+ if ((urb->status == USB_ST_DATAUNDERRUN) && (urb->actual_length > 0)) urb->status = 0;
+ if ((urb->status == 0) && (urb->actual_length == 0)) urb->status = USB_ST_DATAUNDERRUN;
+
+ if (urb->status == 0) {
+ dev->obc_flags |= OBC_READ_CPLT;
+ ObcCmdCompletion(dev);
+#if RETRY_UNDERRUN
+ } else if (urb->status == USB_ST_DATAUNDERRUN) {
+ WARN("retry,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->transfer_buffer_length,urb->actual_length);
+ urb->dev = dev->usb_dev;
+ if (FrameNumber) {
+ urb->transfer_flags = 0;
+ urb->start_frame = usb_get_current_frame_number(dev->usb_dev)+FrameNumber;
+ } else {
+ urb->transfer_flags = USB_ISO_ASAP;
+ }
+ SUBMIT_URB(urb);
+#endif
+ } else {
+ WARN("status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ //GlobalRemove = TRUE;
+ }
+}
+
+//-----------------------------------------------------------------------------
+// ObcReadIntComplete:
+//-----------------------------------------------------------------------------
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void ObcReadIntComplete(struct urb *urb,struct pt_regs *pt_regs)
+#else
+static void ObcReadIntComplete(struct urb *urb)
+#endif
+{
+ struct unicorn_dev *dev = (struct unicorn_dev *)urb->context;
+
+ DBG(INTR_D,"status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+
+ if (GlobalRemove) return;
+ if (urb->actual_length == urb->transfer_buffer_length) urb->status=0;
+
+ if (urb->status == 0) {
+ dev->obc_flags |= OBC_READ_CPLT;
+ ObcCmdCompletion(dev);
+ } else {
+ WARN("status=%d,transfer_buffer_length=%d,actual_length=%d\n",
+ urb->status,urb->transfer_buffer_length,urb->actual_length);
+ //GlobalRemove = TRUE;
+ }
+ urb->interval = 0; // set this to 0 to avoid to be re-scheduled
+}
+
+//-----------------------------------------------------------------------------
+// USB_init:
+//-----------------------------------------------------------------------------
+ST_STATUS USB_init(
+ WORD **CMDptrW1,WORD **CMDptrW2,WORD **CMDptrRd,
+ WORD **CMDptrW_I1,WORD **CMDptrW_I2,WORD **CMDptrRd_I,
+ WORD **ITABLEptr,WORD **IMASKptr,T_EpSettings *ep_setting
+ )
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ PBYTE p = (PBYTE)dev->usb_mem;
+
+ DBG(1,"dev=%p\n",dev);
+
+ DBG(USB_D,"dma_virtual_addr=%p\n",p);
+
+ dev->dma_virtual_addr = p;
+ *CMDptrW1 = (PWORD)(p + offsetof(USB_MEMORY,CmdBufW1));
+ *CMDptrW2 = (PWORD)(p + offsetof(USB_MEMORY,CmdBufW2));
+ *CMDptrRd = (PWORD)(p + offsetof(USB_MEMORY,CmdBufRd));
+ *CMDptrW_I1 = (PWORD)(p + offsetof(USB_MEMORY,CmdBufW_I1));
+ *CMDptrW_I2 = (PWORD)(p + offsetof(USB_MEMORY,CmdBufW_I2));
+ *CMDptrRd_I = (PWORD)(p + offsetof(USB_MEMORY,CmdBufRd_I));
+
+ ep_setting->ep0_size = dev->usb_dev->descriptor.bMaxPacketSize0;
+ ep_setting->ep1_size = usb_maxpacket(dev->usb_dev,usb_rcvintpipe(dev->usb_dev,EP_INTERRUPT),0);
+ ep_setting->ep2_size = usb_maxpacket(dev->usb_dev,usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),1);
+ ep_setting->ep3_size = usb_maxpacket(dev->usb_dev,usb_rcvisocpipe(dev->usb_dev,EP_OBC_ISO_IN),0);
+ ep_setting->ep4_size = usb_maxpacket(dev->usb_dev,usb_sndisocpipe(dev->usb_dev,EP_ATM_ISO_OUT),1);
+ ep_setting->ep5_size = usb_maxpacket(dev->usb_dev,usb_rcvisocpipe(dev->usb_dev,EP_ATM_ISO_IN),0);
+ ep_setting->ep6_size = usb_maxpacket(dev->usb_dev,usb_sndintpipe(dev->usb_dev,EP_OBC_INT_OUT),1);
+ ep_setting->ep7_size = usb_maxpacket(dev->usb_dev,usb_rcvintpipe(dev->usb_dev,EP_OBC_INT_IN),0);
+ DBG(USB_D,"max packet size,ep0 %d,ep1 %d,ep2 %d,ep3 %d,ep4 %d,ep5 %d,ep6 %d,ep7 %d\n",
+ ep_setting->ep0_size,ep_setting->ep1_size,ep_setting->ep2_size,ep_setting->ep3_size,
+ ep_setting->ep4_size,ep_setting->ep5_size,ep_setting->ep6_size,ep_setting->ep7_size);
+
+ *ITABLEptr = tosca_softITABLE;
+ *IMASKptr = tosca_softITABLE + 14;
+ return SUCCESS;
+}
+
+//-----------------------------------------------------------------------------
+// USB_controlRead:
+// Read an USB register
+//-----------------------------------------------------------------------------
+ST_STATUS USB_controlRead(BYTE addr,WORD *data)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ int err;
+
+ err = usb_control_msg(dev->usb_dev,usb_rcvctrlpipe(dev->usb_dev,0),
+ addr,USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ 0,0,data,sizeof(WORD),HZ);
+ if (err < 0) {
+ goto fail;
+ }
+ le16_to_cpus(data);
+ DBG(USB_D,"addr=%02x,data=%04x\n",addr,*data);
+ return SUCCESS;
+
+fail:
+ WARN("err=%d\n",err);
+ return FAILURE;
+}
+
+//-----------------------------------------------------------------------------
+// USB_controlWrite:
+// Write to an USB register
+//-----------------------------------------------------------------------------
+ST_STATUS USB_controlWrite(BYTE addr,WORD data)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ int err;
+
+ DBG(USB_D,"addr=%02x,data=%04x\n",addr,data);
+
+ err = usb_control_msg(dev->usb_dev,usb_sndctrlpipe(dev->usb_dev,0),
+ addr,0x40,
+ data,0,NULL,0,HZ);
+ if (err < 0) {
+ goto fail;
+ }
+ return SUCCESS;
+
+fail:
+ WARN("err=%d\n",err);
+ return FAILURE;
+}
+
+//----------------------------------------------------------------------
+// ObcReset
+//----------------------------------------------------------------------
+static void ObcReset(void)
+{
+ // Force STOP ACCESS in status register and OBC FIFO clear pulse
+ WORD data;
+
+ if (GlobalRemove) return;
+
+ WARN("Resetting OBC...\n");
+ if(USB_controlRead(UR_STATUS,&data) == SUCCESS) {
+ USB_controlWrite(UR_STATUS,(data&~3)|0x200);
+ }
+}
+
+#define MAX_RETRIES 2
+
+//-----------------------------------------------------------------------------
+// USB_S_Write:
+//-----------------------------------------------------------------------------
+ST_STATUS USB_S_Write(T_ShortWrite *dataPtr,T_EpOut ep_out)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ struct urb *urb;
+ int retry;
+ ST_STATUS status;
+ int err;
+
+ if (!CheckObcBuffer(dev,dataPtr->cmdBuff,dataPtr->frameSize)) return FAILURE;
+
+ if ((ep_out != EP2) && (ep_out != EP6)) {
+ WARN(("Invalid ep_out parameter\n"));
+ return FAILURE;
+ }
+
+ OBC_LOCK(&dev->obc_lock);
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,dataPtr->frameSize);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ DBG(USB_D,"cmdBuff=%p,frameSize=%d,ep_out=%d\n",dataPtr->cmdBuff,dataPtr->frameSize,ep_out);
+
+ dev->obc_flags = 0x00;
+
+ if (ep_out == EP2) {
+ // ISOC
+ urb = dev->obc_iso_out;
+ // Build ISOC descriptor
+ fill_isoc_urb(urb, dev->usb_dev, usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),
+ dataPtr->cmdBuff, dataPtr->frameSize*sizeof(WORD),
+ usb_maxpacket(dev->usb_dev,
+ usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),1),
+ ObcWriteIsocComplete, dev);
+ } else {
+ // Int
+ urb = dev->obc_int_out;
+
+ FILL_INT_URB(urb, dev->usb_dev, usb_sndintpipe(dev->usb_dev,EP_OBC_INT_OUT),
+ dataPtr->cmdBuff, dataPtr->frameSize*sizeof(WORD),
+ ObcWriteIntComplete, dev, 1);
+ }
+
+ err = SUBMIT_URB(urb);
+ if (err < 0) {
+ status = FAILURE;
+ goto fail;
+ }
+
+ status = WaitForObcCmdComplete(dev);
+ if (status == FAILURE) {
+ DBG(USB_D,"cmdBuff=%p,frameSize=%d,ep_out=%d\n",dataPtr->cmdBuff,dataPtr->frameSize,ep_out);
+ DUMP_URB(urb);
+ urb->dev = dev->usb_dev,
+ urb->interval = 0,
+ UNLINK_URB(urb);
+ ObcReset();
+ } else {
+ break;
+ }
+ }
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,dataPtr->frameSize);
+fail:
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//-----------------------------------------------------------------------------
+// USB_L_Write:
+//-----------------------------------------------------------------------------
+ST_STATUS USB_L_Write(T_LongWrite *dataPtr,T_EpOut ep_out)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ ULONG size = (dataPtr->nFrames-1)*dataPtr->frameSize + dataPtr->lastFrameSize;
+ struct urb *urb;
+ int retry;
+ ST_STATUS status;
+ int err;
+
+ if (!CheckObcBuffer(dev,dataPtr->cmdBuff,size)) return FAILURE;
+
+ if ((ep_out != EP2) && (ep_out != EP6)) {
+ WARN(("Invalid ep_out parameter\n"));
+ return FAILURE;
+ }
+
+ OBC_LOCK(&dev->obc_lock);
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,size);
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ DBG(USB_D,"cmdBuff=%p,nFrames=%d,frameSize=%d,lastFrameSize=%d,ep_out=%d\n",
+ dataPtr->cmdBuff,dataPtr->nFrames,dataPtr->frameSize,dataPtr->lastFrameSize,ep_out);
+
+ dev->obc_flags = 0x00;
+
+ if (ep_out == EP2) {
+ // ISOC
+ urb = dev->obc_iso_out;
+ // Build ISOC descriptor
+ fill_isoc_urb(urb, dev->usb_dev, usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),
+ dataPtr->cmdBuff, size*sizeof(WORD),
+ dataPtr->frameSize*sizeof(WORD),
+ ObcWriteIsocComplete, dev);
+
+
+ } else {
+ // Interrupt
+ urb = dev->obc_int_out;
+
+ FILL_INT_URB(urb, dev->usb_dev, usb_sndintpipe(dev->usb_dev,EP_OBC_INT_OUT),
+ dataPtr->cmdBuff, size*sizeof(WORD),
+ ObcWriteIntComplete, dev, 1);
+ }
+ err = SUBMIT_URB(urb);
+ if (err < 0) {
+ status = FAILURE;
+ goto fail;
+ }
+
+ status = WaitForObcCmdComplete(dev);
+ if (status == FAILURE) {
+ DBG(USB_D,"cmdBuff=%p,nFrames=%d,frameSize=%d,lastFrameSize=%d,ep_out=%d\n",
+ dataPtr->cmdBuff,dataPtr->nFrames,dataPtr->frameSize,dataPtr->lastFrameSize,ep_out);
+ DUMP_URB(urb);
+ urb->dev = dev->usb_dev;
+ urb->interval = 0;
+ UNLINK_URB(urb);
+ ObcReset();
+ } else {
+ break;
+ }
+ }
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,size);
+fail:
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+
+}
+
+//-----------------------------------------------------------------------------
+// USB_Read:
+//-----------------------------------------------------------------------------
+ST_STATUS USB_Read(T_ReadData *dataPtr,T_EpOut ep_out,T_EpIn ep_in)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ BOOLEAN isoIn;
+ PWORD ptr;
+ struct urb *read_urb,*write_urb;
+ int retry;
+ ST_STATUS status;
+ int err;
+
+ if (!CheckObcBuffer(dev,dataPtr->cmdBuff,dataPtr->wrSize)) return FAILURE;
+
+ if ((ep_out != EP2) && (ep_out != EP6)) {
+ WARN("Invalid ep_out parameter\n");
+ return FAILURE;
+ }
+
+ if ((ep_in != EP3) && (ep_in != EP7) && (ep_in != EP5)) {
+ WARN("Invalid ep_in parameter\n");
+ return FAILURE;
+ }
+
+ OBC_LOCK(&dev->obc_lock);
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,dataPtr->wrSize);
+
+
+ for (retry=0; retry < MAX_RETRIES; retry++) {
+
+ DBG(USB_D,"cmdBuff=%p,wrSize=%d,rdSize=%d,ep_out=%d,ep_in=%d\n",
+ dataPtr->cmdBuff,dataPtr->wrSize,dataPtr->rdSize,ep_out,ep_in);
+
+ dev->obc_flags = OBC_READ_CMD;
+
+ ptr = USB_checkIntContext() ? dev->usb_mem->CmdBufRd_I : dev->usb_mem->CmdBufRd;
+
+ if ((ep_in == EP3) || (ep_in == EP5)) {
+ int packet_size;
+ int ep = ep_in == EP3 ? EP_OBC_ISO_IN : EP_ATM_ISO_IN;
+ read_urb = dev->obc_iso_in;
+ isoIn = TRUE;
+ // Build ISOC descriptor
+ packet_size = usb_maxpacket(dev->usb_dev,usb_rcvisocpipe(dev->usb_dev,ep),0);
+ fill_isoc_urb(read_urb, dev->usb_dev, usb_rcvisocpipe(dev->usb_dev,ep),
+ ptr, dataPtr->rdSize*sizeof(WORD),
+ packet_size,
+ ObcReadIsocComplete, dev);
+ } else {
+ read_urb = dev->obc_int_in;
+
+ isoIn = FALSE;
+
+ FILL_INT_URB(read_urb, dev->usb_dev, usb_rcvintpipe(dev->usb_dev,EP_OBC_INT_IN),
+ ptr, dataPtr->rdSize*sizeof(WORD),
+ ObcReadIntComplete, dev, 1);
+ err = SUBMIT_URB(read_urb);
+ if (err < 0) {
+ status = FAILURE;
+ goto fail;
+ }
+ }
+
+ if (ep_out == EP2) {
+ // ISOC
+ int packet_size;
+ write_urb = dev->obc_iso_out;
+
+ // Build ISOC descriptor
+ packet_size = usb_maxpacket(dev->usb_dev,
+ usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),1);
+ fill_isoc_urb(write_urb, dev->usb_dev, usb_sndisocpipe(dev->usb_dev,EP_OBC_ISO_OUT),
+ dataPtr->cmdBuff, dataPtr->wrSize*sizeof(WORD),
+ packet_size,
+ ObcWriteIsocComplete, dev);
+ } else {
+ // Interrupt
+ write_urb = dev->obc_int_out;
+
+ FILL_INT_URB(write_urb, dev->usb_dev, usb_sndintpipe(dev->usb_dev,EP_OBC_INT_OUT),
+ dataPtr->cmdBuff, dataPtr->wrSize*sizeof(WORD),
+ ObcWriteIntComplete, dev, 1);
+
+ }
+
+ err = SUBMIT_URB(write_urb);
+ if (err < 0) {
+ status = FAILURE;
+ goto fail;
+ }
+
+ if (isoIn) {
+ if (FrameNumber) {
+ read_urb->transfer_flags &= ~USB_ISO_ASAP;
+ read_urb->start_frame = usb_get_current_frame_number(dev->usb_dev)+FrameNumber;
+ } else {
+ // ASAP
+ }
+ err = SUBMIT_URB(read_urb);
+ if (err < 0) {
+ status = FAILURE;
+ goto fail;
+ }
+ }
+
+ status = WaitForObcCmdComplete(dev);
+ if (status == FAILURE) {
+ DBG(USB_D,"cmdBuff=%p,wrSize=%d,rdSize=%d,ep_out=%d,ep_in=%d\n",
+ dataPtr->cmdBuff,dataPtr->wrSize,dataPtr->rdSize,ep_out,ep_in);
+
+ // Cancel
+ DUMP_URB(write_urb);
+ read_urb->dev = dev->usb_dev;
+ read_urb->interval = 0;
+ UNLINK_URB(read_urb);
+ write_urb->dev = dev->usb_dev;
+ write_urb->interval = 0;
+ UNLINK_URB(write_urb);
+ ObcReset();
+ } else {
+ dataPtr->rdSize = read_urb->actual_length/2;
+ DBG(USB_D,"rdSize=%d\n",dataPtr->rdSize);
+ USB_SWAP_BUF(ptr,dataPtr->rdSize);
+ break;
+ }
+ }
+
+ USB_SWAP_BUF(dataPtr->cmdBuff,dataPtr->wrSize);
+fail:
+ OBC_UNLOCK(&dev->obc_lock);
+ return status;
+}
+
+//----------------------------------------------------------------------
+// unicorn_snd_getcell:
+// Returns a pointer to the transmit buffer
+//----------------------------------------------------------------------
+unsigned char *unicorn_snd_getcell(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+ ULONG n;
+ PBYTE p;
+
+ if (!send_atm->started) {
+ WARN(("ATM Tx I/O error\n"));
+ return NULL;
+ }
+
+ t = send_atm->turn_write;
+ if (send_atm->lens[t] > 0) return NULL;
+
+ n = send_atm->maxlen - send_atm->bufofs;
+ if (n < CELL_LENGTH) return NULL;
+
+ p = send_atm->bufs[t] + send_atm->bufofs;
+
+ // next cell
+ send_atm->bufofs += CELL_LENGTH;
+ gLedXmit = 1;
+ send_atm->cell_count++;
+ return p;
+}
+
+//----------------------------------------------------------------------
+// unicorn_start_transmit:
+// Start transmit DMA
+//----------------------------------------------------------------------
+int unicorn_start_transmit(struct unicorn_dev *dev)
+{
+ struct send_atm *send_atm = &dev->send_atm;
+ int t;
+ unsigned long n;
+
+ DBG(RW_D,"\n");
+
+ t = send_atm->turn_write;
+ n = send_atm->bufofs;
+ if (n > 0) {
+ send_atm->lens[t] = n;
+ send_atm->turn_write = (t+1)&(ATM_WRITES-1);
+ send_atm->bufofs = 0;
+ test_and_set_bit(0,&send_atm->busy[t]);
+ StartAtmUsXfer(dev,t,send_atm->bufs[t],n);
+ return n;
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// unicorn_rcv_getcell:
+// Returns a pointer to the next cell header in the receive buffer
+//----------------------------------------------------------------------
+unsigned char *unicorn_rcv_getcell(struct unicorn_dev *dev)
+{
+ struct recv_atm *recv_atm = &dev->recv_atm;
+ unsigned char *cell;
+
+ cell = recv_atm->cells[recv_atm->turn_read];
+ if (cell) {
+ DBG(RW_D,"turn_read=%d,cell=%p\n",recv_atm->turn_read,cell);
+ // next cell
+ recv_atm->cells[recv_atm->turn_read++] = NULL;
+ gLedRecv = 1;
+ recv_atm->cell_count++;
+ }
+ return cell;
+}
+
+extern unsigned long RetryTime;
+//----------------------------------------------------------------------
+// Modem Software Control functions
+//----------------------------------------------------------------------
+int unicorn_msw_control(struct unicorn_dev *dev,T_MswCtrl *ctrl)
+{
+ static unsigned long old_report = 0L;
+ ctrl->retcode = -1;
+
+ DBG(RW_D,"code=%ld,subcode=%ld,length=%ld\n",ctrl->code,ctrl->subcode,ctrl->length);
+
+ switch(ctrl->code) {
+ case MSW_CTL_INIT:
+ if (ctrl->subcode <= 0) break;
+ if (ctrl->subcode >= 16) break;
+ ActivationMode = ctrl->subcode ;
+ dev->msw_started = TRUE;
+ rapi_lock();
+ msw_init(ActivationMode);
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_EXIT:
+ rapi_lock();
+ msw_exit();
+ rapi_unlock();
+ dev->msw_started = FALSE;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_START:
+ rapi_lock();
+ msw_start();
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_STOP:
+ rapi_lock();
+ msw_stop();
+ rapi_unlock();
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_SET_CONFIG:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_setModemConfiguration(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_GET_CONFIG:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getModemConfiguration(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_GET_DATA:
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getData(ctrl->subcode,ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_GET_STATE:
+ if (ctrl->length < sizeof(AMSW_ModemState)) break;
+ if (ctrl->buffer == NULL) break;
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_getModemState((AMSW_ModemState*)ctrl->buffer);
+ rapi_unlock();
+ break;
+
+ case MSW_CTL_REQ_CHANGE:
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_requestModemStateChange((AMSW_ModemState)ctrl->subcode);
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+
+ case MSW_CTL_DYING_GASP:
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_dyingGasp();
+ rapi_unlock();
+ ctrl->length = 0;
+ break;
+ case MSW_CTL_SETCARRIERCONSTELLATION:
+ ctrl->retcode = AMSW_ANT_setCarrierConstellation(ctrl->subcode);
+ break;
+
+ case MSW_CTL_WAIT_EVENT:
+ if (ctrl->length < sizeof(unsigned long)) break;
+ if (ctrl->buffer == NULL) break;
+ if (last_report != old_report) {
+ rapi_lock();
+ ctrl->retcode = AMSW_ANT_wait_event((unsigned long*)ctrl->buffer);
+ rapi_unlock();
+ old_report = last_report;
+ } else {
+ ctrl->buffer = 0;
+ //ctrl->length = 0;
+ }
+ break;
+ case MSW_CTL_VERSION_INFO:
+ if (ctrl->length < sizeof(unsigned long)) break;
+ if (ctrl->buffer == NULL) break;
+ *((unsigned long *)ctrl->buffer) = VERS;
+ ctrl->retcode = 0;
+ break;
+ case MSW_CTL_STATE_INFO:
+ if (ctrl->length < sizeof(T_StateInfo)) break;
+ if (ctrl->buffer == NULL) break;
+ {
+ T_StateInfo *info = (T_StateInfo *)ctrl->buffer;
+ info->State = g_ModemState;
+ ctrl->retcode = 0;
+ if (info->State == C_AMSW_IDLE) {
+ last_event = (AMSW_ModemEvent)-1;
+ }
+ if (info->State == C_AMSW_SHOWTIME_L0) {
+ last_failure = (AMSW_ModemFailure)-1;
+ info->TimeCnctd = xtm_elapse(adsl_system_time);
+ } else {
+ info->TimeCnctd = 0;
+ }
+ info->Report = last_event;
+ info->Failure = last_failure;
+ info->RcvdCells = dev->recv_atm.cell_count;
+ info->SentCells = dev->send_atm.cell_count;
+ }
+ break;
+ case MSW_CTL_SET_DEBUG_LEVEL:
+ DebugLevel = ctrl->subcode;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+ case MSW_CTL_SET_MSW_DEBUG_LEVEL:
+ MswDebugLevel = ctrl->subcode;
+ ctrl->retcode = 0;
+ ctrl->length = 0;
+ break;
+ }
+
+ DBG(RW_D,"retcode=%ld,length=%ld\n",ctrl->retcode,ctrl->length);
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// unicorn_get_adsl_status
+//----------------------------------------------------------------------
+ADSL_STATUS unicorn_get_adsl_status(struct unicorn_dev *dev)
+{
+ return adsl_status;
+}
+
+//----------------------------------------------------------------------
+// unicorn_get_adsl_linkspeed
+//----------------------------------------------------------------------
+int unicorn_get_adsl_linkspeed(struct unicorn_dev *dev,
+ unsigned long *us_rate,unsigned long *ds_rate)
+{
+ int status;
+
+ if (adsl_status != ADSL_STATUS_ATMREADY) {
+ *us_rate = 0;
+ *ds_rate = 0;
+ status = -ENXIO;
+ } else {
+ // adjust upstream rate to avoid overflow
+ unsigned long speed = (adsl_us_cellrate*15UL)/16UL;
+ *us_rate = (speed * ATM_CELL_SIZE*8UL)/1000UL;
+ *ds_rate = (adsl_ds_cellrate * ATM_CELL_SIZE*8UL)/1000UL;
+ status = 0;
+ }
+ return status;
+}
+
+//----------------------------------------------------------------------
+// get_frame_number_offset
+//----------------------------------------------------------------------
+static int get_frame_number_offset(struct usb_device *usb_dev)
+{
+ int ret=0; // default, USB_ISOC_ASAP
+
+ if (usb_dev->bus) {
+ struct usb_device *root_hub = usb_dev->bus->root_hub;
+ if (root_hub->descriptor.iProduct) {
+ char *buf = kmalloc(256, GFP_KERNEL);
+ if (buf) {
+ if (usb_string(root_hub,
+ root_hub->descriptor.iProduct, buf, 256) > 0) {
+ INFO("%s\n",buf);
+ if (strcmp(buf,"USB UHCI Root Hub")==0) {
+ // usb-uhci driver:
+ // need to wait 12 frames before reading OBC
+ ret = 12;
+ }
+ }
+ kfree(buf);
+ }
+ }
+ }
+ return ret;
+}
+
+//----------------------------------------------------------------------
+// probe_unicorn_usb
+//----------------------------------------------------------------------
+static int do_probe(struct usb_device *usb_dev,unsigned long driver_info)
+{
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+ int status;
+
+ INFO("found adapter VendorId %04x, ProductId %04x, driver_info=%ld\n",
+ usb_dev->descriptor.idVendor, usb_dev->descriptor.idProduct,driver_info);
+
+ GlobalRemove = FALSE;
+
+ useAFE = driver_info;
+ set_msw_params();
+
+ // Initialize RAPI
+ if ((status = rapi_init()) != 0) {
+ WARN(("inititalization of RAPI failed\n"));
+ return status;
+ }
+
+ // tweaks for different host controller drivers
+ FrameNumber = get_frame_number_offset(usb_dev);
+ DBG(1,"FrameNumber=%d\n",FrameNumber);
+
+ // Initialize USB adapter
+ if ((status = start_device(dev,usb_dev)) != 0) {
+ WARN(("inititalization of USB failed\n"));
+ return status;
+ }
+
+ // Tell ATM driver we are initialized
+ if ((status = unicorn_attach(&unicorn_usb_entrypoints)) != 0) {
+ WARN("inititalization of ATM driver failed\n");
+ return status;
+ }
+
+ // Start modem software
+ if ((ActivationMode > MSW_MODE_UNKNOWN) && (ActivationMode < MSW_MODE_MAX)) {
+ rapi_lock();
+ msw_init(ActivationMode);
+ dev->msw_started = TRUE;
+ //xtm_wkafter(100);
+ if (AutoActivation) {
+ msw_start();
+ }
+ rapi_unlock();
+ }
+ return 0;
+}
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static int __devinit probe_unicorn_usb(struct usb_interface *usb_intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
+ int status;
+
+ status = do_probe(usb_dev,id->driver_info);
+ usb_set_intfdata(usb_intf,&unicorn_usb_dev);
+ return status;
+}
+#else
+static void * __devinit probe_unicorn_usb(struct usb_device *usb_dev,
+ unsigned int ifnum,
+ const struct usb_device_id *id)
+{
+ if (do_probe(usb_dev,id->driver_info)) {
+ return NULL;
+ } else {
+ return &unicorn_usb_dev;
+ }
+}
+#endif
+
+//----------------------------------------------------------------------
+// disconnect_unicorn_usb
+//----------------------------------------------------------------------
+static void do_disconnect(struct unicorn_dev *dev)
+{
+ DBG(1,"\n");
+
+ GlobalRemove = TRUE;
+ stop_device(dev);
+ rapi_exit();
+}
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+static void __devexit disconnect_unicorn_usb(struct usb_interface *usb_intf)
+{
+ do_disconnect(usb_get_intfdata(usb_intf));
+}
+#else
+static void __devexit disconnect_unicorn_usb(struct usb_device *usb_dev, void *arg)
+{
+ do_disconnect(arg);
+}
+#endif
+
+
+static struct usb_device_id unicorn_usb_ids[] = {
+ { USB_DEVICE(0x0483, 0x0137),driver_info: 20174}, // STMicro reference design
+ { USB_DEVICE(0x07FA, 0xA904),driver_info: 70136}, // BeWAN
+ { USB_DEVICE(0x07FA, 0xA905),driver_info: 70136}, // BeWAN
+ { USB_DEVICE(0x07FA, 0x1012),driver_info: 20174}, // BeWAN
+ { USB_DEVICE(0x135A, 0x0001),driver_info: 20174}, // urmet
+ { }
+};
+
+MODULE_DEVICE_TABLE (usb, unicorn_usb_ids);
+
+static struct usb_driver unicorn_usb_driver = {
+ name: "unicorn_usb",
+ probe: probe_unicorn_usb,
+ disconnect: __devexit_p(disconnect_unicorn_usb),
+ id_table: unicorn_usb_ids,
+};
+
+/* module parameters for MSW */
+MODULE_PARM(ActivationMode, "i");
+//MODULE_PARM(ActivationTaskTimeout, "i");
+MODULE_PARM(ActTimeout, "i");
+MODULE_PARM(AutoActivation, "i");
+//MODULE_PARM(BreakOnEntry, "i");
+MODULE_PARM(DownstreamRate, "i");
+MODULE_PARM(eocTrace, "i");
+MODULE_PARM(ExchangeDelay, "i");
+MODULE_PARM(FmPollingRate, "i");
+MODULE_PARM(g_RefGain, "i");
+MODULE_PARM(g_TeqMode, "i");
+MODULE_PARM(InitTimeout, "i");
+MODULE_PARM(Interoperability, "i");
+MODULE_PARM(LCD_Trig, "i");
+MODULE_PARM(LOS_LOF_Trig, "i");
+MODULE_PARM(LoopbackMode, "i");
+MODULE_PARM(MswDebugLevel, "i");
+MODULE_PARM(RetryTime, "i");
+//MODULE_PARM(setINITIALDAC, "i");
+MODULE_PARM(TrainingDelay, "i");
+//MODULE_PARM(TruncateMode, "i");
+MODULE_PARM(useAFE, "i");
+MODULE_PARM(useRFC019v, "i");
+MODULE_PARM(useRFC029v, "i");
+//MODULE_PARM(useRFC033v, "i");
+MODULE_PARM(useRFC040v, "i");
+MODULE_PARM(useRFC041v, "i");
+//MODULE_PARM(useRFCFixedRate, "i");
+MODULE_PARM(useVCXO, "i");
+MODULE_PARM(_no_TS652, "i");
+//MODULE_PARM(FrameNumber, "i");
+#if DEBUG
+MODULE_PARM(DebugLevel, "i");
+#endif
+
+//----------------------------------------------------------------------
+// unicorn_usb_init
+//----------------------------------------------------------------------
+static int __init unicorn_usb_init(void)
+{
+ int status;
+ struct unicorn_dev *dev = &unicorn_usb_dev;
+
+ dev->started = FALSE;
+
+ INFO("v %d.%d.%d, " __TIME__ " " __DATE__"\n",
+ (VERS>>8)&0xf,(VERS>>4)&0xf,VERS&0xf);
+ INFO("driver parameters: DebugLevel=%ld\n",
+ DebugLevel);
+
+ status = usb_register(&unicorn_usb_driver);
+ if (status < 0) {
+ }
+ return status;
+}
+
+static void __exit unicorn_usb_cleanup(void)
+{
+ unicorn_detach();
+ usb_deregister(&unicorn_usb_driver);
+}
+
+module_init(unicorn_usb_init);
+module_exit(unicorn_usb_cleanup);
Added: dists/trunk/modules/unicorn/unicorn/unicorntest/Makefile
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorntest/Makefile Wed Dec 27 00:14:01 2006
@@ -0,0 +1,21 @@
+CC=gcc
+LD=ld
+INSTALL=install
+CFLAGS := -Wall -Wstrict-prototypes -O2 -DLINUX
+INCLUDES := -I../amu/ -I../include/
+prefix=/usr/local
+BINDIR=$(prefix)/bin
+ifndef VERS
+VERS=0
+endif
+
+all: unicorntest
+
+unicorntest: unicorntest.c
+ $(CC) -DVERS=$(VERS) $(CFLAGS) $(INCLUDES) unicorntest.c -o unicorntest
+
+clean:
+ rm -f unicorntest *.o
+
+install: all
+ $(INSTALL) -s -c unicorntest $(DESTDIR)$(BINDIR)
Added: dists/trunk/modules/unicorn/unicorn/unicorntest/unicorntest.c
==============================================================================
--- (empty file)
+++ dists/trunk/modules/unicorn/unicorn/unicorntest/unicorntest.c Wed Dec 27 00:14:01 2006
@@ -0,0 +1,1378 @@
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <sys/socket.h>
+//#include <atm.h>
+#include <linux/atmdev.h>
+#include <linux/sockios.h>
+#include <linux/if.h>
+#include <linux/if_packet.h>
+//#include <linux/delay.h>
+//#include "types.h"
+#include "amu.h"
+#include "unicorn.h"
+
+//#include "cmdtest.h"
+
+int thid; // thread's id report event
+
+//AMSW_ModemState g_ModemState;
+unsigned char g_Mode;
+struct eventreported {
+ int type;
+ int code;
+};
+
+
+T_AMSW_Identification g_Identification;
+T_AMSW_NT_NearEndLineOperData g_NearEndLineOperData;
+T_AMSW_NT_FarEndLineOperData g_FarEndLineOperData;
+T_AMSW_def_counter_set g_def_counter_set;
+T_AMSW_def_bitmap_set g_def_bitmap_set;
+T_AMSW_def_counters g_def_counters;
+T_AMSW_NT_ChannelOperData g_ChannelOperData;
+T_AMSW_ANT_CustomerConfiguration g_CustomerCfg;
+T_AMSW_ANT_StaticConfiguration g_StaticCfg;
+T_AMSW_PowerStateConfiguration g_PowerStateCfg;
+// STM G
+//T_AMSW_TeqX g_Teq;
+T_AMSW_Ber g_Ber;
+T_AMSW_VersionMS g_VersionMS;
+T_AMSW_Constellation g_Constellation;
+
+
+#define MSW_MODE_UNKNOWN 0
+#define MSW_MODE_ANSI 1
+#define MSW_MODE_GLITE 2
+#define MSW_MODE_MULTI 3
+#define MSW_MODE_GDMT 4
+#define MSW_MODE_MAX 5
+DWORD mode=MSW_MODE_UNKNOWN;
+
+struct ADSL_DEVICE {
+ int sd;
+ enum {
+ ATM_DRIVER=1,
+ ETH_DRIVER=2
+ } type;
+ union {
+ struct atmif_sioc atm;
+ struct ifreq eth;
+ } req;
+};
+typedef struct ADSL_DEVICE ADSL_DEVICE;
+
+int msw_ctrl(ADSL_DEVICE *device,T_MswCtrl *ctrl)
+{
+ ctrl->retcode = 0;
+ if (device->type == ATM_DRIVER) {
+ device->req.atm.arg = ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ } else if (device->type == ETH_DRIVER) {
+ device->req.eth.ifr_data = (char *)ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) < 0) {
+ return errno;
+ }
+ return ctrl->retcode;
+ }
+ return -1;
+}
+
+int open_device(ADSL_DEVICE *device)
+{
+ unsigned long state=0L;
+ T_MswCtrl ctrl ={MSW_CTL_GET_STATE,0,0,&state,sizeof(state)};
+ int sd;
+
+ // try first ATM socket
+ sd = socket(PF_ATMPVC,SOCK_DGRAM,0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ATM_DRIVER;
+ device->req.atm.number = 0;
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC socket opened,itf=%d\n",device->req.atm.number);
+#endif
+ device->req.atm.arg = &ctrl;
+ device->req.atm.length = sizeof(T_MswCtrl);
+ if (ioctl(device->sd,ATM_MSW_CTL,&device->req.atm) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"PF_ATMPVC msw_ctrl failed,,err=%s(%d)\n",strerror(errno),errno);
+ close (sd);
+#endif
+ }
+ }
+
+ // try Ethernet socket
+ sd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sd > 0) {
+ device->sd = sd;
+ device->type = ETH_DRIVER;
+ strcpy(device->req.eth.ifr_name,UNICORN_ETH_NAME);
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET socket opened,itf=%s\n",device->req.eth.ifr_name);
+#endif
+ device->req.eth.ifr_data = (char *)&ctrl;
+ if (ioctl(device->sd,ETH_MSW_CTL,&device->req.eth) == 0) {
+ return 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr,"AF_INET msw_ctrl failed,err=%s(%d)\n",strerror(errno),errno);
+ close (sd);
+#endif
+ }
+ }
+ return errno;
+}
+
+void close_device(ADSL_DEVICE *device)
+{
+ close(device->sd);
+ device->sd = -1;
+ device->type = 0;
+}
+
+static int modem_command(ADSL_DEVICE *device,unsigned long code,unsigned long subcode)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = code;
+ ctrl.subcode = subcode;
+ ctrl.buffer = NULL;
+
+ ctrl.length =0;
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,errno=%d\n",errno);
+ return errno;
+ }
+ if (ctrl.retcode < 0) {
+ printf("ioctl failed,retcode=%ld\n> ",ctrl.retcode);
+ return ctrl.retcode;
+ }
+ return C_AMSW_ACK;
+}
+
+static int setModemConfiguration(ADSL_DEVICE *device,AMSW_ConfigType configType,void *data)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_SET_CONFIG;
+ ctrl.subcode = configType;
+ ctrl.buffer = data;
+
+ switch (configType) {
+ case C_AMSW_STATIC_CONFIGURATION:
+ ctrl.length = sizeof(T_AMSW_ANT_StaticConfiguration);
+ break;
+ case C_AMSW_CUSTOMER_CONFIGURATION:
+ ctrl.length = sizeof(T_AMSW_ANT_CustomerConfiguration);
+ break;
+ case C_AMSW_POWER_STATE_CONTROL:
+ ctrl.length = sizeof(T_AMSW_PowerStateConfiguration);
+ break;
+ }
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,errno=%d\n",errno);
+ return errno;
+ }
+ if (ctrl.retcode < 0) {
+ printf("ioctl failed,retcode=%ld\n> ",ctrl.retcode);
+ return ctrl.retcode;
+ }
+ return C_AMSW_ACK;
+}
+
+static int getModemConfiguration(ADSL_DEVICE *device,AMSW_ConfigType configType,void *data)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_GET_CONFIG;
+ ctrl.subcode = configType;
+ ctrl.buffer = data;
+
+ switch (configType) {
+ case C_AMSW_STATIC_CONFIGURATION:
+ ctrl.length = sizeof(T_AMSW_ANT_StaticConfiguration);
+ break;
+ case C_AMSW_CUSTOMER_CONFIGURATION:
+ ctrl.length = sizeof(T_AMSW_ANT_CustomerConfiguration);
+ break;
+ case C_AMSW_POWER_STATE_CONTROL:
+ ctrl.length = sizeof(T_AMSW_PowerStateConfiguration);
+ break;
+ }
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,errno=%d",errno);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int getData(ADSL_DEVICE *device,AMSW_DataType dataType,void *data)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_GET_DATA;
+ ctrl.subcode = dataType;
+ ctrl.buffer = data;
+ switch (dataType) {
+ case C_AMSW_VERSIONMS:
+ ctrl.length = sizeof(T_AMSW_VersionMS);
+ break;
+ case C_AMSW_TEQ:
+ ctrl.length = sizeof(T_AMSW_TeqX);
+ break;
+ case C_AMSW_PM_DATA:
+ case C_AMSW_FM_DATA:
+ ctrl.length = sizeof(T_AMSW_def_counter_set);
+ break;
+ case C_AMSW_FAR_END_IDENTIFICATION:
+ case C_AMSW_NEAR_END_IDENTIFICATION:
+ ctrl.length = sizeof(T_AMSW_Identification);
+ break;
+ case C_AMSW_NEAR_END_LINE_DATA:
+ ctrl.length = sizeof(T_AMSW_NT_NearEndLineOperData);
+ break;
+ case C_AMSW_FAR_END_LINE_DATA:
+ ctrl.length = sizeof(T_AMSW_NT_FarEndLineOperData);
+ break;
+ case C_AMSW_NEAR_END_CHANNEL_DATA_FAST:
+ case C_AMSW_FAR_END_CHANNEL_DATA_FAST:
+ case C_AMSW_NEAR_END_CHANNEL_DATA_INTERLEAVED:
+ case C_AMSW_FAR_END_CHANNEL_DATA_INTERLEAVED:
+ ctrl.length = sizeof(T_AMSW_NT_ChannelOperData);
+ break;
+ }
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,errno=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int getModemState(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_GET_STATE;
+ ctrl.subcode = 0;
+ //modemState = 0;
+ ctrl.buffer = &g_ModemState;
+ ctrl.length = sizeof(AMSW_ModemState);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,errno=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+void ModemStateUpdate(ADSL_DEVICE *device)
+{
+ int err;
+ err = getModemState(device);
+ if (err != C_AMSW_ACK)
+ {
+ printf("MSW Not Loaded\nDoing on console prompt:\nmodprobe unicorn_pci\n");
+ //Error from AMSW_ANT_getModemState
+ }
+}
+
+static int getAndPrintModemState(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ AMSW_ModemState modemState;
+
+ ctrl.code = MSW_CTL_GET_STATE;
+ ctrl.subcode = 0;
+ modemState = 0;
+ ctrl.buffer = &modemState;
+ ctrl.length = sizeof(AMSW_ModemState);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+
+ switch (modemState) {
+ case C_AMSW_IDLE :
+ printf("%s\n> ","C_AMSW_IDLE");
+ break;
+ case C_AMSW_L3 :
+ printf("%s\n> ","C_AMSW_L3");
+ break;
+ case C_AMSW_LISTENING :
+ printf("%s\n> ","C_AMSW_LISTENING");
+ break;
+ case C_AMSW_ACTIVATING :
+ printf("%s\n> ","C_AMSW_ACTIVATIN");
+ break;
+ case C_AMSW_Ghs_HANDSHAKING :
+ printf("%s\n> ","C_AMSW_Ghs_HANDSHAKING");
+ break;
+ case C_AMSW_ANSI_HANDSHAKING :
+ printf("%s\n> ","C_AMSW_ANSI_HANDSHAKING");
+ break;
+ case C_AMSW_INITIALIZING :
+ printf("%s\n> ","C_AMSW_INITIALIZING");
+ break;
+ case C_AMSW_RESTARTING :
+ printf("%s\n> ","C_AMSW_RESTARTING");
+ break;
+ case C_AMSW_FAST_RETRAIN :
+ printf("%s\n> ","C_AMSW_FAST_RETRAIN");
+ break;
+ case C_AMSW_SHOWTIME_L0 :
+ printf("%s\n> ","C_AMSW_SHOWTIME_L0");
+ break;
+ case C_AMSW_SHOWTIME_LQ :
+ printf("%s\n> ","C_AMSW_SHOWTIME_LQ");
+ break;
+ case C_AMSW_SHOWTIME_L1 :
+ printf("%s\n> ","C_AMSW_SHOWTIME_L1");
+ break;
+ case C_AMSW_EXCHANGE :
+ printf("%s\n> ","C_AMSW_EXCHANGE");
+ break;
+ case C_AMSW_TRUNCATE :
+ printf("%s\n> ","C_AMSW_TRUNCATE");
+ break;
+ case C_AMSW_ESCAPE :
+ printf("%s\n> ","C_AMSW_ESCAP");
+ break;
+ case C_AMSW_DISORDERLY :
+ printf("%s\n> ","C_AMSW_DISORDERLY");
+ break;
+ case C_AMSW_RETRY :
+ printf("%s\n> ","C_AMSW_RETRY");
+ break;
+ default:
+ printf("unknown modem state %d\n> ",modemState);
+ break;
+ }
+ return C_AMSW_ACK;
+}
+
+static int SetCarrierConstellation(ADSL_DEVICE *device, int i)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_SETCARRIERCONSTELLATION;
+ ctrl.subcode = i;
+ ctrl.buffer = 0;
+
+ ctrl.length = 0;//sizeof(T_AMSW_Constellation);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int dyingGasp(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ ctrl.code = MSW_CTL_DYING_GASP;
+ ctrl.subcode = 0;
+ ctrl.buffer = 0;
+
+ ctrl.length = 0;//sizeof(T_AMSW_Constellation);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int ping(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+ T_atm_channel tx_oam;
+
+ scanf("%d.%d",&tx_oam.vpi,&tx_oam.vci);
+ if (tx_oam.vpi == 0) {
+ tx_oam.type = ATM_OAM_F4;
+ } else {
+ tx_oam.type = ATM_OAM_F5;
+ }
+ printf("pinging %d.%d...\n",tx_oam.vpi,tx_oam.vci);
+
+ ctrl.code = NET_CTL_TX_OAM_CELL;
+ ctrl.subcode = 0;
+ ctrl.buffer = &tx_oam;
+ ctrl.length = sizeof(tx_oam);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int get_oam_stats(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+ T_oam_stats oam_stats;
+
+ ctrl.code = NET_CTL_GET_OAM_STATS;
+ ctrl.subcode = 0;
+ ctrl.buffer = &oam_stats;
+ ctrl.length = sizeof(oam_stats);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ printf("-------- CELLS TRANSMITTED ----------\n");
+ printf("Loopback cells = %04ld\n",oam_stats.tx_LB);
+ printf("-------- CELLS RECEIVED -------------\n");
+ printf("Continuity Check cells = %04ld\n",oam_stats.rx_CC);
+ printf("Remote Deefct Indication cells = %04ld\n",oam_stats.rx_RDI);
+ printf("Alarm Indication Signal cells = %04ld\n",oam_stats.rx_AIS);
+ printf("Far-End Loopback cells = %04ld\n",oam_stats.rx_fe_LB);
+ printf("Near-End Loopback cells = %04ld\n",oam_stats.rx_ne_LB);
+ return C_AMSW_ACK;
+}
+
+static int set_debug_level(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ scanf("%ld",&ctrl.subcode);
+ ctrl.code = MSW_CTL_SET_DEBUG_LEVEL;
+ ctrl.buffer = NULL;
+ ctrl.length = 0;
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+static int set_msw_debug_level(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+
+ scanf("%ld",&ctrl.subcode);
+ ctrl.code = MSW_CTL_SET_MSW_DEBUG_LEVEL;
+ ctrl.buffer = NULL;
+ ctrl.length = 0;
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ printf("ioctl failed,status=%d\n",status);
+ return status;
+ }
+ return C_AMSW_ACK;
+}
+
+void printGuiString(void)
+{
+ printf("\n\n HELP -> Help\n");
+ printf(" ----------------------------------------------------------\n");
+ printf(" ANSI : Initialize and Start in Operation Mode: ANSI\n");
+ printf(" MULTI : Initialize and Start in Operation Mode: MULTI\n");
+ printf(" GLITE : Initialize and Start in Operation Mode: GLITE\n");
+ printf(" GDMT : Initialize and Start in Operation Mode: GDMT\n");
+ printf(" UP : Activate the Line\n");
+ printf(" DOWN : Deactivate the Line\n");
+ printf(" CONFIG : Get Near End Modem Configuration\n");
+ printf(" VENDOR : Get Vendor and Version Info\n");
+ printf(" OPER : Get Line Operational Data\n");
+ printf(" FAULT : Get Fault Counters\n");
+ printf(" PERF : Get Performance Counters\n");
+ printf(" RATE : Get Actual Bitrate\n");
+ printf(" MODE : Get Modem State\n");
+ printf(" TEQ : Get TEQ values\n");
+ printf(" VER : Get Software Version\n");
+ printf(" GASP : Send DyingGasp Command\n");
+ printf(" UNLOAD : Unload Operation Mode\n");
+ printf(" CONSTELLATION #: Show Constellation Data for # carrier\n");
+ printf(" PING <VPI.VCI> : Send OAM Loopback Cell\n");
+ printf(" OAM : Get OAM Statistics\n");
+ printf(" DEBUG <LEVEL> : Set Debug Level\n");
+ printf(" MSW <LEVEL> : Set Msw Debug Level\n");
+ printf(" ----------------------------------------------------------\n");
+ printf(" X : Exit Console Application\n");
+ printf(" ----------------------------------------------------------\n\n");
+}
+
+bool InterpretCmdString (char *cmd,ADSL_DEVICE *device)
+{
+ int err;
+ static bool MSW_INIT = FALSE;
+ int i;
+
+ if (strcmp(cmd,"HELP") == 0)
+ {
+ printGuiString();
+ return TRUE;
+ }
+ else if (strcmp(cmd,"ANSI") == 0)
+ {
+ err = getModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION, &g_CustomerCfg);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getModemConfiguration for Customer Configuration = %d\n> ", err);
+ g_Mode = 0;
+ }
+ else g_Mode = g_CustomerCfg.POTSoverlayOperationModes;
+ if (g_Mode == 0)
+ {
+ printf("\n");
+ mode = MSW_MODE_ANSI;
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_ANSI;
+ err = setModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if(err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_setModemConfiguration(CustomerConfig) (%d)\n> ", err);
+ printf("Operation Mode is: ANSI\n");
+ modem_command(device,MSW_CTL_START,0);
+ MSW_INIT = TRUE;
+ }
+ else
+ printf("Modem already initialized\n> ");
+ return TRUE;
+ }
+ else if (strcmp(cmd,"MULTI") == 0)
+ {
+ err = getModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION, &g_CustomerCfg);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getModemConfiguration for Customer Configuration = %d\n> ", err);
+ g_Mode = 0;
+ }
+ else g_Mode = g_CustomerCfg.POTSoverlayOperationModes;
+ if (g_Mode == 0)
+ {
+ printf("\n");
+ mode = MSW_MODE_MULTI;
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_DMT | AMSW_ANSI | AMSW_G_LITE;
+ err = setModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if(err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_setModemConfiguration(CustomerConfig) (%d)\n> ", err);
+ printf("Operation Mode is: MULTI MODE\n");
+ modem_command(device,MSW_CTL_START,0);
+ MSW_INIT = TRUE;
+ }
+ else
+ printf("Modem already initialized\n> ");
+ return TRUE;
+ }
+ else if (strcmp(cmd,"GLITE") == 0)
+ {
+ err = getModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION, &g_CustomerCfg);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getModemConfiguration for Customer Configuration = %d\n> ", err);
+ g_Mode = 0;
+ }
+ else g_Mode = g_CustomerCfg.POTSoverlayOperationModes;
+ if (g_Mode == 0)
+ {
+ printf("\n");
+ mode = MSW_MODE_GLITE;
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_LITE;
+ err = setModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if(err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_setModemConfiguration(CustomerConfig) (%d)\n> ", err);
+ printf("Operation Mode is: G.LITE\n> ");
+ modem_command(device,MSW_CTL_START,0);
+ MSW_INIT = TRUE;
+ }
+ else
+ printf("Modem already initialized\n> ");
+ return TRUE;
+ }
+ else if (strcmp(cmd,"GDMT") == 0)
+ {
+ err = getModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION, &g_CustomerCfg);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getModemConfiguration for Customer Configuration = %d\n> ", err);
+ g_Mode = 0;
+ }
+ else g_Mode = g_CustomerCfg.POTSoverlayOperationModes;
+ if (g_Mode == 0)
+ {
+ printf("\n");
+ mode = MSW_MODE_GDMT;
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_DMT;
+ err = setModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if(err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_setModemConfiguration(CustomerConfig) (%d)\n> ", err);
+ printf("Operation Mode is: G.DMT\n");
+ modem_command(device,MSW_CTL_START,0);
+ MSW_INIT = TRUE;
+ }
+ else
+ printf("Modem already initialized\n> ");
+ return TRUE;
+ }
+ else if (strcmp(cmd,"UP") == 0)
+ {
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_IDLE)
+ {
+ modem_command(device,MSW_CTL_START,0);
+ }
+ else
+ {
+ printf("Modem is NOT in IDLE yet\n> ");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"DOWN") == 0)
+ {
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ modem_command(device,MSW_CTL_STOP,0);
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n> ");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"CONFIG") == 0)
+ {
+ err = getModemConfiguration(device,C_AMSW_STATIC_CONFIGURATION,&g_StaticCfg);
+ if(err)
+ printf("AMSW_ANT_getModemConfiguratio error\n");
+ err = getModemConfiguration(device,C_AMSW_CUSTOMER_CONFIGURATION,&g_CustomerCfg);
+ if(err)
+ printf("AMSW_ANT_getModemConfiguration error\n");
+ err = getModemConfiguration(device,C_AMSW_POWER_STATE_CONTROL,&g_PowerStateCfg);
+ if(err)
+ printf("AMSW_ANT_getModemConfiguration error\n");
+ if (err) return FALSE;
+
+ printf("Near End Static configuration...\n\n");
+ printf("Utopia Mode = 0x%x\n",(unsigned int)g_StaticCfg.utopiaMode);
+ printf("Utopia Fast = 0x%x\n",(unsigned int)g_StaticCfg.utopiaFast);
+ printf("Utopia utopiaSlow = 0x%x\n",(unsigned int)g_StaticCfg.utopiaSlow);
+ printf("Serial Number = ");
+
+ for (i=0; i<32; i++) printf("%c",g_StaticCfg.serialNumber[i]);
+ printf("\n\n");
+
+ printf("MaximumDownstreamLineRate = %ld\n",g_StaticCfg.maximumDownstreamLineRate);
+ printf("managementVersion = 0x%x\n",(unsigned int)g_StaticCfg.managementVersion);
+ printf("goldenMode = 0x%x\n",g_StaticCfg.goldenMode);
+ printf("\n");
+ printf("Vendor Identification...\n\n");
+ printf("Country Code = 0x%x\n",g_StaticCfg.vendorIdentif.countryCode);
+ printf("Reserved = 0x%x\n",g_StaticCfg.vendorIdentif.reserved);
+ printf("Vendor Code = 0x%x\n",(unsigned int)g_StaticCfg.vendorIdentif.vendorCode);
+ printf("Vendor Specific = 0x%x\n",g_StaticCfg.vendorIdentif.vendorSpecific);
+
+ printf("\nCustomer Configuration...\n\n");
+ printf("POTSoverlayOperationModes = 0x%x\n",g_CustomerCfg.POTSoverlayOperationModes);
+ for (i=0;i<8;i++)
+ printf("POTSoverlayPermissions[%d] = 0x%x\n",i, g_CustomerCfg.POTSoverlayPermissions[i]);
+
+ printf("\nPower Configuration...\n\n");
+ printf("PowerStateControl = 0x%x\n",g_PowerStateCfg.powerStateControl);
+ printf("\n");
+ printf("\n> ");
+
+ return TRUE;
+ }
+ else if (strcmp(cmd,"VENDOR") == 0)
+ {
+ printf("\n");
+ err = getData(device,C_AMSW_NEAR_END_IDENTIFICATION,&g_Identification);
+ if(err)
+ printf("AMSW_ANT_getData error\n");
+ if (err) return FALSE;
+
+ if (g_Mode == AMSW_ANSI)
+ {
+ printf("Near End ANSI_ETSI_VendorId : %d \n",g_Identification.ANSI_ETSI_VendorId);
+ printf("Near End ANSI_ETSI_StandardRevisionNbr : 0x%x \n",g_Identification.ANSI_ETSI_StandardRevisionNbr);
+ printf("Near End Vendor Specific : 0x%x \n",g_Identification.ANSI_ETSI_VendorRevisionNbr);
+ } else {
+ printf("Near End Vendor Country Code : %d \n",g_Identification.ITU_VendorId.countryCode);
+ printf("Near End Vendor Code : (0x%x) \n",(unsigned int)g_Identification.ITU_VendorId.vendorCode);
+ printf("Near End ITU Revision Number : %d \n",g_Identification.ITU_StandardRevisionNbr);
+ printf("Near End Vendor Specific : 0x%x \n",g_Identification.ITU_VendorId.vendorSpecific);
+ }
+
+ err = getData(device,C_AMSW_FAR_END_IDENTIFICATION,&g_Identification);
+ if(err)
+ printf("AMSW_ANT_getData error\n");
+
+ if (err) return FALSE;
+
+ if (g_Mode == AMSW_ANSI)
+ {
+ printf("Far End ANSI_ETSI_VendorId : %d \n",g_Identification.ANSI_ETSI_VendorId);
+ printf("Far End ANSI_ETSI_StandardRevisionNbr : 0x%x \n",g_Identification.ANSI_ETSI_StandardRevisionNbr);
+ printf("Far End Vendor Specific : 0x%x \n",g_Identification.ANSI_ETSI_VendorRevisionNbr);
+ }
+ else
+ {
+ printf("Far End Vendor Country Code : %d \n",g_Identification.ITU_VendorId.countryCode);
+ printf("Far End Vendor Code : (0x%x) \n",(unsigned int)g_Identification.ITU_VendorId.vendorCode);
+ printf("Far End ITU Revision Number : %d \n",g_Identification.ITU_StandardRevisionNbr);
+ printf("Far End Vendor Specific : 0x%x \n",g_Identification.ITU_VendorId.vendorSpecific);
+ }
+
+ return TRUE;
+ }
+ else if (strcmp(cmd,"OPER") == 0)
+ {
+ printf("Line operational data\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ err = getData(device,C_AMSW_FAR_END_LINE_DATA, &g_FarEndLineOperData);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getData for Far End Line Data = %d\n", err);
+ }
+ else
+ {
+ err = getData(device,C_AMSW_NEAR_END_LINE_DATA, &g_NearEndLineOperData);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getData for Near End Line Data = %d\n", err);
+ }
+ else
+ {
+ printf("Operation Mode Seletected : ");
+ switch (g_NearEndLineOperData.operationalMode)
+ {
+ case 1:
+ printf("ANSI\n");
+ break;
+ case 2:
+ printf("G.DMT\n");
+ break;
+ default:
+ printf("G.Lite\n");
+ break;
+ }
+ printf("\nDownstream Capacity Occupation : %d %%\n",g_NearEndLineOperData.relCapacityOccupationDnstr);
+ printf("Downstream Noise Margin : %f dB \n",(((float) g_NearEndLineOperData.noiseMarginDnstr)/2.0));
+ printf("Downstream Attenuation : %f dB \n",(((float) g_NearEndLineOperData.attenuationDnstr)/2.0));
+ printf("Downstream Output Power : %f dBm \n",(((float) g_FarEndLineOperData.outputPowerDnstr)/2.0));
+ }
+ printf("\nUpstream Capacity Occupation : %d %%\n",g_FarEndLineOperData.relCapacityOccupationUpstr);
+ printf("Upstream Noise Margin : %f dB \n",(((float) g_FarEndLineOperData.noiseMarginUpstr)/2.0));
+ printf("Upstream Attenuation : %f dB \n",(((float) g_FarEndLineOperData.attenuationUpstr)/2.0));
+ printf("Upstream Output Power : %f dBm \n",(((float) g_NearEndLineOperData.outputPowerUpstr)/2.0));
+
+ // Display carrier load g_FarEndLineOperData.carrierLoad
+ printf("\nCarrier Load (bits/tone)\n\n");
+ for(err = 0; err <=127; err+=2)
+ {
+ printf("[%3d] -- %d\t",err * 2, ((g_FarEndLineOperData.carrierLoad[err] & 0xf0) >> 4));
+ printf("[%3d] -- %d\t",err * 2+1, g_FarEndLineOperData.carrierLoad[err] & 0x0f);
+ printf("[%3d] -- %d\t",err * 2+2, ((g_FarEndLineOperData.carrierLoad[err+1] & 0xf0) >> 4));
+ printf("[%3d] -- %d\n",err * 2+3, g_FarEndLineOperData.carrierLoad[err+1] & 0x0f);
+ }
+ }
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+
+ else if (strcmp(cmd,"FAULT") == 0)
+ {
+ printf("Fault counters\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ err = getData(device,C_AMSW_FM_DATA, &g_def_bitmap_set);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getData for Defects = %d\n",err);
+ }
+ else
+ {
+ printf("============== NEAR END =============\n");
+ if(g_def_bitmap_set.near_end.status == 0)
+ {
+ printf("No defects\n");
+ }
+ else
+ {
+ if ((g_def_bitmap_set.near_end.status & 0x4) == 0x4)
+ printf("Loss Of Margin (LoM) Defect Detected\n");
+ if ((g_def_bitmap_set.near_end.status & 0x8) == 0x8)
+ printf("Loss Of Cell Delineation (LoCD) Defect Detected - INTERLEAVED CHANNEL\n");
+ if ((g_def_bitmap_set.near_end.status & 0x10) == 0x10)
+ printf("Loss Of Cell Delineation (LoCD) Defect Detected - FAST CHANNEL\n");
+ if ((g_def_bitmap_set.near_end.status & 0x20) == 0x20)
+ printf("Loss Of Power (LoP) Defect Detected\n");
+ if ((g_def_bitmap_set.near_end.status & 0x40) == 0x40)
+ printf("Loss Of Frame (LoF) Defect Detected\n");
+ if ((g_def_bitmap_set.near_end.status & 0x80) == 0x80)
+ printf("Loss Of Signal (LoS) Defect Detected\n");
+ if ((g_def_bitmap_set.near_end.status & 0x100) == 0x100)
+ printf("Dying Gasp message has either -- been sent by ATU_R (or) received by ATU_C\n");
+ }
+
+ printf("============== FAR END =============\n");
+ if (g_def_bitmap_set.far_end.status == 0)
+ {
+ printf("No defects\n");
+ }
+ else
+ {
+ if ((g_def_bitmap_set.far_end.status & 0x4) == 0x04)
+ printf("Loss Of Margin (LoM) Defect Detected\n");
+ if ((g_def_bitmap_set.far_end.status & 0x8) == 0x08)
+ printf("Loss Of Cell Delineation (LoCD) Defect Detected - INTERLEAVED CHANNEL\n");
+ if ((g_def_bitmap_set.far_end.status & 0x10) == 0x10)
+ printf("Loss Of Cell Delineation (LoCD) Defect Detected - FAST CHANNEL\n");
+ if ((g_def_bitmap_set.far_end.status & 0x10) == 0x20)
+ printf("Loss Of Power Defect Detected\n");
+ if ((g_def_bitmap_set.far_end.status & 0x40) == 0x40)
+ printf("Loss Of Frame (LoF) Defect Detected\n");
+ if ((g_def_bitmap_set.far_end.status & 0x80) == 0x80)
+ printf("Loss Of Signal (LoS) Defect Detected\n");
+ if ((g_def_bitmap_set.far_end.status & 0x100) == 0x100)
+ printf("Dying Gasp message has to be either -- sent to ATU_R (or) received from ATU_C\n");
+ }
+ }
+
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"PERF") == 0)
+ {
+ printf("Performance counters\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ err = getData(device,C_AMSW_PM_DATA, &g_def_counter_set);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_getData for Performance Counter");
+ }
+ else
+ {
+ printf("============= NEAR END ===========\n");
+ printf("---------- FAST CHANNEL ----------\n");
+ printf("FEC : %d \n",g_def_counter_set.near_end.FecNotInterleaved);
+ printf("CRC : %d \n",g_def_counter_set.near_end.CrcNotInterleaved);
+ printf("HEC : %d \n",g_def_counter_set.near_end.HecNotInterleaved);
+ //printf("BER : %d \n",g_def_counter_set.near_end.BERNotInterleaved);
+ printf("------- INTERLEAVED CHANNEL ------\n");
+ printf("FEC : %d \n",g_def_counter_set.near_end.FecInterleaved);
+ printf("CRC : %d \n",g_def_counter_set.near_end.CrcInterleaved);
+ printf("HEC : %d \n",g_def_counter_set.near_end.HecInterleaved);
+ //printf("BER : %d \n",g_def_counter_set.near_end.BERInterleaved);
+ printf("============= FAR END ============\n");
+ printf("---------- FAST CHANNEL ----------\n");
+ printf("FEC : %d \n",g_def_counter_set.far_end.FecNotInterleaved);
+ printf("CRC : %d \n",g_def_counter_set.far_end.CrcNotInterleaved);
+ printf("HEC : %d \n",g_def_counter_set.far_end.HecNotInterleaved);
+ //printf("BER : %d \n",g_def_counter_set.far_end.BERNotInterleaved);
+ printf("------- INTERLEAVED CHANNEL ------\n");
+ printf("FEC : %d \n",g_def_counter_set.far_end.FecInterleaved);
+ printf("CRC : %d \n",g_def_counter_set.far_end.CrcInterleaved);
+ printf("HEC : %d \n",g_def_counter_set.far_end.HecInterleaved);
+ //printf("BER : %d \n",g_def_counter_set.far_end.BERInterleaved);
+ }
+
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"RATE") == 0)
+ {
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ printf("Actual bit rate\n");
+ err = getData(device,C_AMSW_NEAR_END_CHANNEL_DATA_FAST, &g_ChannelOperData);
+ if (err != C_AMSW_ACK) /*thid = fork();
+
+ if (thid == 0)
+ report_events(device);*/
+
+ printf("Error in AMSW_ANT_getData for Near End Line Data (Fast) = %d\n", err);
+ else
+ printf("Actual Bit Rate (NEAR END FAST CHANNEL):%15d Kbps \n",g_ChannelOperData.actualBitrate);
+
+ err = getData(device,C_AMSW_FAR_END_CHANNEL_DATA_FAST, &g_ChannelOperData);
+ if (err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_getData for Far End Line Data (Fast) = %d \n", err);
+ else
+ printf("Actual Bit Rate (FAR END FAST CHANNEL):%16d Kbps \n",g_ChannelOperData.actualBitrate);
+
+ err = getData(device,C_AMSW_NEAR_END_CHANNEL_DATA_INTERLEAVED, &g_ChannelOperData);
+ if (err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_getData for Near End Line Data (Interleaved) = %d\n", err);
+ else
+ printf("Actual Bit Rate (NEAR END INTERLEAVED CHANNEL):%8d Kbps \n",g_ChannelOperData.actualBitrate);
+
+ err = getData(device,C_AMSW_FAR_END_CHANNEL_DATA_INTERLEAVED, &g_ChannelOperData);
+ if(err != C_AMSW_ACK)
+ printf("Error in AMSW_ANT_getData for Far End Line Data (Interleaved) = %d\n", err);
+ else
+ printf("Actual Bit Rate (FAR END INTERLEAVED CHANNEL):%9d Kbps \n",g_ChannelOperData.actualBitrate);
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"GASP") == 0)
+ {
+ printf("\n");
+
+ err = dyingGasp(device);
+ if(err != C_AMSW_ACK)
+ {
+ printf("Error in AMSW_ANT_dyingGasp (%d)\n",err);
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"MODE") == 0)
+ {
+ printf("\n");
+ printf("ADSL Modem Mode is: ");
+ if (g_Mode == 0) printf("Uninitialized");
+ else if (g_Mode == AMSW_ANSI) printf("ANSI" );
+ else if (g_Mode == AMSW_G_LITE) printf("GLITE" );
+ else if (g_Mode == AMSW_G_DMT) printf("GDMT" );
+ else printf("MULTI" );
+ printf("\n");
+ err = getAndPrintModemState(device);
+ printf("\n");
+ return TRUE;
+ }
+ else if (strcmp(cmd,"VER") == 0) //STM G
+ {
+// T_AMSW_VersionMS *VersionMS;
+ printf("\n");
+ err = getData(device,C_AMSW_VERSIONMS, &g_VersionMS);
+ if (err != C_AMSW_ACK)
+ {
+ printf("Modem code version : MODEMSW NOT LOADED\n");
+ }
+ else
+ {
+ printf("Modem code version : %s \n",g_VersionMS.versionA);
+ }
+
+ return TRUE;
+ }
+ else if (strcmp(cmd,"BER") == 0)
+ {
+ printf("BER\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ err = getData(device,C_AMSW_BER, &g_Ber);
+ if (err != C_AMSW_ACK)
+ {
+ printf("CmdBer Error in AMSW_ANT_getData for CmdBer = %d\n", err);
+ }
+ else
+ {
+ printf("CmdBer : %ld \n",g_Ber.a);
+
+ }
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"TEQ") == 0)
+ {
+
+ printf("\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ err = getData(device,C_AMSW_TEQ, &g_Teq);
+ if (err != C_AMSW_ACK)
+ {
+ printf("CmdTeq Error in AMSW_ANT_getData for CmdTeq = %d\n", err);
+ }
+ else
+ {
+ printf( "|------------------------------------------------|\n");
+ printf( "|-------- F I N A L T E Q C O E F F ---------|\n");
+ printf( "|------------------|-----------------------------|\n");
+ printf( "| TEQ Noise | FREQUENCY RESPONSE |\n");
+ printf( "| # | Table | Real(hf[i]) Im(hf[i])|\n");
+ printf( "|-------|----------|-----------------------------|\n");
+ for (i=0; i<256; i++)
+ {
+ printf("%d\t %f\t%f\t%f\n",i,g_Teq.Teq_noise_table[i],g_Teq.hf[i*2],g_Teq.hf[i*2+1]);
+ //printf("%3d\t %10.6f\t%10.6f\t%10.6f\n",i,g_Teq.Teq_noise_table[i],g_Teq.hf[i*2],g_Teq.hf[i*2+1]);
+ }
+
+ // final teq coeff
+ printf( "|--------------------------------------------------------|\n");
+ printf( "|------------- F I N A L T E Q C O E F F ------------|\n");
+ printf( "|--------------------------------------------------------|\n");
+ printf( "|----------|---------------------------------------------|\n");
+
+ for (i=0; i<8; i++)
+ {
+ //printf(" %-2d to %-2d\t %-7d\t%-7d\t%-7d\t%-7d\n",i*4,i*4+3,g_Teq.teq_global[i*4],g_Teq.teq_global[i*4+1],g_Teq.teq_global[i*4+2],g_Teq.teq_global[i*4+3]);
+ printf(" %-2d to %-2d\t %-7d\t%-7d\t%-7d\t%-7d\n",i*4,i*4+3,g_Teq.teq_global[i*4],g_Teq.teq_global[i*4+1],g_Teq.teq_global[i*4+2],g_Teq.teq_global[i*4+3]);
+ }
+ printf( "|----------|---------------------------------------------|\n");
+ }
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"UNLOAD") == 0)
+ {
+
+ printf("\n");
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_IDLE)
+ {
+ if (g_Mode == 0 )
+ {
+ printf("Modem Already Unloaded!\n");
+ }
+ else
+ {
+ printf("Modem unloaded! \n");
+ g_Mode = 0;
+ g_CustomerCfg.POTSoverlayOperationModes = 0; // STM Gian verificare che serva effettivamente
+ modem_command(device,MSW_CTL_EXIT,0);
+ }
+ }
+ else
+ {
+ printf("To unload force Modem in IDLE (type DOWN command)\n");
+ }
+ return TRUE;
+ }
+ else if (strcmp(cmd,"CONSTELLATION") == 0)
+ {
+ if (scanf("%d",&i) == 1)
+ {
+ printf("CONSTELLATION %d\n",i);
+ ModemStateUpdate(device);
+ if (g_ModemState == C_AMSW_SHOWTIME_L0)
+ {
+ SetCarrierConstellation(device,i);
+ if (i == 0)
+ {
+ printf("Constellation monitoring stop\n");
+ return TRUE;
+ }
+ sleep(2);
+ err = getData(device,C_AMSW_CONSTELLATION, &g_Constellation);
+ if (err != C_AMSW_ACK)
+ {
+ printf("CmdConstellation Error in AMSW_ANT_getData for CmdConstellation = %d\n", err);
+ }
+ else
+ {
+ printf("CmdConstellation : %ld \n",g_Constellation.carrier);
+ printf("--------------------------------\n");
+ for (i=0; i< 32; i++)
+ printf("%-4d %8d %8d \n",i,g_Constellation.X[i],g_Constellation.Y[i]);
+ printf("--------------------------------\n");
+ }
+ }
+ else
+ {
+ printf("Modem is NOT in SHOWTIME yet\n");
+ }
+
+ }
+ else
+ {
+ printf("ERROR usage is:\n\n CONSTELLATION # \n\n where # is a carrier (integer format)\n");
+ return TRUE;
+ }
+ }
+ else if (strcmp(cmd,"PING") == 0)
+ {
+ ping(device);
+ }
+ else if (strcmp(cmd,"OAM") == 0)
+ {
+ get_oam_stats(device);
+ }
+ else if (strcmp(cmd,"DEBUG") == 0)
+ {
+ set_debug_level(device);
+ }
+ else if (strcmp(cmd,"MSW") == 0)
+ {
+ set_msw_debug_level(device);
+ }
+ else if (strcmp(cmd,"X") == 0)
+ {
+ return FALSE;
+ }
+ else
+ {
+ printGuiString();
+ return TRUE;
+ }
+ return TRUE;
+}
+
+// ADSL Modem Software calls this function to report any state changes
+void AMSW_ANT_reportModemStateChange(AMSW_ModemState p_ModemState)
+{
+ char *s;
+
+ g_ModemState = p_ModemState;
+
+ switch(p_ModemState)
+ {
+ case C_AMSW_IDLE : s = "IDLE"; break;
+ case C_AMSW_L3 : s = "L3"; break;
+ case C_AMSW_LISTENING : s = "LISTENING"; break;
+ case C_AMSW_ACTIVATING : s = "ACTIVATING"; break;
+ case C_AMSW_Ghs_HANDSHAKING : s = "Ghs_HANDSHAKING"; break;
+ case C_AMSW_ANSI_HANDSHAKING : s = "ANSI_HANDSHAKING"; break;
+ case C_AMSW_INITIALIZING : s = "INITIALIZING"; break;
+ case C_AMSW_RESTARTING : s = "RESTARTING"; break;
+ case C_AMSW_FAST_RETRAIN : s = "FAST_RETRAIN"; break;
+ case C_AMSW_SHOWTIME_L0 : s = "SHOWTIME_L0"; break;
+ case C_AMSW_SHOWTIME_LQ : s = "SHOWTIME_LQ"; break;
+ case C_AMSW_SHOWTIME_L1 : s = "SHOWTIME_L1"; break;
+ case C_AMSW_EXCHANGE : s = "EXCHANGE"; break;
+ case C_AMSW_TRUNCATE : s = "TRUNCATE"; break;
+ case C_AMSW_ESCAPE : s = "ESCAPE"; break;
+ default : s = "Unknown State"; break;
+ }
+ printf("Current Modem State (%d): %s\n> ", p_ModemState, s);
+
+}
+
+// ADSL Modem Software calls this function to report events
+void AMSW_ANT_reportEvent(AMSW_ModemEvent p_Event)
+{
+ char *s;
+ switch(p_Event)
+ {
+ default : s = "UNKNOWN"; break;
+ case C_AMSW_PEER_ATU_FOUND : s = "Peer ATU Found"; break;
+ case C_AMSW_RESTART_REQUEST : s = "Restart Request"; break;
+ case C_AMSW_ACTIVATION_REQUEST : s = "Activation Request"; break;
+ case C_AMSW_L3_EXECUTED : s = "L3 Executed"; break;
+ case C_AMSW_L3_REJECTED : s = "L3 Rejected"; break;
+ case C_AMSW_L1_EXECUTED : s = "L1 Executed"; break;
+ case C_AMSW_L1_REJECTED : s = "L1 Rejected"; break;
+ case C_AMSW_L0_REJECTED : s = "L0 Rejected"; break;
+ case C_AMSW_RESTART_ACCEPTABLE : s = "Restart Acceptable"; break;
+ case C_AMSW_RESTART_NOT_ACCEPTABLE : s = "Restart Not Acceptable"; break;
+ case C_AMSW_TO_INITIALIZING : s = "Initializing"; break;
+ case C_AMSW_SHOWTIME : s = "Showtime"; break;
+ case C_AMSW_SUICIDE_REQUEST : s = "Suicide Request"; break;
+ }
+ printf("\nEvent Reported (%d): %s\n> ", p_Event, s);
+
+ if (p_Event == 4)
+ printf("\n> ");
+}
+
+// ADSL Modem Software calls this function to report the reason for failure
+void AMSW_ANT_reportModemFailure(AMSW_ModemFailure p_FailureCause)
+{
+ char *s;
+ switch(p_FailureCause)
+ {
+ case C_AMSW_UNCOMPATIBLE_LINECONDITIONS : s = "Uncompatible Line Conditions"; break;
+ case C_AMSW_NO_LOCK_POSSIBLE : s = "No Lock Possible"; break;
+ case C_AMSW_PROTOCOL_ERROR : s = "Protocol Error"; break;
+ case C_AMSW_MESSAGE_ERROR : s = "Message Error"; break;
+ case C_AMSW_SPURIOUS_ATU_DETECTED : s = "Spurious ATU Detected"; break;
+ case C_AMSW_FORCED_SILENCE : s = "Forced Silence"; break;
+ case C_AMSW_DS_REQ_BITRATE_TOO_HIGH_FOR_LITE : s = "Requested Bit Rate Too High"; break;
+ case C_AMSW_INTERLEAVED_PROFILE_REQUIRED_FOR_LITE : s = "Interleaved Profile Required for LITE"; break;
+ case C_AMSW_UNSELECTABLE_OPERATION_MODE : s = "Unselectable Operation Mode"; break;
+ case C_AMSW_STATE_REFUSED_BY_GOLDEN : s = "State Refused By Golden"; break;
+ default : s = "Unknown Cause"; break;
+ }
+ printf("\nModem Init Failure: %s (%d)\n> ",s,p_FailureCause);
+}
+
+unsigned long get_event(ADSL_DEVICE *device)
+{
+ int status;
+ T_MswCtrl ctrl;
+ unsigned long event = 0;
+
+ ctrl.code = MSW_CTL_WAIT_EVENT;
+ ctrl.subcode = 0;
+ ctrl.buffer = &event;
+
+ ctrl.length = 4; //sizeof(eventreported);
+
+ status = msw_ctrl(device,&ctrl);
+ if (status < 0) {
+ return status;
+ }
+ return event;
+}
+
+void report_events(ADSL_DEVICE *device)
+{
+ unsigned long event;
+ AMSW_ModemFailure modemFailure;
+ AMSW_ModemEvent modemEvent;
+ AMSW_ModemState modemState;
+
+ while (1)
+ {
+ sleep(1);
+ event = get_event(device);
+ if (event != 0)
+ {
+ //printf("### event in if is : %ld \n", event);
+ switch (event>>16)
+ {
+ case MSW_EVENT_FAILURE:
+ modemFailure = (AMSW_ModemFailure)(event&0xffff);
+ AMSW_ANT_reportModemFailure(modemFailure);
+ break;
+ case MSW_EVENT_REPORT:
+ modemEvent = (AMSW_ModemEvent)(event&0xffff);
+ AMSW_ANT_reportEvent(modemEvent);
+ break;
+ case MSW_EVENT_STATE:
+ modemState = (AMSW_ModemState)(event&0xffff);
+ AMSW_ANT_reportModemStateChange(modemState);
+ break;
+ case AMU_EVENT_SHUTDOWN:
+ printf("Bringing Down Line due to persistent faults!\n> ");
+ break;
+ case AMU_EVENT_RETRY:
+ printf("> Auto-Retry will take place.....\n\n> ");
+ break;
+ case AMU_EVENT_ACT_TIMEOUT:
+ printf("\n> Activation Timeout!\n");
+ printf("\n> Going to IDLE.....\n\n> ");
+ break;
+ case AMU_EVENT_INI_TIMEOUT:
+ printf("\n> Initialization Timeout!\n");
+ printf("\n> Going to IDLE.....\n\n> ");
+ break;
+ }
+ }
+ }
+}
+
+char * strupr(char *cmd)
+{
+ int i,endstr;
+ endstr=strlen(cmd);
+ for (i=0;i<endstr;i++)
+ cmd[i] = toupper(cmd[i]);
+ return cmd;
+}
+
+int main(int argc,char *argv[])
+{
+ char cmd[256];
+ char lastcmd[256]=""; //STM
+ static ADSL_DEVICE device;
+
+ printf("%s, v %d.%d.%d, " __TIME__ " " __DATE__"\n",
+ argv[0],(VERS>>8)&0xf,(VERS>>4)&0xf,VERS&0xf);
+
+ if (open_device(&device) != 0) {
+ printf("no ADSL device found !!\n");
+ return -1;
+ }
+
+ thid = fork();
+
+ if (thid == 0)
+ report_events(&device);
+
+
+ g_CustomerCfg.POTSoverlayOperationModes = AMSW_G_DMT | AMSW_ANSI | AMSW_G_LITE;
+ mode = MSW_MODE_MULTI;
+
+ printGuiString();
+
+ ModemStateUpdate(&device);
+
+
+ for(;;)
+ {
+ if (strcmp(lastcmd,"UP"))
+ printf("\n> ");
+ if (scanf("%s",cmd) != 1) break;
+ strcpy(lastcmd,strupr(cmd));
+ if (!InterpretCmdString(lastcmd,&device)) break;
+
+ }
+
+ close_device(&device);
+
+ kill(thid,SIGKILL);
+
+ return 0;
+}
More information about the Kernel-svn-changes
mailing list