diff options
282 files changed, 0 insertions, 62870 deletions
diff --git a/glabels1/ABOUT-NLS b/glabels1/ABOUT-NLS deleted file mode 100644 index 022965c..0000000 --- a/glabels1/ABOUT-NLS +++ /dev/null @@ -1,396 +0,0 @@ -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@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@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 March -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 bg ca cs da de el en eo es et fi fr - +-------------------------------------+ - a2ps | [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] | - clisp | [] [] [] [] | - cpio | [] [] [] [] | - diffutils | [] [] [] [] [] [] | - enscript | [] [] | - error | [] [] | - fetchmail | () [] [] [] () | - fileutils | [] [] [] [] [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] | - gas | [] [] | - gawk | [] [] | - gcal | [] [] | - gcc | [] [] | - gettext | [] [] [] [] [] | - gnupg | [] [] [] [] [] [] | - gprof | [] [] | - grep | [] [] [] [] [] [] | - hello | [] [] [] [] [] [] [] [] | - id-utils | [] [] [] | - indent | [] [] [] [] [] | - jpilot | () [] [] [] | - jwhois | [] [] | - kbd | [] [] | - ld | [] [] | - libc | [] [] [] [] [] [] [] | - lilypond | [] [] | - lynx | [] [] [] [] | - m4 | [] [] [] [] [] | - make | [] [] [] [] | - mysecretdiary | [] [] | - nano | [] () [] [] [] [] | - nano_1_0 | [] () [] [] [] [] | - opcodes | [] [] [] | - parted | [] [] [] [] | - ptx | [] [] [] [] [] | - python | | - recode | [] [] [] [] [] [] | - sed | [] [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] [] [] | - sketch | () [] () | - soundtracker | [] [] [] | - sp | | - tar | [] [] [] [] [] [] | - texinfo | [] [] [] [] [] | - textutils | [] [] [] [] [] | - util-linux | [] [] [] [] | - vorbis-tools | | - wdiff | [] [] [] [] [] | - wget | [] [] [] [] [] [] [] [] | - +-------------------------------------+ - bg ca cs da de el en eo es et fi fr - 1 12 11 31 36 9 1 8 39 15 1 50 - - gl he hr hu id it ja ko lv nb nl nn - +-------------------------------------+ - a2ps | () () [] | - bash | | - bfd | [] | - binutils | [] | - bison | [] [] | - clisp | [] | - cpio | [] [] [] | - diffutils | [] [] [] | - enscript | [] | - error | [] | - fetchmail | | - fileutils | [] [] [] | - findutils | [] [] [] [] [] [] | - flex | [] | - gas | | - gawk | [] | - gcal | | - gcc | | - gettext | [] | - gnupg | [] [] [] | - gprof | | - grep | [] | - hello | [] [] [] [] [] [] [] [] [] [] | - id-utils | [] | - indent | [] [] [] | - jpilot | () () | - jwhois | | - kbd | | - ld | | - libc | [] [] [] [] | - lilypond | [] [] | - lynx | [] [] | - m4 | [] [] [] [] | - make | [] [] [] [] | - mysecretdiary | | - nano | [] [] [] () [] () [] | - nano_1_0 | [] [] [] () [] () [] | - opcodes | [] | - parted | [] [] [] | - ptx | [] [] [] [] | - python | | - recode | [] [] [] | - sed | [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] | - sharutils | [] [] [] | - sketch | () | - soundtracker | [] | - sp | | - tar | [] [] [] | - texinfo | [] [] | - textutils | [] [] | - util-linux | () [] | - vorbis-tools | | - wdiff | | - wget | [] [] [] [] [] | - +-------------------------------------+ - gl he hr hu id it ja ko lv nb nl nn - 19 7 0 4 6 11 22 9 1 8 19 4 - - no pl pt pt_BR ru sk sl sv tr uk zh_TW - +----------------------------------------+ - a2ps | () () () [] [] [] () | 8 - bash | | 4 - bfd | [] [] | 5 - binutils | [] | 4 - bison | [] [] [] | 8 - clisp | | 5 - cpio | [] [] [] [] | 11 - diffutils | [] [] [] [] [] | 14 - enscript | [] [] [] | 6 - error | [] [] [] | 6 - fetchmail | () () [] | 4 - fileutils | [] [] [] [] | 12 - findutils | [] [] [] [] [] [] [] | 18 - flex | [] [] [] | 8 - gas | [] | 3 - gawk | [] [] | 5 - gcal | [] [] | 4 - gcc | [] | 3 - gettext | [] [] [] [] | 10 - gnupg | [] [] [] | 12 - gprof | [] [] | 4 - grep | [] [] [] | 10 - hello | [] [] [] [] [] [] [] | 25 - id-utils | [] [] | 6 - indent | [] [] [] [] | 12 - jpilot | () () | 3 - jwhois | () () [] | 3 - kbd | [] [] | 4 - ld | [] [] | 4 - libc | [] [] [] [] [] [] | 17 - lilypond | [] | 5 - lynx | [] [] [] | 9 - m4 | [] [] [] | 12 - make | [] [] [] [] | 12 - mysecretdiary | [] [] | 4 - nano | () [] [] [] [] | 14 - nano_1_0 | () [] [] [] | 13 - opcodes | [] [] | 6 - parted | [] [] [] | 10 - ptx | [] [] [] [] [] [] | 15 - python | | 0 - recode | [] [] [] [] | 13 - sed | [] [] [] [] [] [] | 21 - sh-utils | [] [] [] [] [] [] [] [] [] | 22 - sharutils | [] [] [] | 12 - sketch | [] () | 3 - soundtracker | [] | 5 - sp | | 0 - tar | [] [] [] [] [] [] [] | 16 - texinfo | [] [] [] | 10 - textutils | [] [] [] [] | 11 - util-linux | [] [] [] | 8 - vorbis-tools | [] | 1 - wdiff | [] [] [] [] | 9 - wget | [] [] [] [] [] [] [] | 20 - +----------------------------------------+ - 35 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW - 55 domains 5 13 2 12 25 11 11 41 34 4 7 489 - - 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 March 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@iro.umontreal.ca' to make the `.pot' files available to -the translation teams. - diff --git a/glabels1/AUTHORS b/glabels1/AUTHORS deleted file mode 100644 index 30c7f15..0000000 --- a/glabels1/AUTHORS +++ /dev/null @@ -1,69 +0,0 @@ -gLabels Author -============== - -Jim Evins <evins@snaught.com> - -Acknowledgments -=============== - -nestor di <nestordi@usuarios.retecal.es> -- Contributed the excellent splash -screen new in 0.4.3. - -Alessandro Rubini <rubini@gnu.org> -- Author of the GNU Barcode Library. -This library provides a large chunk of the barcode functionality and is -distributed with glabels. See ./barcode-0.98/README for more information. - -Olivier Berger <oberger@april.org> -- French translations -Marcus Bauer <m@7n7.de> -- German translations -Takeshi AIHANA <aihana@gnome.gr.jp> -- Japanese translations -Paulo Rogério Ormenese <pormenese@uol.com.br> -- Brazilian Portuguese trans. -Víctor Moral <victor@pasmao.net> -- Spanish translations -Vitaly Lipatov <LAV@VL3143.spb.edu> -- Russian translations -Shell, Hin-lik Hung <shell@home.shellhung.org> -- Chinese Translations -Arkadiusz Lipiec <A.Lipiec@elka.pw.edu.pl> -- Polish Translations - -The following people have submitted label templates or information about -particular products in the data/predefined-labels.template file: - - Hap <hap1@home.net> - Olivier Berger <oberger@april.org> - Marcus Bauer <m@7n7.de> - Jochen Hein <jochen@jochen.org> - Jonathan Buzzard <jonathan@buzzard.org.uk> - Jeff Davis <jdavis@hess.com> - Ludger Solbach <soulman@zhadum.de> - Darren Ross <darren@freebirdtech.com> - George Mitchell <ghmitch@neteze.com> - Douglas Bollinger <dcb@321.net> - Tim Jackson <tim@timj.co.uk> - John Stoffel <john@stoffel.org> - Dany De Bontridder <dany.db@chello.be> - Andy Longton <alongton@metamark.com> - Bostjan Muller <neonatus@neonatus.net> - John Helms <jhelms@pczplus.com> - no-exit <no-exit@plunge.net> - Mozilla from marela <mozilla@marela.com> - Holger <holger@lange-online.net> - Bill Tihen <bill@tasis.ch> - Dan Gray <dan@dangray.org> - Keith Hudson <kwhudson@netin.com> - Tamas Bondar <tamas.bondar@pp.nic.fi> - George Mitchell <ghmitch@neteze.com> - Erich Pfennig <erich@alternativ.net> - Gwen Patton <ardrhi@voicenet.com> - Miek Gieben <miekg@atoom.net> - Joerg Schmitz-Linneweber <schmitz-linneweber@aston-technologie.de> - David Makovský <yakeen@sugama.cz> - Oliver Schwank <oli@flinx.sub.org> - Akkana <akkana@shallowsky.com> - Ted Poe <poet@theworld.com> - hans-helmut.belter <hans-helmut.belter@arcor.de> - Uli Wachowitz <uli@wach-o-witz.de> - Stephan Hegel <stephan.hegel@gmx.de> - Holger Reinmann <holger.reinmann@t-online.de> - Michael Wojciechowski <wojci@netimage.dk> - Jim Mueller <jmueller@egix.net> - -And many others for their many helpful suggestions and bug reports -- thanks. - - diff --git a/glabels1/COPYING b/glabels1/COPYING deleted file mode 100644 index d60c31a..0000000 --- a/glabels1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 - - 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) <year> <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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) year 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. diff --git a/glabels1/ChangeLog b/glabels1/ChangeLog deleted file mode 100644 index 3fbdc21..0000000 --- a/glabels1/ChangeLog +++ /dev/null @@ -1,8 +0,0 @@ -2002-08-24 gettextize <bug-gnu-gettext@gnu.org> - - * Makefile.am (SUBDIRS): Add m4. - (SUBDIRS): Remove intl. - (ACLOCAL_AMFLAGS): New variable. - (EXTRA_DIST): Add config.rpath. - * configure.in (AC_OUTPUT): Add m4/Makefile. - diff --git a/glabels1/INSTALL b/glabels1/INSTALL deleted file mode 100644 index b42a17a..0000000 --- a/glabels1/INSTALL +++ /dev/null @@ -1,182 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/glabels1/Makefile.am b/glabels1/Makefile.am deleted file mode 100644 index 56db8cf..0000000 --- a/glabels1/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -## Process this file with automake to produce Makefile.in - -LIB_BARCODE_DIR = barcode-0.98 - -SUBDIRS = m4 po macros src doc - -EXTRA_DIST = config.rpath \ - glabels.desktop glabels.spec.in glabels.spec autogen.sh - -Applicationsdir = $(datadir)/gnome/apps/Applications -Applications_DATA = glabels.desktop - -pixmapdir=$(datadir)/pixmaps/glabels -configdir=$(datadir)/glabels - -install-data-local: - @$(NORMAL_INSTALL) - if test -d $(srcdir)/pixmaps; then \ - $(mkinstalldirs) $(pixmapdir); \ - for pixmap in $(srcdir)/pixmaps/*; do \ - if test -f $$pixmap; then \ - $(INSTALL_DATA) $$pixmap $(pixmapdir); \ - fi \ - done \ - fi - if test -d $(srcdir)/data; then \ - $(mkinstalldirs) $(configdir); \ - for file in $(srcdir)/data/*.template; do \ - if test -f $$file; then \ - $(INSTALL_DATA) $$file $(configdir); \ - 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 - if test -d data; then \ - mkdir $(distdir)/data; \ - for file in data/*.template; do \ - if test -f $$file; then \ - cp -p $$file $(distdir)/data; \ - fi \ - done \ - fi - if test -d $(LIB_BARCODE_DIR); then \ - if test -f $(LIB_BARCODE_DIR)/Makefile; then \ - (cd $(LIB_BARCODE_DIR); $(MAKE) distclean); \ - fi; \ - mkdir $(distdir)/$(LIB_BARCODE_DIR); \ - cp -rp $(LIB_BARCODE_DIR)/* $(distdir)/$(LIB_BARCODE_DIR); \ - fi - -ACLOCAL_AMFLAGS = -I m4 diff --git a/glabels1/NEWS b/glabels1/NEWS deleted file mode 100644 index e69de29..0000000 --- a/glabels1/NEWS +++ /dev/null diff --git a/glabels1/README b/glabels1/README deleted file mode 100644 index cc3c6a9..0000000 --- a/glabels1/README +++ /dev/null @@ -1,121 +0,0 @@ -Copyright -========= - - gLabels - a GNOME-based label and business card creation program - - Copyright (C) 2000 Jim Evins - - 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 - - For more details see the file COPYING. - - - -What is gLabels -=============== - -gLabels is a small stand-alone program for creating labels and business -cards using a laser or ink-jet printer. - -System Requirements -=================== - -GNOME-LIBS-1.2.x -GTK+-1.2.x -LIBXML-1.8.x -GNOME-PRINT-0.25 -GDK-PIXBUF-0.11 - -All of these libraries are available as part of Gnome 1.4. - -NOTE: ------ -To compile gLabels on RPM based systems, you will need the development -RPMs (e.g. gnome-print-devel) installed for each of these libraries. For -example, the following './configure' error would indicate that you may -need to install the development RPM for the gnome-print library. - - checking for GNOME-PRINT >= 0.25... not found - configure: error: - - You need GNOME-PRINT 0.25 or later to build gLabels - If you think you already have this installed, consult the README. - -To verify this, do the following: - - $ rpm -q -a | grep gnome-print - -You should get something like this (your version numbers may be different): - - gnome-print-0.31-ximian.1 - gnome-print-devel-0.31-ximian.1 - -If you get no output, you will need to install both the library and -development RPMs. If you only get the first of these lines, you still -need to install the development RPMs. If you get the above error and -you get both of these lines, you probably have a fundamental configuration -problem. These RPMs should be available from wherever you received -your gnome distribution. - -NOTE: ------ -Special Note for Mandrake 8.1: I recently installed Mandrake 8.1 on a -partition of a test machine. I found that an rpm for gdk-pixbuf-devel -was on the 2nd CD, but it has a broken dependency (it's looking for -libgr-devel, which isn't on any of the CDs) so it did not show up in -Mandrake's package manager (at least that is what I suspect). I manually -installed it with rpm using the --nodeps option, and was able to compile -with no problem. - - -Usage notes: -============ -gLabels is still in its early stages of development and thus lacks any -"real" documentation. Most folks have found it fairly easy to use, at -least for its simple composition features. Beginning with version 0.4.x, -gLabels has a document-merge capability that might not be as intuitive -as these other features. - -The first step to performing a document merge is to prepare a source -document that contains your merge data. This data could be mailing -addresses or any other data that you wish to create unique labels or -cards for. Currently only a simple back-end for text files exists -- -others are planned. The currently supported text-file format is very -simple: each line is a record; fields are delimited by tabs, -commas, or colons; and newlines can be embedded into fields by using -the "\n" entity. This file could be created using any text editor or -could be created by another program or script. - -A label must then be configured to "point at" this data file. This is -accomplished with the "merge properties" dialog. This dialog is used -to select the exact data file format and file name (location). Customized -field keys can also be defined (the default keys are the column numbers). - -Finally, once the label has been configured for a data file, field keys -can be inserted into text and barcode objects in their property dialogs. - -Now that your label is configured, gLabels will print a unique label for -each record in your source document -- substituting fields from each -record for field keys in the all text and barcode objects. - -Beginning with 0.4.3, a simple CLI front-end called "glabels-batch" is -provided to print previously created glabels files from a shell, -other programs or scripts. Do a "glabels-batch --help" for usage -information. - -Author and Acknowledgments: -=========================== - -See the AUTHORS file. diff --git a/glabels1/TODO b/glabels1/TODO deleted file mode 100644 index abfa27b..0000000 --- a/glabels1/TODO +++ /dev/null @@ -1,5 +0,0 @@ -Architecture/Design -------------------- - -- Port to Gnome 2.0 Platform - diff --git a/glabels1/acconfig.h b/glabels1/acconfig.h deleted file mode 100644 index c6f3e03..0000000 --- a/glabels1/acconfig.h +++ /dev/null @@ -1,10 +0,0 @@ -#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 -#undef HACKTEXT diff --git a/glabels1/aclocal.m4 b/glabels1/aclocal.m4 deleted file mode 100644 index d10efee..0000000 --- a/glabels1/aclocal.m4 +++ /dev/null @@ -1,1318 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p5 - -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([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, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_REQUIRE([AC_PROG_MAKE_SET])]) - -# -# 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([,]))]) - -# Add --enable-maintainer-mode option to configure. -# From Jim Meyering - -# serial 1 - -AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - AC_MSG_RESULT($USE_MAINTAINER_MODE) - AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl -] -) - -# Define a conditional. - -AC_DEFUN([AM_CONDITIONAL], -[AC_SUBST($1_TRUE) -AC_SUBST($1_FALSE) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi]) - -# aclocal-include.m4 -# -# This macro adds the name macrodir to the set of directories -# that `aclocal' searches for macros. - -# serial 1 - -dnl AM_ACLOCAL_INCLUDE(macrodir) -AC_DEFUN([AM_ACLOCAL_INCLUDE], -[ - AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) - - test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - - for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done -]) - -dnl -dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) -dnl -dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh -dnl is not found. -dnl - -AC_DEFUN([GNOME_INIT_HOOK],[ - AC_SUBST(GNOME_LIBS) - AC_SUBST(GNOMEUI_LIBS) - AC_SUBST(GNOMEGNORBA_LIBS) - AC_SUBST(GTKXMHTML_LIBS) - AC_SUBST(ZVT_LIBS) - AC_SUBST(GNOME_LIBDIR) - AC_SUBST(GNOME_INCLUDEDIR) - - AC_ARG_WITH(gnome-includes, - [ --with-gnome-includes Specify location of GNOME headers],[ - CFLAGS="$CFLAGS -I$withval" - ]) - - AC_ARG_WITH(gnome-libs, - [ --with-gnome-libs Specify location of GNOME libs],[ - LDFLAGS="$LDFLAGS -L$withval" - gnome_prefix=$withval - ]) - - AC_ARG_WITH(gnome, - [ --with-gnome Specify prefix for GNOME files], - if test x$withval = xyes; then - want_gnome=yes - dnl Note that an empty true branch is not - dnl valid sh syntax. - ifelse([$1], [], :, [$1]) - else - if test "x$withval" = xno; then - want_gnome=no - else - want_gnome=yes - LDFLAGS="$LDFLAGS -L$withval/lib" - CFLAGS="$CFLAGS -I$withval/include" - gnome_prefix=$withval/lib - fi - fi, - want_gnome=yes) - - if test "x$want_gnome" = xyes; then - - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_GNORBA_HOOK([],$2) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" - GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" - GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" - GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" - ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - fi - - if test -n "$3"; then - n="$3" - for i in $n; do - AC_MSG_CHECKING(extra library \"$i\") - case $i in - applets) - AC_SUBST(GNOME_APPLETS_LIBS) - GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` - AC_MSG_RESULT($GNOME_APPLETS_LIBS);; - capplet) - AC_SUBST(GNOME_CAPPLET_LIBS) - GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` - AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; - *) - AC_MSG_RESULT(unknown library) - esac - done - fi -]) - -dnl -dnl GNOME_INIT ([additional-inits]) -dnl - -AC_DEFUN([GNOME_INIT],[ - GNOME_INIT_HOOK([],fail,$1) -]) - -dnl -dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) -dnl -dnl if failflag is "failure" it aborts if gnorba is not found. -dnl - -AC_DEFUN([GNOME_GNORBA_HOOK],[ - GNOME_ORBIT_HOOK([],$2) - AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ - gnome_cv_gnorba_found=no - if test x$gnome_cv_orbit_found = xyes; then - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - if test -n "$GNORBA_LIBS"; then - gnome_cv_gnorba_found=yes - fi - fi - ]) - AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - AC_SUBST(GNORBA_CFLAGS) - AC_SUBST(GNORBA_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(gnorba library not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_GNORBA_CHECK], [ - GNOME_GNORBA_HOOK([],failure) -]) - -dnl -dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) -dnl -dnl if failflag is "failure" it aborts if orbit is not found. -dnl - -AC_DEFUN([GNOME_ORBIT_HOOK],[ - AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) - AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) - AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ - if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then - gnome_cv_orbit_found=no - else - gnome_cv_orbit_found=yes - fi - ]) - AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - ORBIT_CFLAGS=`orbit-config --cflags client server` - ORBIT_LIBS=`orbit-config --use-service=name --libs client server` - AC_SUBST(ORBIT_CFLAGS) - AC_SUBST(ORBIT_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(ORBit not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_ORBIT_CHECK], [ - GNOME_ORBIT_HOOK([],failure) -]) - -# isc-posix.m4 serial 1 (gettext-0.10.40) -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 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 -]) - -dnl GNOME_COMPILE_WARNINGS -dnl Turn on many useful compiler warnings -dnl For now, only works on GCC -AC_DEFUN([GNOME_COMPILE_WARNINGS],[ - AC_ARG_ENABLE(compile-warnings, - [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum) - - AC_MSG_CHECKING(what warning flags to pass to the C compiler) - warnCFLAGS= - if test "x$GCC" != xyes; then - enable_compile_warnings=no - fi - - if test "x$enable_compile_warnings" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[\ \ ]-Wall[\ \ ]*) ;; - *) warnCFLAGS="-Wall -Wunused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_compile_warnings" = "xyes"; then - warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" - fi - fi - fi - AC_MSG_RESULT($warnCFLAGS) - - AC_ARG_ENABLE(iso-c, - [ --enable-iso-c Try to warn if code is not ISO C ],, - enable_iso_c=no) - - AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) - complCFLAGS= - if test "x$enable_iso_c" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -ansi" ;; - esac - - case " $CFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCFLAGS) - if test "x$cflags_set" != "xyes"; then - CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" - cflags_set=yes - AC_SUBST(cflags_set) - fi -]) - -dnl For C++, do basically the same thing. - -AC_DEFUN([GNOME_CXX_WARNINGS],[ - AC_ARG_ENABLE(cxx-warnings, - [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) - - AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) - warnCXXFLAGS= - if test "x$GCC" != xyes; then - enable_compile_warnings=no - fi - if test "x$enable_cxx_warnings" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-Wall[\ \ ]*) ;; - *) warnCXXFLAGS="-Wall -Wno-unused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_cxx_warnings" = "xyes"; then - warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wshadow -Woverloaded-virtual" - fi - fi - fi - AC_MSG_RESULT($warnCXXFLAGS) - - AC_ARG_ENABLE(iso-cxx, - [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, - enable_iso_cxx=no) - - AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) - complCXXFLAGS= - if test "x$enable_iso_cxx" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; - esac - - case " $CXXFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCXXFLAGS) - if test "x$cxxflags_set" != "xyes"; then - CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" - cxxflags_set=yes - AC_SUBST(cxxflags_set) - fi -]) - -dnl GNOME_X_CHECKS -dnl -dnl Basic X11 related checks for X11. At the end, the following will be -dnl defined/changed: -dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK -dnl CPPFLAGS Will include $X_CFLAGS -dnl GNOME_HAVE_SM `true' or `false' depending on whether session -dnl management is available. It is available if -dnl both -lSM and X11/SM/SMlib.h exist. (Some -dnl Solaris boxes have the library but not the header) -dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" -dnl -dnl The following configure cache variables are defined (but not used): -dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} -dnl -AC_DEFUN([GNOME_X_CHECKS], -[ - AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) - dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could - dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" - dnl - dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses - dnl CPPFLAGS, not CFLAGS - CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" - - saved_ldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS $GTK_LIBS" - - gnome_cv_passdown_x_libs="$GTK_LIBS" - gnome_cv_passdown_X_LIBS="$GTK_LIBS" - gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" - gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" - - LDFLAGS="$saved_ldflags $GTK_LIBS" - -dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. - USE_DEVGTK=true - -dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) -dnl AC_EGREP_CPP(answer_affirmatively, -dnl [#include <gtk/gtkfeatures.h> -dnl #ifdef GTK_HAVE_FEATURES_1_1_0 -dnl answer_affirmatively -dnl #endif -dnl ], dev_gtk=yes, dev_gtk=no) -dnl if test "$dev_gtk" = "yes"; then -dnl USE_DEVGTK=true -dnl fi -dnl AC_MSG_RESULT("$dev_gtk") - - GNOME_HAVE_SM=true - case "$GTK_LIBS" in - *-lSM*) - dnl Already found it. - ;; - *) - dnl Assume that if we have -lSM then we also have -lICE. - AC_CHECK_LIB(SM, SmcSaveYourselfDone, - [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, - $x_libs -lICE) - ;; - esac - - if test "$GNOME_HAVE_SM" = true; then - AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) - fi - - if test "$GNOME_HAVE_SM" = true; then - AC_DEFINE(HAVE_LIBSM) - fi - - XPM_LIBS="" - AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) - AC_SUBST(XPM_LIBS) - - AC_REQUIRE([GNOME_PTHREAD_CHECK]) - LDFLAGS="$saved_ldflags" - - AC_PROVIDE([GNOME_X_CHECKS]) -]) - -# 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 -]) - -dnl -dnl And better, use gthreads instead... -dnl - -AC_DEFUN([GNOME_PTHREAD_CHECK],[ - PTHREAD_LIB="" - AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", - [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", - [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", - [AC_CHECK_FUNC(pthread_create)] - )] - )] - ) - AC_SUBST(PTHREAD_LIB) - AC_PROVIDE([GNOME_PTHREAD_CHECK]) -]) - -# Macro to add for using GNU gettext. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# Modified to never use included libintl. -# Owen Taylor <otaylor@redhat.com>, 12/15/1998 -# -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 5 - -AC_DEFUN(AM_GNOME_WITH_NLS, - [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) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS) -# 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_force_use_gnu_gettext="no" - - 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 gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_CHECK_LIB(intl, gettext, - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)], - gt_cv_func_gettext_libintl=no)]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - - # Added by Martin Baulig 12/15/98 for libc5 systems - if test "$gt_cv_func_gettext_libc" != "yes" \ - && test "$gt_cv_func_gettext_libintl" = "yes"; then - INTLLIBS=-lintl - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - fi - ]) - - if test "$CATOBJEXT" = "NONE"; then - AC_MSG_CHECKING([whether catgets can be used]) - AC_ARG_WITH(catgets, - [ --with-catgets use catgets functions if available], - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) - AC_MSG_RESULT($nls_cv_use_catgets) - - if test "$nls_cv_use_catgets" = "yes"; then - dnl No gettext in C library. Try catgets next. - AC_CHECK_LIB(i, main) - AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) - INTLOBJS="\$(CATOBJS)" - AC_PATH_PROG(GENCAT, gencat, no)dnl -# if test "$GENCAT" != "no"; then -# AC_PATH_PROG(GMSGFMT, gmsgfmt, no) -# if test "$GMSGFMT" = "no"; then -# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) -# fi -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.cat -# INSTOBJEXT=.cat -# DATADIRNAME=lib -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h -# fi - ]) - fi - fi - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" != "yes"; then - AC_DEFINE(ENABLE_NLS) - else - # Unset this variable since we use the non-zero value as a flag. - CATOBJEXT= -# dnl Mark actions used to generate GNU NLS library. -# INTLOBJS="\$(GETTOBJS)" -# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) -# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# AC_SUBST(MSGFMT) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.gmo -# INSTOBJEXT=.mo -# DATADIRNAME=share -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h - fi - - 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 /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) - AC_OUTPUT_COMMANDS( - [case "$CONFIG_FILES" in *po/Makefile.in*) - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile - esac]) - - -# # If this is used in GNU gettext we have to set USE_NLS to `yes' -# # because some of the sources are only built for this goal. -# if test "$PACKAGE" = gettext; then -# USE_NLS=yes -# USE_INCLUDED_LIBINTL=yes -# fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(AM_GNOME_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])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_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -strdup __argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY) - fi - - AM_LC_MESSAGES - AM_GNOME_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - if test "x$LINGUAS" = "x"; then - LINGUAS=$ALL_LINGUAS - fi - for lang in $LINGUAS; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to <locale.h> in the installed <libintl.h> file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include <locale.h>" - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header <locale.h>. Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - test -d intl || mkdir intl - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - 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 *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - ]) - - -# 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@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 -]) - -# lcmessage.m4 serial 2 (gettext-0.10.40) -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@cygnus.com>, 1995. - -# Check whether LC_MESSAGES is available in <locale.h>. - -AC_DEFUN([AM_LC_MESSAGES], - [if test $ac_cv_header_locale_h = yes; then - 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 - fi]) - diff --git a/glabels1/autogen.sh b/glabels1/autogen.sh deleted file mode 100755 index 36a7320..0000000 --- a/glabels1/autogen.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="the package." - -(test -f $srcdir/configure.in) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level directory" - exit 1 -} - -. $srcdir/macros/autogen.sh diff --git a/glabels1/barcode-0.98/COPYING b/glabels1/barcode-0.98/COPYING deleted file mode 100644 index a43ea21..0000000 --- a/glabels1/barcode-0.98/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - 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. diff --git a/glabels1/barcode-0.98/ChangeLog b/glabels1/barcode-0.98/ChangeLog deleted file mode 100644 index 024706d..0000000 --- a/glabels1/barcode-0.98/ChangeLog +++ /dev/null @@ -1,460 +0,0 @@ -2002-03-01 Alessandro Rubini <rubini@linux.it> - - * library.c (Barcode_Encode): handle bitsets separately, like - in Barcode_Print (otherwise, you might loose NO_CHECKSUM). - - * debian/changelog: moved to 0.98 (but should fix all debian/ stuff) - - * contrib/barcode-for-delphi.tar.gz: new, contributed by Michael Geddes - - * contrib/barcode-for-delphi.tar.gz.README: short info for file above - - * main.c (main): allow "-g" to set size of code in a table as well - -- suggested and initiallt implemented by Joachim Reichelt. - (main): fixed missing "Page: 1 1" in postscript for tables - (main): for tables don't use Encode_and_Print, use a local - unrolled version, so the default margin can be removed and - we avoid problems with negative xoff in the output phase - (first column may be offset, as noted by Karl Magnus Kolstoe) - - * doc/doc.barcode: documented change above. - - * README: removed refernces to systemy.it, I'm no more there - Added link to FreeBSD ports tree and GLabels - Organized as sections with titles - - * contrib/barcode-SVG.tar.gz: new contribution, by David J. Humphreys - - * contrib/barcode-SVG.tar.gz.README: short description of file above - - * contrib/grab-0.0.4.tar.gz: new program, by Tuukka Toivonen. - - * contrib/grab-0.0.4.tar.gz.README: short description of file above - -2002-03-01 Boszormenyi Zoltan <zboszor@externet.hu> - - * barcode.spec: new file - -2002-02-27 Alessandro Rubini <rubini@linux.it> - - * bookland/bookland.py: updated to version 0.92 by Judah Milgram - -2001-11-13 Alessandro Rubini <rubini@linux.it> - - * README: Added a pointer to the Windows port. - -2001-11-09 Cloyce D. Spradling <cloyce@headgear.org> - - * code128.c (Barcode_128b_verify): prototype fix (unsigned char). - - * ps.c (Barcode_ps_print): the comment for ascii codes must only - be printed if ascii is being printed (benign bug). - -2001-11-06 Christoph Pross <c.pross@beck-ipc.com> - - * pcl.c (Barcode_pcl_print): bugfix: bars were misplaced - -2001-10-16 Nathan D. Holmes <nh412124@ursa.cosd.fedex.com> - - ====> Version 0.97 released to ftp.systemy.it and ftp.gnu.org - - * code93.c: new file (I modified something as well - Alessandro) - - * doc/doc.barcode (Supported Encodings): added docs for code93 - - * main.c: added code93 names - - * Makefile.in (LIBOBJECTS): added code93.o - - * library.c: added code93 entry points - -2001-10-16 Alessandro Rubini <rubini@linux.it> - - * doc/manpager: added (trivial) support for @itemize, added copyright - - * sample.c (main): accept -P to create PCL output - - * doc/doc.barcode (PCL Output): added the section, using text - provided by Andrea Scopece and turning it into texinfo. - Removed also a few extra newlines that made bad man pages - -2001-10-16 Andrea Scopece <a.scopece@vizzavi.it> - - * barcode.h: added BARCODE_OUT_PCL and BARCODE_OUT_PCL_III - - * library.c (Barcode_Print): use BARCODE_OUT_PCL to select pcl_print() - - * Makefile.in (LIBOBJECTS): added pcl.o - - * pcl.c: new file, with PCL output support - -2001-10-16 Alessandro Rubini <rubini@linux.it> - - * doc/doc.barcode (Supported Encodings): added documentation for - EAN and UPC with checksum, as coded by mr. Böszörményi (below) - -2001-10-16 Boszormenyi Zoltan <zboszor@externet.hu> - - * ean.c: - - I found that barcode-0.96 does not correctly encodes UPC-E. - This was mainly because in upc_e_to_a() the switch() branches - all ended without "break;". - - Printing UPC-E did not print the leading encoding number and - the trailing UPC-A checksum. Now it does. - - Accept EAN-13 and EAN-8 with and without the checksum. - So always treat 7 and 12 digit sequences as valid EAN codes - and accept 8 and 13 digit sequences as valid EAN codes when - the last digit is the same as the calculated one. - - Accept UPC-A as above (11 or 12 digit sequences.) - - Accepts UPC-E as: - 6 digit sequence: the middle part of the code (leading '0' assumed) - 7 digit sequence: the middle part and either a leading '0' or '1', - or a trailing UPC-A checksum. In that case, leading '0' assumed. - 8 digit sequence: a leading '0' or '1', middle part, checksum - - UPC-A, UPC-E, EAN-13, and EAN-8 may all include - an additional barcode to the right of the main barcode. - - As a 7 or a 12 digit sequence may be ambiguous, please remember - that EAN is checked before UPC if you specified BARCODE_ANY. - -2001-08-20 Alessandro Rubini <rubini@linux.it> - - * sample.c (main): added upc-e and ean-8 samples - -2001-08-11 Boszormenyi Zoltan <zboszor@externet.hu> - - * ps.c (Barcode_ps_print): don't output "showpage" in EPS mode - -2001-08-11 Alessandro Rubini <rubini@linux.it> - - * README: Changed host names, added barcode-commit list. - -2000-11-29 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/doc.barcode (The Field List): 1pt == 0.352mm, not 0.0352 - (thanks to Stephen Irven for reporting) - -2000-11-09 Alessandro Rubini <rubini@morgana.systemy.it> - - ====> Version 0.96 released to ftp.systemy.it and ftp.gnu.org - - * doc/Makefile.in ($(TARGET).html): fixed bug introduced on Sep 08 - - * doc/doc.barcode (top): correctly deal with "makeinfo --html" - -2000-11-08 Alessandro Rubini <rubini@morgana.systemy.it> - - * README: new network pointers added - - * codabar.c (Barcode_cbr_encode): don't print ascii text for the - checksum. - - * doc/doc.barcode (The Intermediate Representaion): new section - Documented the new encodings by Leonid. - Promoted two sections to chapters - Added Leonid in the AUTHORS section of the manpage. - - * Makefile.in: don't remove docs in distclean, as the distribution - now includes the docs - -2000-11-07 Alessandro Rubini <rubini@morgana.systemy.it> - - * Makefile.in (clean): don't remove docs, do that only in distclean - - * doc/Makefile.in: a new life for the former Makefile (to build - with both gmake and pmake with features added on 2000-09-08) - - * configure.in: use $MAKE in checking for gmake if set - (to allow testing with BSD make) - Check if makeinfo can manage html, used for doc/Makefile.in - -2000-11-07 Leonid A. Broukhis <leob@mailcom.com> - - * code128.c (Barcode_encode_as): fixed a bug that prevented F - symbols to be correctly encoded. - - * plessey.c: new file, for Plessey encoding. - - * msi.c: new file, for MSI encoding. - - * codabar.c: new file, for CodaBar encoding. - - * code128.c (Barcode_128raw_encode): new encoding - (Barcode_128raw_verify): checker for new encoding - - * barcode.h, library.c, main.c: added code128raw, codabar, - MSI and Plessey - -2000-11-07 Hans Schou <chlor@schou.dk> - - * contrib/barcodeps-0.1.tgz: new file, sent to Alessandro on Oct 7 - -2000-10-10 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/manpager: use gsub instead of gensub, even though it may - leas to problems with some input. This achieves compatibility - with the original awk, so gawk is not needed any more - -2000-10-02 Alessandro Rubini <rubini@morgana.systemy.it> - - * ps.c (Barcode_ps_print): add a backslash in front of '(' too. - Suggested by H Y <hlyi@yahoo.com>. - (Barcode_ps_print): use ps arrays to get compact (and prettier) - PostScript output. Suggested by Hans Schou <chlor@schou.dk>. - - * main.c (get_geometry): accept "+offset+offset" to keep default size. - Suggested by Godmar Back <gback@cs.utah.edu>. - -2000-09-16 Alessandro Rubini <rubini@morgana.systemy.it> - - * ps.c (Barcode_ps_print): use "half text height" instead of - "two text heights" as minimum bar height. Suggested by - Oliver Vecernik <vecernik@aon.at>. - -2000-09-14 Alessandro Rubini <rubini@morgana.systemy.it> - - * barcode.h: added the standard ``extern "C"'' stuff for C++ - (bug reported by Dany Pardo <dani@minerva.enpl.es>) - -2000-09-08 Andrea Ferraris <andrea@gnu.systemy.it> - - * doc/Makefile: added support for pdf and html via makeinfo - - * doc/doc.barcode: added a missing trailing dot in an xref - -2000-08-28 Alessandro Rubini <rubini@morgana.systemy.it> - - * i25.c (Barcode_i25_encode): fixed checksum calculation - (thanks to Hans Schou <chlor@schou.dk> for reporting) - -2000-05-19 Alessandro Rubini <rubini@morgana.systemy.it> - - ====> Version 0.95.1 released to ftp.prosa.it - - * code128.c (Barcode_128_make_array): use code C if encoding 2 digits - -2000-05-08 Alessandro Rubini <rubini@morgana.systemy.it> - - * cmdline.c (commandline_errormsg): removed "?:" gcc extension - - * configure.in: added checks for unistd.h and strcasecmp, as - windows doesn't have them (thanks Marten Karl) - -2000-04-21 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/Makefile: modified to build with both gmake and pmake - - * Makefile: modified to build with both gmake and pmake - -2000-04-20 Alessandro Rubini <rubini@morgana.systemy.it> - - * Makefile.in (.depend): removed gmake-specific features. - Thanks to Jukka A. Ukkonen for reporting. - - * configure.in: detect gmake and avoid its features if not there - - * ps.c (Barcode_ps_print): fix: codes with (relatively) short bars - were enlarged in height instead of reduced in width (also - the enlarging was wrong). Thanks to Rob Seace for reporting. - -2000-04-09 Alessandro Rubini <rubini@morgana.systemy.it> - - * code128.c (Barcode_128_encode): removed extra messages to stderr, - forgot in the code when I finished code128 support - - * doc/doc.barcode: bugfix: in the description of geometry, the unit - of measure is configurable - -2000-02-03 Alessandro Rubini <rubini@morgana.systemy.it> - -====> Version 0.95 released to ftp.prosa.it and ftp.gnu.org - -2000-01-26 Alessandro Rubini <rubini@morgana.systemy.it> - - * code128.c (Barcode_128_encode): new encoding: full-featured code128 - - * README: added reference to original ftp site - -2000-01-05 Alessandro Rubini <rubini@morgana.systemy.it> - - * main.c (get_page_geometry): avoid using snprintf(), missing in HP/UX - - * code39.c (Barcode_39_verify): added missing parens (a syntax error, - but only apparent where islower() is not a macro). Thanks to - Alexandre Oliva for finding it out. - -2000-01-04 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/doc.barcode (The API): removed spurious "flags" argument - from description of Barcode_Encode_and_Print(). - Thanks to Willy Wittesaele for noting the error. - -1999-12-24 Alessandro Rubini <rubini@morgana.systemy.it> - - * main.c (get_geometry): fixed the y margin (thanks to Steve Kunath) - -====> Version 0.94 released to ftp.prosa.it and ftp.gnu.org - -1999-10-24 Alessandro Rubini <rubini@morgana.systemy.it> - - * INSTALL: added instructions to install on a Debian GNU/Linux system - - * debian/*: edited information for proper Debian support - - * debian/rules (binary-arch): new file, from "deb-make" - - * Makefile.in (install): added "-m 0644" to install non-executables - - * code128.c (Barcode_128b_encode): fixed checksum calculation. - -====> Version 0.93 released to ftp.prosa.it and ftp.gnu.org - -1999-09-26 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/doc.barcode: fixed the rendering of complex options (-g and -t) - Removed extra "table of contents" heading in the ps output - Changed attribution on cover page - - * main.c (get_table and others): be more specific in error msgs - (get_page_geometry): numeric specification is according to "-u" - (get_table): accept unsymmetric margin specification - (option_table): added "-u" to accept "cm", "mm", "in", "pt" - (get_page_geometry): bugfix: numeric spec was always consideder mm - - * cmdline.c (commandline): don't always print help - - * Makefile.in ($(INFO)): added missing dependency: distributed docs - formats were out of date with distributed doc source. - -1999-09-13 Alessandro Rubini <rubini@amelia.prosa.it> - - * main.c (main): print tables: y used xmargin (Tim Withers,Jon Bakken) - -1999-09-06 Alessandro Rubini <rubini@plinio.prosa.it> - - * Makefile.in: prevent -Wall when compiling getopt. - - * i25.c, ean.c, ps.c: switched to unsigned char, to prevent warnings - on newer gcc's (thanks Al Piszcz) - -====> Version 0.92 released to ftp.prosa.it and ftp.gnu.org - -1999-08-31 Alessandro Rubini <rubini@plinio.prosa.it> - - * i25.c: the right guard was thinner than other bars - - * doc/doc.barcode: spelling and manpage fixes (thanks Joachim Schaaf) - -====> Version 0.91.4 released to ftp.prosa.it - -1999-08-23 Thad Floryan <thad@thadlabs.com> - - * main.c (strerror): replacement strerror selected by autoconf - -1999-08-06 Alessandro Rubini <rubini@morgana.systemy.it> - - * changed all "ENODATA" in "EINVAL", as some system miss ENODATA - - * Makefile.in (all): removed ".depend" from all, as it needs gcc - - * i25.c (Barcode_i25_encode): fixed wrong free() in an unlinely path - - * ean.c (Barcode_ean_encode): don't use sprintf's result, as some - systems return a char pointer instead of the number of chars. - - * configure.in: new file, as autoconf support is being added - -====> Version 0.91.3 released to ftp.prosa.it - -1999-08-05 Alessandro Rubini <rubini@morgana.systemy.it> - - * code128.c (Barcode_128c_encode): fixed malloc of textinfo (was short) - - * i25.c (Barcode_i25_encode): new encoding: interleaved 2 of 5 - - * ean.c (Barcode_ean_encode): enlarged static "text", to fit add-5 - - * code128.c (Barcode_128b_encode): new encoding: 128-B - -====> Version 0.91.2 released to ftp.prosa.it - -1999-08-04 Alessandro Rubini <rubini@morgana.systemy.it> - - * bookland/bookland.py: upgraded to version 0.06 (Judas Milgram) - - * ean.c (Barcode_ean_encode): fixed layout of 1st/last digit in UPC-A - - * code128.c (Barcode_128c_encode): fixed checksum calculation - -====> Version 0.91.1 released to ftp.prosa.it - -1999-07-09 Alessandro Rubini <rubini@morgana.systemy.it> - - * sample.c (main): due changes to show code128-C - - * code128.c (Barcode_128c_encode): implemented code 128-C - - * ps.c (Barcode_ps_print): Accept float position and font size - - * code39.c (Barcode_39_encode): reduced font (looked too big) - -====> Version 0.91 released to both ftp.prosa.it and ftp.gnu.org - -1999-07-08 Alessandro Rubini <rubini@morgana.systemy.it> - - * ps.c (Barcode_ps_print): shrink all the bars by 0.15 points - (Barcode_ps_print): Use Helvetica as font, not Courier-Bold - (Barcode_ps_print): remember previous font to make shorter ps output - -1999-07-07 Alessandro Rubini <rubini@morgana.systemy.it> - - * bookland/bookland.py: new enntry, by Judah Milgram. - - * ean.c (Barcode_isbn_verify): fixed bug with "-X" codes (thanks Judah) - -====> Version 0.90.3 released to ftp.prosa.it/pub/software - -1999-07-07 Alessandro Rubini <rubini@morgana.systemy.it> - - * doc/doc.barcode: fixed the "BUGS" section (remove fixed stuff) - - * ean.c (Barcode_ean_encode): added '+' markers in partial and textinfo - - * ps.c (Barcode_ps_print): added support for text over bars ('+' mode) - -====> Version 0.90.2, internal checkpoint - -1999-07-06 Alessandro Rubini <rubini@morgana.systemy.it> - - * Makefile: dirty autodetect of libpaper - - * main.c (get_page_geometry): parse a cmdline argument (mcm@glisco.it) - (main): added "--version" - (main): added diagnostic message for unencodable strings - -====> Version 0.90.1 released to ftp.prosa.it/pub/software - -1999-07-03 Alessandro Rubini <rubini@morgana.systemy.it> - - * barcode.h: removed BARCODE_OUT_PG_* as only the library doesn't - need to hack with the page size. - - * ean.c (Barcode_ean_encode): supplemental 2 and 5 encodings (no text) - - * library.c: use unsigned char all over the place, to prevent warnings - -1999-07-01 Alessandro Rubini <rubini@morgana.systemy.it> - - * ean.c: added EAN-8 and UPC-E support - - * Updated the address of the FSF in any source file - - * README: new file. - -====> Version 0.90 is the first public release. No Changelog up to now. diff --git a/glabels1/barcode-0.98/INSTALL b/glabels1/barcode-0.98/INSTALL deleted file mode 100644 index 5a6cb87..0000000 --- a/glabels1/barcode-0.98/INSTALL +++ /dev/null @@ -1,31 +0,0 @@ - -Installing on generic Unix systems ----------------------------------- - -The package includes both a library and a standalone program. -To install everything try - - ./configure && make && make install - -To uninstall, try - - make uninstall - -You may have problems compiling the package on non-GNUish systems, -because the tool currently uses both gmake and gawk features, and I have -no access to non-gnu systems. If your operating system isn't able to -compile barcode and you are willing to help porting, feel free to call me. - - -Installing on Debian/GNU systems --------------------------------- - -The suggested installation here includes creation of a Debian package: - - debian/rules binary - -Then, just install using dpkg: - - dpkg -i ../barcode-0.98_*.deb - -(the "*" here will represent your architecture: "i386", "alpha", "sparc", ...) diff --git a/glabels1/barcode-0.98/Makefile.in b/glabels1/barcode-0.98/Makefile.in deleted file mode 100644 index 848aa26..0000000 --- a/glabels1/barcode-0.98/Makefile.in +++ /dev/null @@ -1,141 +0,0 @@ -# -# This Makefile should run fine with both pmake and gmake -# - -CC = @CC@ -CFLAGS = @CFLAGS@ @DEFS@ @NO_GETOPT@ @NO_LIBPAPER@ @NO_STRERROR@ -RANLIB = @RANLIB@ - -INSTALL = @INSTALL@ - -LDFLAGS = -L. -l$(TARGET) @LIBPAPER@ - -prefix = @prefix@ -BINDIR = $(prefix)/bin -LIBDIR = $(prefix)/lib -INCDIR = $(prefix)/include -MAN1DIR = $(prefix)/man/man1 -MAN3DIR = $(prefix)/man/man3 -INFODIR = $(prefix)/info - -# getopt may be installed or not, if not take our copy -GETOPT_O = @GETOPT_O@ - -TARGET = barcode -LIBRARY = lib$(TARGET).a -MAN1 = $(TARGET).1 -MAN3 = $(TARGET).3 -INFO = doc/$(TARGET).info -HEADER = $(TARGET).h - -LIBOBJECTS = library.o ean.o code128.o code39.o code93.o i25.o \ - msi.o plessey.o codabar.o \ - ps.o pcl.o -EXEOBJECTS = main.o cmdline.o $(GETOPT_O) -ALLSOURCES = $(LIBOBJECTS:.o=.c) $(EXEOBJECT:.o=.c) - - -#Hmm... "RM" is undefined in pmake -RM = rm - -all: $(TARGET) $(LIBRARY) $(MAN1) $(MAN3) $(INFO) sample - -$(TARGET): $(LIBRARY) $(EXEOBJECTS) - $(CC) $(CFLAGS) $(EXEOBJECTS) $(LDFLAGS) -o $(TARGET) - -sample: sample.o $(LIBRARY) - $(CC) $(CFLAGS) sample.o $(LDFLAGS) -o $@ - -# Avoid the standard CFLAGS, to avoid -Wall and -DNO_GETOPT -compat/getopt.o: compat/getopt.c - $(CC) -O -c compat/getopt.c -o $@ - -$(LIBRARY): $(LIBOBJECTS) - $(AR) r $(LIBRARY) $(LIBOBJECTS) - $(RANLIB) $(LIBRARY) - -$(MAN1) $(MAN3): doc/doc.$(TARGET) - awk -f doc/manpager doc/doc.$(TARGET) - - -# Unfortunately, pmake has no "-C". Also, "pmake -n" doesn't follow the cd. -$(INFO): doc/doc.$(TARGET) - cd doc && $(MAKE) - -install: - $(INSTALL) -d $(BINDIR) $(INCDIR) $(LIBDIR) $(MAN1DIR) \ - $(MAN3DIR) $(INFODIR) - $(INSTALL) -c $(TARGET) $(BINDIR) - $(INSTALL) -c -m 0644 $(HEADER) $(INCDIR) - $(INSTALL) -c -m 0644 $(LIBRARY) $(LIBDIR) - $(INSTALL) -c -m 0644 $(MAN1) $(MAN1DIR) - $(INSTALL) -c -m 0644 $(MAN3) $(MAN3DIR) - $(INSTALL) -c -m 0644 $(INFO) $(INFODIR) - -uninstall: - $(RM) -f $(BINDIR)/$(TARGET) - $(RM) -f $(INCDIR)/$(HEADER) - $(RM) -f $(LIBDIR)/$(LIBRARY) - $(RM) -f $(MAN1DIR)/$(MAN1) - $(RM) -f $(MAN3DIR)/$(MAN3) - $(RM) -f $(INDODIR)/$(INFO) - -#Make clean keeps the compiled documents -clean: - $(RM) -f *.o */*.o *~ */*~ $(TARGET) $(LIBRARY) - $(RM) -f $(MAN1) $(MAN3) core sample - cd doc && $(MAKE) terse - $(RM) -f .depend - -distclean: clean - if [ -f build ]; then debian/rules clean; fi - # remove the configure stuff as well - $(RM) -f Makefile config.h config.log config.status config.cache \ - doc/Makefile - -cleanest: clean - cd doc && $(MAKE) clean - -Makefile: Makefile.in configure - ./configure - -configure: configure.in - autoconf - -.depend: $(ALLSOURCES) - $(CC) $(CFLAGS) -MM $(ALLSOURCES) > $@ - -depend: .depend - -tar: - @if [ "x" = "x$(RELEASE)" ]; then \ - n=`basename \`pwd\``; cd ..; tar cvf - $$n | gzip > $$n.tar.gz; \ - echo 'you can set a numeric $$(RELEASE) to make a named tar'; \ - else \ - if [ -d ../$(TARGET)-$(RELEASE) ]; then \ - rm -rf ../$(TARGET)-$(RELEASE); \ - fi; \ - mkdir ../$(TARGET)-$(RELEASE) || exit 1; \ - cp -a . ../$(TARGET)-$(RELEASE) && cd .. && \ - tar --exclude '*/CVS*' \ - -cvzf $(TARGET)-$(RELEASE).tar.gz $(TARGET)-$(RELEASE); \ - fi - -# print the version, as I usually forget to update it when distributing -printv: - @grep -n VERSION $(HEADER) /dev/null - @grep -n set.version doc/doc.$(TARGET) /dev/null - @grep -n dpkg.-i INSTALL /dev/null - -# and this is how I make the distribution -distrib: $(INFO) distclean tar printv - - -.PHONY: all install uninstall mostlyclean clean disclean depend \ - tar printv distrib - -# Only if make is gmake, have a rule to conditionally include .depend -@GMAKEDEPEND0@ -@GMAKEDEPEND1@ -@GMAKEDEPEND2@ - diff --git a/glabels1/barcode-0.98/README b/glabels1/barcode-0.98/README deleted file mode 100644 index d3ae2a7..0000000 --- a/glabels1/barcode-0.98/README +++ /dev/null @@ -1,93 +0,0 @@ - -NETWORK LINKS -============= - -This is GNU-barcode. The latest release can be downloaded from ftp.gnu.org -and mirrors: - ftp://ftp.gnu.org/pub/gnu/barcode/ - -It is also available from my own ftp/http server - ftp://ar.linux.it/pub/barcode/ - http://ar.linux.it/pub/barcode/ (same as above). - -The current source tree is available by anonymous CVS. See - http://ar.linux.it/software/#cvs - -Plesae note that ar.linux.it/pub/barcode also includes CVS snapshots, -semi-atumatically taken when I commit stuff to CVS. Note that CVS -snapshots include "CVS/" directories, so you can then "cvs update" for -further updates. - -The documentation is online at: - http://ar.linux.it/software/barcode - -The MS-Windows port is maintained at: - http://gnuwin32.sourceforge.net/packages/barcode.htm - -It as also been included in the FreeBSD ports tree in the "graphics" section. -This means /usr/ports/graphics/barcode. It's thus available from: - http://www.freebsd.org/ports/graphics.html - -GLabels, at http://snaught.com/glabels/, uses barcode internally, too. - -DESCRIPTION -=========== - -The package is meant to solve most needs in barcode creation with a -conventional printer. It can create printouts for the conventional -product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well -as a few other formats. Ouput is generated as either Postscript or -Encapsulated Postscript (other back-ends may be added if needed). - -The package is released as both a library and a command-line frontend, -so that you can include barcode-generation into your application. The -program is released in the hope that is proves useful but without any -warranty, according to the GPL Licence (see ./COPYING). - -If you're specifically interested in making an ISBN (Bookland EAN) -symbol, you might try to get "bookland.py" by Judah Milgram -(http://www.cgpp.com/bookland/, whose version 0.92 is also included in -the directory "bookland" within this package, for your convenience). -While my main target is flexibility his main target is strict -adherence to the standards. Bookland is free software like the barcode -library and will probabily have its role in the GNU project. -Bookland.py is a self-documenting program, you'll enjoy browsing its -source code. - -Other contributed patches and/or software are available in the -contrib/ directory. - -Please take the "no-warranty" disclaimer seriously: even though I -spent reasonable efforts to make sure the output is useable in -production you should verify it suits your needs as a faulty bar can -cost you a bundle, and you'll be on your own. It's up to you to verify -that the symbol is valid (and, obviously, I'd like to know about any -problem you encounter). [This paragraph copied verbatim from bookland.py] - - -ACKNOWLEDGMENTS -=============== - -I would like to thank both Judah Milgram and Michele Comitini -(mcm@glisco.it) for their help with this tool, as well as Jim Westveer -for introducing me to Debian packaging. Several encodings have been -implemented by Leonid A. Broukhis (leob@mailcom.com). - - -MAILING LISTS -============= - -There is a mailing list where development is coordinated, called -barcode@lists.linux.it . To get subscribed you should - echo subscribe | mail barcode-request@lists.linux.it -or anything equivalent. - -To receive notification of CVS commit messages, please subscribe to -barcode-commit@ar.linux.it, by issuing: - echo subscribe | mail barcode-commit-request@ar.linux.it - -(if you guess, "ar" or "arcana" is my own server, while lists.linux.it -is the mail server of the italian association of gnu/linux users). - -/alessandro (rubini@gnu.org) - diff --git a/glabels1/barcode-0.98/TODO b/glabels1/barcode-0.98/TODO deleted file mode 100644 index c91c79c..0000000 --- a/glabels1/barcode-0.98/TODO +++ /dev/null @@ -1,23 +0,0 @@ - - Possible enhancements that I'd like to add - -* verbose mode, printing position information to stderr - -* document how a new encoding standard can be added - -* add Barcode_String, which has been contributed - -* EAN128 (as agreed with Dani Pardo) - -* Postnet and associated encoding-specific bar definitions - -* Use texinfo 4 with images - -* shrink the bars to account for ink spreading - - Currently, small barcodes don't get rendered well. While - version 0.91 and later subtracts 0.15 points from the size of - the bars (I found that this makes good results for small - bars), a smart alghorithm to shrink the bars is needed to get - lighter prints at small sizes without loosing readability. - diff --git a/glabels1/barcode-0.98/barcode.h b/glabels1/barcode-0.98/barcode.h deleted file mode 100644 index 6b9bdf4..0000000 --- a/glabels1/barcode-0.98/barcode.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * barcode.h -- definitions for libbarcode - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#ifndef _BARCODE_H_ -#define _BARCODE_H_ - -#include <stdio.h> - -#define BARCODE_VERSION "0.98" -#define BARCODE_VERSION_INT 9800 - -/* - * The object - */ -struct Barcode_Item { - int flags; /* type of encoding and decoding */ - char *ascii; /* malloced */ - char *partial; /* malloced too */ - char *textinfo; /* information about text positioning */ - char *encoding; /* code name, filled by encoding engine */ - int width, height; /* output units */ - int xoff, yoff; /* output units */ - int margin; /* output units */ - double scalef; /* requested scaling for barcode */ - int error; /* an errno-like value, in case of failure */ -}; - -/* - * The flags field - */ -#define BARCODE_DEFAULT_FLAGS 0x00000000 - -#define BARCODE_ENCODING_MASK 0x000000ff /* 256 possibilites... */ -#define BARCODE_NO_ASCII 0x00000100 /* avoid text in output */ -#define BARCODE_NO_CHECKSUM 0x00000200 /* avoid checksum in output */ - -#define BARCODE_OUTPUT_MASK 0x000ff000 /* 256 output types */ -#define BARCODE_OUT_EPS 0x00001000 -#define BARCODE_OUT_PS 0x00002000 -#define BARCODE_OUT_PCL 0x00004000 /* by Andrea Scopece */ -/* PCL_III 0x00008000 */ -#define BARCODE_OUT_PCL_III 0x0000C000 -#define BARCODE_OUT_NOHEADERS 0x00100000 /* no header nor footer */ - -enum { - BARCODE_ANY = 0, /* choose best-fit */ - BARCODE_EAN, - BARCODE_UPC, /* upc == 12-digit ean */ - BARCODE_ISBN, /* isbn numbers (still EAN13) */ - BARCODE_39, /* code 39 */ - BARCODE_128, /* code 128 (a,b,c: autoselection) */ - BARCODE_128C, /* code 128 (compact form for digits) */ - BARCODE_128B, /* code 128, full printable ascii */ - BARCODE_I25, /* interleaved 2 of 5 (only digits) */ - BARCODE_128RAW, /* Raw code 128 (by Leonid A. Broukhis) */ - BARCODE_CBR, /* Codabar (by Leonid A. Broukhis) */ - BARCODE_MSI, /* MSI (by Leonid A. Broukhis) */ - BARCODE_PLS, /* Plessey (by Leonid A. Broukhis) */ - BARCODE_93 /* code 93 (by Nathan D. Holmes) */ -}; - -#define BARCODE_DEFAULT_MARGIN 10 - -#ifdef __cplusplus -extern "C" { -#endif -/* - * Create and destroy barcode structures - */ -extern struct Barcode_Item *Barcode_Create(char *text); -extern int Barcode_Delete(struct Barcode_Item *bc); - -/* - * Encode and print - */ -extern int Barcode_Encode(struct Barcode_Item *bc, int flags); -extern int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags); - -/* - * Choose the position - */ -extern int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, - int xoff, int yoff, double scalef); - -/* - * Do it all in one step - */ -extern int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, - int xoff, int yoff, int flags); - - -/* - * Return current version (integer and string) - */ -extern int Barcode_Version(char *versionname); - -#ifdef __cplusplus -} -#endif - -#endif /* _BARCODE_H_ */ diff --git a/glabels1/barcode-0.98/barcode.spec b/glabels1/barcode-0.98/barcode.spec deleted file mode 100644 index eccb602..0000000 --- a/glabels1/barcode-0.98/barcode.spec +++ /dev/null @@ -1,84 +0,0 @@ -%define name barcode -%define ver 0.98 -%define rel 1 -%define prefix /usr -%define sysconfdir /etc - -Summary: GNU barcode -Name: %name -Version: %ver -Release: %rel -Copyright: GPL -Group: Applications/Productivity -Source: ftp://ar.linux.it/pub/barcode/%name-%{ver}.tar.gz -BuildRoot: /var/tmp/%name-%{ver}-root -URL: http://gnu.systemy.it/software/barcode -Prefix: %prefix - -%description -This is GNU-barcode. -The package is meant to solve most needs in barcode creation with a -conventional printer. It can create printouts for the conventional -product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well -as a few other formats. Ouput is generated as either Postscript or -Encapsulated Postscript (other back-ends may be added if needed). - -%package devel -Summary: GNU barcode files for development -Group: Development/Libraries - -%description devel -This is GNU-barcode. -The package is meant to solve most needs in barcode creation with a -conventional printer. It can create printouts for the conventional -product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well -as a few other formats. Ouput is generated as either Postscript or -Encapsulated Postscript (other back-ends may be added if needed). - -This package contain the C header, the static library and man page -for development. - -%prep -%setup - -%ifarch alpha - ARCH_FLAGS="--host=alpha-redhat-linux" -%endif - -export -n LANG LINGUAS LC_ALL -if [ ! -f configure ]; then - CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} -else - CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} -fi - -%build -export -n LANG LINGUAS LC_ALL - -if [ "$SMP" != "" ]; then - (make "MAKE=make -k -j $SMP"; exit 0) - make -else - make -fi - -%install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT -make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install - -%clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-, root, root) - -%doc COPYING ChangeLog INSTALL README TODO doc/*.html doc/*.pdf doc/*.ps - -%attr(0755,root,root) %{prefix}/bin/barcode -%attr(0644,root,root) %{prefix}/info/barcode.info* -%attr(0644,root,root) %{prefix}/man/man1/barcode.1* - -%files devel -%attr(0644,root,root) %{prefix}/include/barcode.h -%attr(0644,root,root) %{prefix}/lib/libbarcode.a -%attr(0644,root,root) %{prefix}/man/man3/barcode.3* diff --git a/glabels1/barcode-0.98/bookland/bookland.py b/glabels1/barcode-0.98/bookland/bookland.py deleted file mode 100644 index 373587c..0000000 --- a/glabels1/barcode-0.98/bookland/bookland.py +++ /dev/null @@ -1,884 +0,0 @@ -#!/usr/local/bin/python - -MYNAME="bookland.py" -MYVERSION="0.92" -COPYRIGHT="(C) 1999-2001 J. Milgram" -DATE = "Jan. 2002" -MAINTAINER = "bookland-bugs@cgpp.com" - -# Copyright (C) 1999,2000 Judah Milgram -# -# bookland.py - generate Bookland EAN symbol for ISBN encoding -# -# 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. -# -# ============================================================================== -# -# usage: bookland.py [ISBN] [price-code] > output.eps -# -# ISBN - the ISBN, with or without check digit, with or without hyphens. -# default: 1-56592-197-6 ("Programming Python"). If the check digit -# is provided on the command line, it is verified. If not, it is -# calculated. It's up to you to get the hyphenation right - it's -# important, and something the program can't calculate for you. -# -# price - the five digit add-on code. Usually used to indicate the price, -# in which case the first digit indicates the currency (4=$CAN, -# 5=$US, etc.). The remaining digits indicate the price, with -# decimal point assumed to be between the digit 3 and 4. -# For example: $US 6.95 = 50695, $CAN 35.00 = 43500. Instead of a -# price code, a 5 digit add-on ranging from 90000-98999 can be -# used for internal purposes. BISG recommends just using 90000 if -# you don't want to specify a price. Add-ons ranging from 99000 to -# 99999 have been reserved for special use. -# -# An Encapsulated Postscript file (eps) is sent to standard out. This may in turn -# be converted to other formats using the pbmplus package. You may have trouble -# getting the OCRB to map correctly. If you already have the font, you can look in -# the Fontmap file to see what your system calls it, and edit the fontnames accordingly -# (see below). If you don't have it, you might find it on your DOS system. You -# need a .pfa/.pfb (Type 1) or .ttf (TrueType). Your Postscript interpreter might -# or might not be able to deal with TrueType. In any event, in an emergency, you -# might get away with Helvetica. Note that as of 1990 BISG no longer requires the -# ISBN to be printed in OCR-A. -# -# Take the "no-warranty" disclaimer seriously. Going to print with a faulty bar -# can cost you a bundle, and you'll be on your own. It's up to you to verify that -# the symbol is valid. If you need "corporate accountability", try the Book -# Industry Study Group at (212) 929-1393 or the US ISBN Agency at (908) 665-6770 -# and ask for a list of commercial vendors. Outside the US, don't know. -# -# Feedback welcome. If you discover a case where the program generates a faulty -# symbol, I definitely want to hear about it - write me at milgram@cgpp.com or -# P.O. Box 8376, Langley Park, MD 20787, USA -# -# INSTALLATION: -# -# If you have a Python interpreter on your system, you're done. Just put this file -# somewhere in your path and give it execute permission. If you haven't installed -# Python, see http://www.python.org. It has been ported to Macs, DOS, and MS-Windows. -# -# ABOUT THE BOOKLAND EAN -# -# The most difficult part of this project was finding the documents that define -# the Bookland EAN. There appears to be no single, authoritative source that -# provides all the information required. Some good sources: -# -# [1] "Machine-Readable Coding Guidelines for the U.S. Book Industry", Book -# Industry Study Group, New York, Jan., 1992. (212) 929-1393 -# [2] "UPC Symbol Specification Manual", Uniform Code Council Inc., -# Dayton, Ohio, January 1986 (May 1995 Reprint). (937) 435-3870; I found it -# at http://www.uc-council.org/d36-t.htm -# [3] "EAN Identification for Retail/Trade Items", EAN International. I found it -# in Feb. 1999 at http://www.ean.be/html/Numbering.html -# [4] "Hyphenation Instructions", web page at: -# http://www.isbn.org/standards/home/isbn/international/hyphenation-instructions.asp -# -# The starting point of the exercise is the ISBN, assigned by the national ISBN -# Agency. This is a 10 digit number, the last being a check digit. The ISBN is -# converted to a 13 digit EAN number. The first three digits of the EAN-13 indicate -# the country or region. A prefix of 978 has been assigned to books, regardless -# of country of origin (hence, "Bookland") [3]. The remaining ten digits are the -# first 9 digits of the ISBN followed by the EAN-13 check digit. -# -# It seems the EAN-13 check digit can be calculated using the same algorithm as the -# UPC Version A number. Note that the EAN-13 check digit is always between 0 and 9, -# compare with ISBN check digit which can range to 10 ("X"). See Reference [2], -# Section 2 and Appendix G for details of creation of the EAN-13 symbol. Table 2 of -# Appendix G provides a good comparison of the UPC-A and EAN-13 symbols. -# -# The 5 digit add-on (here called, "UPC5") is defined in Ref. [2] Appendix D. -# The ">" to the right of the five digit code serves to enforce the "quiet zone" to -# the right of the bar pattern. Can't remember where I read that. It's probably -# optional. According to [1], in the UK, three horizontal bars appear over price -# add-ons. Haven't implemented that here. The UPC5 encoding is based on UPC-A and -# UPC-E. -# -# According to [2], Section 3, the EAN-13 numbers and 5-digit add-ons are supposed -# to be printed in OCR-B. The ISBN itself is printed above the EAN-13 symbol. At -# one time it was to be printed in OCR-A, but as of 1990 this requirement has been -# dropped [1], and I assume this means you can use any font you like. -# -# SEE ALSO: -# -# "TinyHelp 5 - Making ISBN Barcodes", D. Byram-Wigfield. Another approach to making -# the ISBN barcode symbol. I saw it at -# http://www.cappella.demon.co.uk/index.html/ -# but haven't tried it. -# -# "XBarcode" - nice open-source X-Windows program for generating all sorts of bar codes. -# It does much more than this program, but didn't seem to do the UPC -# 5-digit add-on or do the ISBN->EAN13 calculation (as of v. 2.11). Might -# have made more sense to add this capability, but I needed a Python project. -# In any event, their license forbids distribution in modified form! -# -# HYPHENATION -# -# bookland.py includes automatic hyphenation for ISBN's in group 0 and 1 -# (English-language). This is based on my reading of Ref [4]. If in doubt, -# users can use the "-y" option to force the program to accept the hyphenation -# as input. For other ISBN groups and for ISMN's, no hyphenation is performed -# other than to ensure a hyphen is placed after the group identifier and before -# the check digit. -# -# ABOUT THE ISMN: -# -# See the ISMN Users' Manual, 3rd Edition, 1998, ISBN 3-88053-070-X, published by -# the International ISMN Agency, Staatsbibliothek Preussischer Kulturbesitz, Berlin. -# I found my copy at http://www.ismn.spk-berlin.de/download/ISMNmanual.pdf -# -# An ISMN is just like an ISBN, except: -# - first character is an "M" -# - the "M" counts as a "3" for computing the ISMN check digit (last digit) -# - the checksum weights are 3,1,3,1,3,1,3,1,3, sum to be divisible by "10". This -# means the last character is always a numerical digit, never an "X". -# - the EAN number is "979" plus the *entire* ten character ISMN, except the -# "M" is replaced by "0". Note this means the ISMN checksum is identical to the -# corresponding EAN-13 checksum (excercise left to the reader). -# -# When bookland.py detects an "M" in the first position of the ISBN, it interprets -# it as an ISMN and proceeds accordingly. The 5-digit price code symbol is suppressed. -# -# BAR WIDTH REDUCTIONS -# -# Starting Version 0.92, the widths of the individual bars can be reduced using the -# "-r" option (units are inches). This is to compensate for bleed during printing. -# I don't know when it's a good idea to actually use this; in any event consult with -# your printer first. If not input, it defaults to zero (no reduction). -# -# ABOUT PYTHON -# -# See http://www.python.org -# -# TO DO: -# -# - Generalize to more bar codes, starting with UPC-A and UPC-E. "Plain" EAN13 is -# already built in, could add command line argument to generate that instead of -# Bookland. -# - Make font sizes and placement easier to configure - not sure I have it right. -# Does human-readable 5-digit code take wider font spacing? -# - Clean up bounding box stuff. -# - Bells and whistles. -# - GUI? -# -# HISTORY: -# -# 1/2002 - v 0.92 add ISMN support (thanks to Lars-Henrik Nysten for this suggestion) -# re-wrote bar generation to preclude possibility of white hairlines -# between adjacent black modules. Thanks to Tero Lindfors for -# reporting this bug. -# new -o option to write eps to file rather than stdout -# new -x option for "check only" (verifies check digit) -# new -r option for bar width reduction (compensate for print bleed) -# new -s option to scale module (bar) height (Lars-Henrik Nysten again) -# can suppress UPC-5 price code by entering empty string. (thanks to -# Jacques Du Pasquier for this suggestion) -# re-wrote ISBN/ISMN sanity checks -# lowercase alphas ("x" for ISBN and "m" for ISMN) now ok on input -# fix "long" command line options. -# 10/2001 - v 0.91 add -z option for quiet zone ">" -# add -f option for fonts -# re-write command line parsing to use getopt -# 1/2000 - v 0.09 eliminate use of eval -# 9/99 - v 0.08 accomodate different versions of OCRB by fitting -# all strings to prescribed width. Thanks to Toby Gadd -# for reporting this problem and Peter Deutsch for -# help finding the fix. -# 7/99 -v0.05-0.07 improve error handling. -# 3/27/99 - v0.04 add "--help" and "--version". -# 3/13/99 - v0.03, do a showpage at end (it's allowed) -# fixed checksum calculations for certain cases -# 2/7/99 - v0.02, fixed LH parity pattern for EAN13. It's not the check digit! -# 2/7/99 - initial release -# ================================================================================ - -# -# barCodeSymbol - the whole printed symbol, including bar code(s) and product code(s). -# UPC, UPCA, UPC5, EAN13 - the number itself, with check digit, string representation, -# and barcode bits -# - -import re # we should get rid of regsub and regex in favor of re - # hope there's no conflict. -import string -import sys -import regsub -from regex_syntax import * -import regex -regex.set_syntax(RE_SYNTAX_AWK) -from types import * - -BooklandError = "Something wrong" - - -A="A";B="B";C="C";O="O";E="E" -UPCABITS = [{O:"0001101",E:"1110010"}, - {O:"0011001",E:"1100110"}, - {O:"0010011",E:"1101100"}, - {O:"0111101",E:"1000010"}, - {O:"0100011",E:"1011100"}, - {O:"0110001",E:"1001110"}, - {O:"0101111",E:"1010000"}, - {O:"0111011",E:"1000100"}, - {O:"0110111",E:"1001000"}, - {O:"0001011",E:"1110100"}] -UPCAPARITY = [ "OOOOOOEEEEEE" ] * 10 -UPCEBITS = [{O:"0001101",E:"0100111"}, - {O:"0011001",E:"0110011"}, - {O:"0010011",E:"0011011"}, - {O:"0111101",E:"0100001"}, - {O:"0100011",E:"0011101"}, - {O:"0110001",E:"0111001"}, - {O:"0101111",E:"0000101"}, - {O:"0111011",E:"0010001"}, - {O:"0110111",E:"0001001"}, - {O:"0001011",E:"0010111"}] -# what about UPCEPARITY? Don't need for isbn. -UPC5BITS = UPCEBITS -UPC5PARITY = ["EEOOO","EOEOO","EOOEO","EOOOE","OEEOO", - "OOEEO","OOOEE","OEOEO","OEOOE","OOEOE"] -EAN13BITS = [{A:"0001101", B:"0100111", C:"1110010"}, - {A:"0011001", B:"0110011", C:"1100110"}, - {A:"0010011", B:"0011011", C:"1101100"}, - {A:"0111101", B:"0100001", C:"1000010"}, - {A:"0100011", B:"0011101", C:"1011100"}, - {A:"0110001", B:"0111001", C:"1001110"}, - {A:"0101111", B:"0000101", C:"1010000"}, - {A:"0111011", B:"0010001", C:"1000100"}, - {A:"0110111", B:"0001001", C:"1001000"}, - {A:"0001011", B:"0010111", C:"1110100"}] -EAN13PARITY = map(lambda x: x+"CCCCCC", - ["AAAAAA","AABABB","AABBAB","AABBBA","ABAABB", - "ABBAAB","ABBBAA","ABABAB","ABABBA","ABBABA"]) - -PSFORMAT = "%.6f" -# Default fonts. -# Fonts might have a different name on your system. -# Edit if required. -ISBNFONT = "OCRB" # Doesn't have to be OCR-B -EAN13FONT = "OCRB" -UPC5FONT = "OCRB" - -class psfile: - - def __init__(self): - self.x0 = 100; self.y0 = 100 - self.lines=[] - self.bb=[self.x0,self.y0,self.x0,self.y0] - - def orbb(self,arg): - self.bb[0] = min(self.bb[0],self.x0+arg[0]) - self.bb[1] = min(self.bb[1],self.y0+arg[1]) - self.bb[2] = max(self.bb[2],self.x0+arg[2]) - self.bb[3] = max(self.bb[3],self.y0+arg[3]) - - def translate(self,dx,dy): - self.x0 = self.x0 + dx - self.y0 = self.y0 + dy - return "%d %d translate 0 0 moveto" % (dx,dy) - - def out(self,file=None): - if file: - outfid=open(file,"w") - else: - outfid=sys.stdout - for line in self.lines: - outfid.write("%s\n"%line) - outfid.close() - - def do(self,arg): - self.lines = self.lines + arg - - def setbb(self): - for i in range(len(self.lines)): - if self.lines[i]=="%%BoundingBox: TBD": - self.lines[i]= "%%BoundingBox:" + \ - " %d"%self.bb[0] + \ - " %d"%self.bb[1] + \ - " %d"%self.bb[2] + \ - " %d"%self.bb[3] - return - - def header(self,title,comments,ean13font,isbnfont,upc5font): - for i in range(len(comments)): - comments[i] = regsub.gsub("^","% ",comments[i]) - # There's a more elegant way to do the bounding box line: - return [ "%!PS-Adobe-2.0 EPSF-1.2", - "%%Creator: " + MYNAME + " " + MYVERSION + " " + DATE, - "%%Title: " + title, - "%%BoundingBox: TBD", - "%%EndComments" ] +\ - comments + \ - [ "\n% These font names might be different on your system:", - "/ean13font { /" + ean13font + " findfont 10 scalefont setfont } def", - "/isbnfont { /" + isbnfont + " findfont 8 scalefont setfont } def", - "/upc5font { /" + upc5font +" findfont 14 scalefont setfont } def\n", - "/nextModule { moduleWidth 0 rmoveto } def", - "% The following shenanigans is to deal with different implementations", - "% of same font having different char sizes and spacing.", - "% function fitstring:", - "% usage: width string font fitstring", - "% set font, scaled so that string exactly fits desired width", - "% leave string on stack", - "/fitstring { dup findfont 1 scalefont setfont % w s f", - "3 1 roll % f w s", - "dup stringwidth pop % f w s sw", - "3 2 roll exch div % f s x", - "3 2 roll findfont exch scalefont setfont", - "} def", - "/barHeight { 72 } def", - "/nextModule { moduleWidth 0 rmoveto } def", - "/topcentershow {dup stringwidth pop neg 2 div -9 rmoveto show} def", - "/toprightshow {dup stringwidth pop neg -9 rmoveto show} def", - "/bottomcentershow {dup stringwidth pop neg 2 div 0 rmoveto show} def", - "/bottomrightshow {dup stringwidth pop neg 0 rmoveto show} def", - "/W { moduleWidth mul 0 rmoveto } def", - "/B { dup moduleWidth mul 2 div 0 rmoveto", - "dup moduleWidth mul barWidthReduction sub setlinewidth", - "0 barHeight rlineto 0 barHeight neg rmoveto", - "currentpoint stroke moveto", - "moduleWidth mul 2 div 0 rmoveto } def", - "/L { dup moduleWidth mul 2 div 0 rmoveto", - "dup moduleWidth mul barWidthReduction sub setlinewidth", - "0 -5 rmoveto 0 5 rlineto", - "0 barHeight rlineto 0 barHeight neg rmoveto", - "currentpoint stroke moveto", - "moduleWidth mul 2 div 0 rmoveto } def", - self.x0,self.y0,"translate", - "0 0 moveto" ] - - def trailer(self): - return ["stroke","% showpage supposedly OK in EPS", - "showpage","\n% Good luck!"] - - -class UPC: - - # Includes UPC-A, UPC-E, EAN-13 (sorry), UPC-5 et al. - - def __init__(self,arg): - # arg is a string, either: - # - product code including checksum - # - same, with hyphens (hyphens not verified) - # - same, but with last digit (checksum) dropped, possibly leaving a - # trailing hyphen. - # If checksum is included, it will be verified. - # N.B. "integer" representation is still a string! Just has no hyphens. - - self.s=arg - self.verifyChars(self.s) - self.n = regsub.gsub("-","",self.s) # create "integer" representation - self.x = self.checkDigit(self.n) # always calculate check digit - if len(self.n) == self.ndigits: - self.verifyCheckDigit() # if check digit given, verify it - elif len(self.n) == self.ndigits-1: - self.tackonCheckDigit() # tack on check digit - else: - raise BooklandError, "UPC: wrong number of digits in \"" + self.s + "\"" - - def setbits(self,arg): # UPC (all) - self.bits="" - parityPattern=self.parityPattern() - bitchar=self.bitchar() - for p in range(len(arg)): - digit=int(arg[p]) - # maybe better to define parityPattern with a leading blank? - parity=parityPattern[p] - bit=bitchar[digit][parity] - self.bits=self.bits + bit - - def verifyChars(self,s): # UPC (all) - # Trailing hyphen allowed. - nevergood = "--|^-|[^0-9-]" - ierr=regex.search(nevergood,s) - if ierr != -1: - raise BooklandError, \ - "UPCA: in %s: illegal characters beginning with: %s" % (s,s[ierr]) - - def verifyCheckDigit(self): # UPC (all) - # first verify correct number of digits. - soll=self.checkDigit(self.n) - ist=self.s[-1:] - if ist != soll: - raise BooklandError, "For %s checksum %s is wrong, should be %s" % \ - (self.s,ist,soll) - - def xstring(self,p): # UPC (all) - return "%d" % p - - def tackonCheckDigit(self): - self.n = self.n + self.x # UPC (all) - self.s = self.s + self.x - -class UPCA(UPC): - - def __init__(self,arg): - UPC.__init__(self,arg) - self.setbits(self.n[1:]) # skip first digit - - def parityPattern(self): - return UPCAPARITY[int(self.x)] - def bitchar(self): - return UPCABITS - - def checkDigit(self,arg): # UPCA/EAN13 - weight=[1,3]*6; magic=10; sum = 0 - for i in range(12): # checksum based on first 12 digits. - sum = sum + int(arg[i]) * weight[i] - z = ( magic - (sum % magic) ) % magic - if z < 0 or z >= magic: - raise BooklandError, "UPC checkDigit: something wrong." - return self.xstring(z) - - -class ISBN: - # Includes ISMN, if the plan falls together. - def __init__(self,arg): - self.ndigits=10 # Includes check digit! - self.s=string.upper(arg) - self.n=re.sub("[ -]","",self.s) # "integer" representation - # In ISMN, I allow spaces in place of hyphens. See ISMN User's manual. - if re.match("^M( |-)?\d(( |-)?\d){7,7}(-| )?\d?$",self.s): - # ISMN - self.name="ISMN" - self.n=re.sub("^M","3",self.n) - self.weight=[3,1,3,1,3,1,3,1,3] - self.magic=10 - elif re.match("^\d-?\d(-?\d){7,7}-?(\d|X)?$",self.s): - # ISBN - self.name="ISBN" - self.weight=[10,9,8,7,6,5,4,3,2] - self.magic=11 - else: - raise BooklandError, "%s invalid (hyphenation, characters, or length)" % self.s - self.x = self.checkDigit() - if len(self.n) == self.ndigits: - self.verifyCheckDigit() # if check digit given, verify it - elif len(self.n) == self.ndigits-1: - self.tackonCheckDigit() # tack on check digit - else: - raise BooklandError, "%s failed. Please report as bug" % self.s - - - def checkDigit(self): # ISBN and ISMN; UPCA/EAN13 similar but for weights etc. - # now that we're checking regex's in init, we don't have to check the - # argument at all. (used to check length and bad characters) - sum = 0 - for i in range(9): # checksum based on first nine digits. - sum = sum + int(self.n[i]) * self.weight[i] - z = ( self.magic - (sum % self.magic) ) % self.magic - if z < 0 or z >= self.magic: - raise BooklandError, \ - "%s: checksum %d is wrong - please report as bug" % (self.s,z) - return self.xstring(z) - - def xstring(self,p): - if p == 10: - return "X" - else: - return "%d" % p - - def tackonCheckDigit(self): - if self.s[-1:] == "-": - # Already have a trailing hyphen - self.s = self.s + self.x - else: - self.s = self.s + "-" + self.x - - def verifyCheckDigit(self): # UPC A; EAN13 - # first verify correct number of digits. - soll=self.x - ist=self.s[-1:] - if ist != soll: raise BooklandError, \ - "For %s checksum %s is wrong, should be %s\n" % (self.s,ist,soll) - -class Bar: - # a run of adjacent modules of identical value. - def __init__(self,val): - self.val=val - if not self.val in "L01": - raise BooklandError, "bar bit: %s, pls report as a bug" % self.val - self.width=1 - if self.val=="1": - self.color="Black" - elif self.val=="0": - self.color="White" - elif self.val=="L": - self.color="Long Black" - def __cmp__(self,other): - if self.val==other or (self.val=="L" and other=="1"): - return 0 - else: - return 1 - def inc(self): - self.width=self.width+1 - def pslines(self): - if self.val=="L": - rval = [ "%d L " % self.width ] - elif self.val=="1": - rval = [ "%d B " % self.width ] - else: - rval = [ "%d W " % self.width ] - return rval - def __repr__(self): - return "%s bar of width %d" % (self.color,self.width) - -class barCodeSymbol: - - def __init__(self): - self.patternWidth = len(self.bits)*self.moduleWidth - # Anything else? - - def bitsComment(self): - return [ "%% Bits:\n%% %s" % self.bits ] - - def psbars(self): - # new version, try to prevent all hairlines between adjacent modules. - bars = [] - bar=Bar(self.bits[0]) - for bit in self.bits[1:]: - if bit==bar: - bar.inc() - else: - bars.append(bar) - bar=Bar(bit) - bars.append(bar) - rval = ["0 0 moveto"] - for bar in bars: - rval = rval + bar.pslines() - rval = rval + [ "stroke" ] - return rval - - def psbarsold(self): - psbits=regsub.gsub("1","I ",self.bits) - psbits=regsub.gsub("0","O ",psbits) - psbits=regsub.gsub("L","L ",psbits) - linewidth=50 - p=0; j=linewidth; m=len(psbits); psbarlines=[]; blanks="^ | $" - while p <= m: - j = min(linewidth,m-p) - psbarlines = psbarlines + [ regsub.gsub(blanks,"",psbits[p:p+j]) ] - p=p+linewidth - return [ "0 0 moveto" ] + psbarlines + [ "stroke" ] - - def psSetBarHeight(self): - return [ "/barHeight { " + PSFORMAT % self.moduleHeight + " 72 mul } def" ] - - def psSetBarWidthReduction(self): - return [ "/barWidthReduction { " + \ - PSFORMAT % self.barWidthReduction + " 72 mul } def" ] - - def psSetModuleWidth(self): - rval = [ "/moduleWidth { " + PSFORMAT % self.moduleWidth + " 72 mul } def" ] - return rval - - def psBottomRightText(self,text,font): - # this is specifically for the upc5 price code. - # this is all starting to get messy. - return [ PSFORMAT % self.patternWidth + " 72 mul dup 2 div", - PSFORMAT % self.moduleHeight + " 72 mul 2 add moveto", - "(" + text + ") /" + font + " fitstring bottomcentershow" ] - - def psTopCenterText(self,text,font): - # the text at the top center of the bar pattern (i.e. the ISBN) - return [ PSFORMAT % self.patternWidth + " 72 mul dup 2 div", - PSFORMAT % self.moduleHeight + " 72 mul 3 add moveto", - " (" + text + ") /" + font + " fitstring bottomcentershow" ] - - def psFittedText(self,width,text,font): - return [ PSFORMAT % width + " (" + text + ") " + font + " fitstring" ] - - # This is optional; serves to enforce quiet zone to right of UPC 5 add-on - def psGreaterThan(self,font): - return [ PSFORMAT % self.patternWidth + " 72 mul", - PSFORMAT % self.moduleHeight + " 72 mul 2 add moveto", - "/%s (>) show" % font ] - -class EAN13Symbol(barCodeSymbol): - - def __init__(self,arg,font=EAN13FONT,heightMultiplier=1,barWidthReduction=0): - # arg is a string with the EAN product code - self.barWidthReduction=barWidthReduction - self.ean13 = EAN13(arg) - self.moduleWidth = 0.0130 - specModuleHeight = 1.00 - self.moduleHeight = 1.00 * heightMultiplier - self.bits = self.ean13.bits - barCodeSymbol.__init__(self) - self.font=font - - def bb(self): - return [ -12, -10, self.patternWidth*72+10, self.moduleHeight*72+12 ] - - def pslines(self): - return self.bitsComment() + \ - self.psSetModuleWidth() + \ - self.psSetBarWidthReduction() + \ - self.psSetBarHeight() + \ - self.psbars() + \ - self.psLRDigitLines() - - def psLRDigitLines(self): - # 24 = 3+6*7/2 - # 70 = 3+6*7+4+6*7/2 "4" so we center on the "L" bars (the rightmost of - # the center guard bars is an "O". - # "5" in check digit is the five-module spacing recommended by [2], section 3. - return [ "% We do the left digits first and leave the font scaled", - "% as is for the 9-digit and the right-digits.", - "% EAN13 Left Digits:", - "moduleWidth 24 mul 0 moveto", - "moduleWidth 40 mul (" + self.ean13.leftDigits + ") ", - "/" + self.font + " fitstring topcentershow", - "\n% EAN13 human-readable number", - "% The \"9\" digit (only when encoding ISBN's and ISMN's, I think):", - "-5 0 moveto (" + self.ean13.n[0] + ") toprightshow", - "% EAN13 Right Digits:", - "moduleWidth 70 mul 0 moveto", - "moduleWidth 40 mul (" + self.ean13.rightDigits + ") topcentershow" ] - -class EAN13(UPCA): - - def __init__(self,arg): - self.ndigits=13 # Includes check digit! - UPCA.__init__(self,arg) - leftBits = self.bits[0:42] - rightBits = self.bits[42:] - leftGuard="L0L" - rightGuard="L0L" - center="0L0L0" - self.bits = leftGuard + leftBits + center + rightBits + rightGuard - self.leftDigits = self.n[1:7] - self.rightDigits = self.n[7:13] - - def parityPattern(self): - # N.B. parity pattern based on leftmost digit, the UCC Spec calls this - # the "13th" digit. It's not the check digit! - return EAN13PARITY[int(self.n[0])] - def bitchar(self): - return EAN13BITS - -class UPC5Symbol(barCodeSymbol): - - def __init__(self,arg,heightMultiplier=1,barWidthReduction=0): - # arg is a string with the 5 digit add-on. - self.barWidthReduction=barWidthReduction - self.upc5 = UPC5(arg) - self.moduleWidth = 0.0130 - specModuleHeight = 0.852 - self.moduleHeight = 0.852 * heightMultiplier - self.bits = self.upc5.bits - barCodeSymbol.__init__(self) - - def pslines(self): - return self.bitsComment() + \ - self.psSetModuleWidth() + \ - self.psSetBarHeight() + \ - self.psbars() - - def bb(self): - # Note quiet zone is there even if we don't print the ">". - return [ 0, 0, self.patternWidth*72+10, self.moduleHeight*72+10 ] - -UPC5Error = "Something wrong with 5-digit price code add-on." -class UPC5(UPC): - - def __init__(self,arg): - self.ndigits=5 # Includes check digit! - p=re.search("[^0-9]",arg) - if p: - badchar=arg[p.start()] - raise UPC5Error, "\"%s\" is wrong. The character \"%s\" is not allowed. Price code add-on should contain %d digits and nothing else. Or leave blank to suppress the UPC-5 code." % (arg,badchar,self.ndigits) - elif len(arg) != self.ndigits: - raise UPC5Error, \ - "\"%s\" is wrong. Price code add-on should have exactly %d digits." % (arg,self.ndigits) - UPC.__init__(self,arg) - self.setbits(self.n) - leftGuard="1011" - # no right guard for UPC 5-digit add-on - # Have to insert pesky delineators: - delineator = "01" - self.bits = leftGuard + \ - self.bits[0:7] + delineator + \ - self.bits[7:14] + delineator + \ - self.bits[14:21] + delineator + \ - self.bits[21:28] + delineator + \ - self.bits[28:35] - - def checkDigit(self,arg): # UPC5 - weight=[3,9,3,9,3]; sum = 0 - for i in range(5): - sum = sum + int(arg[i]) * weight[i] - return self.xstring(sum % 10) - - def verifyCheckDigit(self): # UPC2/5 checksum not in number - return - - def parityPattern(self): - return UPC5PARITY[int(self.x)] - def bitchar(self): - return UPC5BITS - -class bookland(barCodeSymbol): - - def __init__(self,isbn,price="",*rest): - - - # Some defaults: - ean13font=EAN13FONT - isbnfont=ISBNFONT - upc5font = UPC5FONT - zone=None - heightMultiplier=1.0 - commandLine="" - barWidthReduction=0 - - # Maybe different fonts: - if len(rest)>0: - font=rest[0] - if font: - ean13font=font - isbnfont=font - upc5font=font - if len(rest)>1: - zone=rest[1] - if len(rest)>2: - heightMultiplier=float(rest[2]) - if len(rest) > 3: - commandLine=rest[3] - if len(rest) > 4: - barWidthReduction=float(rest[4]) - - # Initial setup: - - self.ps = psfile() - self.isbn = ISBN(isbn) - - # Header, EAN13 bars, EAN13 number, and ISBN: - - if self.isbn.name=="ISMN": - self.ean13Symbol = EAN13Symbol("9790"+self.isbn.n[1:9],ean13font,heightMultiplier,barWidthReduction) - elif self.isbn.name=="ISBN": - self.ean13Symbol = EAN13Symbol("978"+self.isbn.n[:9],ean13font,heightMultiplier,barWidthReduction) - else: - raise BooklandError, "Internal error doing %s, please report as bug" % isbn - - self.ps.orbb(self.ean13Symbol.bb()) - comments = ["", - " This is free software and comes with NO WARRANTY WHATSOVER", - " Think twice before going to press with this bar code!", - "", - "Command line: %s" % commandLine, - "" ] - self.ps.lines = self.ps.header(self.isbn.s,comments,ean13font,isbnfont,upc5font) + \ - [ "ean13font" ] + \ - self.ean13Symbol.pslines() +\ - [ "isbnfont" ] + \ - self.ean13Symbol.psTopCenterText("%s %s" % (self.isbn.name,self.isbn.s),isbnfont) - - # 5-digit add-on: (optional for ISBN only) - BLANK=re.compile("^ *$") - if self.isbn.name=="ISBN" and not BLANK.match(price): - # 105 = 95 + 10; 10 = separation (min is 9) - translate=[ self.ps.translate( self.ean13Symbol.moduleWidth * 72 * 105, 0 ) ] - self.upc5Symbol = UPC5Symbol(price,heightMultiplier,barWidthReduction) - self.ps.orbb(self.upc5Symbol.bb()) - self.ps.lines = self.ps.lines + \ - translate + \ - self.upc5Symbol.pslines() + \ - [ "upc5font" ] +\ - self.upc5Symbol.psBottomRightText(price,upc5font) - if zone: self.ps.lines=self.ps.lines + self.upc5Symbol.psGreaterThan(upc5font) - else: - self.ps.lines.append("%% Skipping UPC-5 price code symbol per request") - - self.ps.lines=self.ps.lines + self.ps.trailer() - - # Can now set bounding box. - - self.ps.setbb() - -# Here we go ... - -if __name__ == '__main__': - - def printUsage(): - print "Usage: bookland [-h|--help] [-v|--version] [-x|--check] [-f|--font=<font>] [-s|--height=<height scale>] [-r|--reduction=<reduction factor>] [-o|outfile=<filename>] [-z|--quietzone] [<isbn>|<isbn> <price>]" - print "Report bugs to " + MAINTAINER - - def printVersion(): - sys.stderr.write("%s version %s %s.\n" % (MYNAME,MYVERSION,COPYRIGHT)) - sys.stderr.write("Bugs to %s\n" % MAINTAINER) - sys.stderr.write("This is free software and comes with NO WARRANTY\n") - - import getopt - try: - opts,args = getopt.getopt(sys.argv[1:], - "xr:s:uvf:hzo:", - ["reduction=","outfile=","height=","noupc", - "check","version","help","font=","quietzone"]) - except: - printUsage() - sys.exit(0) - - # some initial defaults: - isbn = "1-56592-197-6" # Mark Lutz, "Programming Python", - # O'Reilly, Sebastopol CA, 1996 - price = "90000" - font=None - zone=None - checkonly=None - outfile=None - heightMultiplier=1 - commandLine = string.join(sys.argv) - barWidthReduction = 0 - - # parse command line: - for opt,val in opts: - if opt in ("-v","--version"): - printVersion() - sys.exit(0) - elif opt in ("-h","--help"): - printUsage() - sys.exit(0) - elif opt in ("-f","--font"): - font=val - elif opt in ("-z","--quietzone"): - zone=1 - elif opt in ("-x","--check"): - checkonly=1 - elif opt in ("-s","--height"): - heightMultiplier = float(val) - elif opt in ("-r","--reduction"): - barWidthReduction = val - elif opt in ("-o","--outfile"): - outfile=val - if len(args)==1: - isbn=args[0] - elif len(args)==2: - isbn=args[0] - price=args[1] - - # Do stuff. - - printVersion() - try: - b = bookland(isbn,price,font,zone,heightMultiplier, - commandLine,barWidthReduction) - if not checkonly: b.ps.out(outfile) - if outfile: - sys.stderr.write("Output written to %s\n" % outfile) - except BooklandError, message: - sys.stderr.write(BooklandError + ": " + message + "\n") - sys.exit(1) diff --git a/glabels1/barcode-0.98/cmdline.c b/glabels1/barcode-0.98/cmdline.c deleted file mode 100644 index a69a825..0000000 --- a/glabels1/barcode-0.98/cmdline.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * cmdline.c -- parse a command line using getopt, environment and defaults - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - * - * Changes: - * Michele Comitini (mcm@glisco.it): better handling of numeric type args. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifdef NO_GETOPT - /* use replacement */ - #include "compat/getopt.h" -#else - #include <getopt.h> -#endif - -#include "cmdline.h" - -/* In case of error, print help string and return error (-1) */ -int commandline_errormsg(FILE *f, struct commandline *args, - char *prgname, char *messagehead) -{ - char *buffer; - char *buffer2; - int len; - struct commandline *ptr; - - if (!messagehead) { - fprintf(f,"%s: Error in cmdline\nPossible options:\n",prgname); - } else { - fprintf(f,"%s: %s",prgname,messagehead); - } - - for (ptr = args; ptr->option; ptr++) { - if (ptr->descrip) { - len = strlen(ptr->descrip); - len += ptr->default_v ? strlen(ptr->default_v) : 6; - len += ptr->env ? strlen(ptr->env) : 6; - buffer2 = malloc(len+3); /* 3 to be safe :) */ - len += 32; - if (buffer2) { - buffer = malloc(len); - if (buffer) { - sprintf(buffer2, ptr->descrip, - ptr->default_v ? ptr->default_v : "(none)", - ptr->env ? ptr->env : "(none)"); - sprintf(buffer, " -%c %s %s", ptr->option, - ptr->type ? "<arg>" : " ", buffer2); - fprintf(f, "%s\n",buffer); - free(buffer); - } - free(buffer2); - } - } - } - return -1; -} - -/* - * Associate formats to type. - */ -struct type_fmt { - enum option_type type; - char *fmt; -}; -static struct type_fmt formats[] = { - {CMDLINE_I, "%i%s"}, /* the trailing "%s" is used for error check */ - {CMDLINE_D, "%d%s"}, - {CMDLINE_X, "%x%s"}, - {CMDLINE_O, "%o%s"}, - {CMDLINE_F, "%lf%s"}, - {CMDLINE_P, "%p%s"}, - {0, NULL} /* If we get here, it's CMDLINE_S: no sscanf buf strcpy() */ -}; - - -/* Parse one argument (default or provided) */ -static int commandline_oneopt(struct commandline *ptr, char *value) -{ - struct type_fmt *tptr; - char *trash = value ? strdup(value) : NULL; - - /* convert it, if needed */ - if ((ptr->type != CMDLINE_NONE) && ptr->result) { - for (tptr = formats; tptr->type; tptr++) - if (tptr->type == ptr->type) - break; - if (!tptr->type) /* not found: it is a string */ - *(char **)(ptr->result) = value; - else - if (sscanf(value, tptr->fmt, ptr->result, trash)!=1) { - free(trash); - return -1; - } - } - if (trash) - free(trash); - - if ((ptr->type == CMDLINE_NONE) && ptr->result) /* no type, just count */ - (*(int *)(ptr->result))++; - - /* call the function, if needed */ - if (ptr->fun) { - if (ptr->type) { - if (ptr->result) return ptr->fun(ptr->result); /* converted */ - return ptr->fun(value); /* type, but not converted */ - } - return ptr->fun(NULL); /* no type: just call it */ - } - return 0; -} - -/* The main function */ -int commandline(struct commandline *args, int argc, char **argv, - char *errorhead) -{ - struct commandline *ptr; - char *getopt_desc = (char *)calloc(512, 1); - int desc_offset = 0; - int opt, retval; - char *value; - - /* Build getopt string and process defaults values */ - for (ptr = args; ptr->option; ptr++) { - getopt_desc[desc_offset++] = ptr->option; - if (ptr->type) getopt_desc[desc_offset++] = ':'; - - value = NULL; - if (ptr->env) - value = getenv(ptr->env); - if (!value) - value = ptr->default_v; - if (value && (retval = commandline_oneopt(ptr, value))) { - /* - * if the function returns a specific (not -1) value, it already - * printed its message, so avoid the generic help - */ - if (retval == -1) - commandline_errormsg(stderr, args, argv[0], errorhead); - return retval; - } - } - - /* Run getopt and process material */ - while ((opt = getopt(argc, argv, getopt_desc)) != -1) { - for (ptr = args; ptr->option; ptr++) - if (opt == ptr->option) - break; - if (!ptr->option) /* unknown option */ - return commandline_errormsg(stderr, args, argv[0], errorhead); - if ( (retval = commandline_oneopt(ptr, optarg)) ) { /* wrong arg */ - if (retval == -1) - commandline_errormsg(stderr, args, argv[0], errorhead); - return retval; - } - } - return 0; -} diff --git a/glabels1/barcode-0.98/cmdline.h b/glabels1/barcode-0.98/cmdline.h deleted file mode 100644 index 6931991..0000000 --- a/glabels1/barcode-0.98/cmdline.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * cmdline.h -- generic commandline editing (uses getopt, only short) - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - * - */ - -/* - * The options may have different arguments of different type - */ -enum option_type { - CMDLINE_NONE=0, /* no argument after option */ - CMDLINE_I, /* integer (any base) */ - CMDLINE_D, /* decimal integer */ - CMDLINE_X, /* hex integer */ - CMDLINE_O, /* octal integer */ - CMDLINE_S, /* string */ - CMDLINE_F, /* double float */ - CMDLINE_P, /* pointer */ -}; - - -struct commandline { - int option; /* Single byte: option id */ - int type; /* Type of argument, used in sscanf */ - void *result; /* Store data here, if non null */ - int (*fun)(void *); /* Call if defined: arg is "result" or input string */ - char *env; /* Where to get runtime defaults, may be NULL */ - char *default_v; /* The compile-time default, may be NULL */ - char *descrip; /* For err msg. May have %s's for default and env */ -}; - -/* returns: 0 or -1. "optarg" is global (see getopt) */ -extern int commandline(struct commandline *args, - int argc, char **argv, char *errorhead); - -/* prints an error message based on "args" */ -extern int commandline_errormsg(FILE *f, struct commandline *args, - char *prgname, char *messagehead); - - - - diff --git a/glabels1/barcode-0.98/codabar.c b/glabels1/barcode-0.98/codabar.c deleted file mode 100644 index 7065b9e..0000000 --- a/glabels1/barcode-0.98/codabar.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * codabar.c -- encoding for Codabar - * - * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - - -/* this is ordered in decades to simplify encoding */ -static char alphabet[] = - "0123456789" "-$:/.+ABCD"; - -#define CODE_A 16 -#define CODE_B 17 - -#define NARROW 12 -#define WIDE 14 - -/* Patterns */ -static char *patterns[] = { -"1111133","1111331","1113113","3311111","1131131", -"3111131","1311113","1311311","1331111","3113111", -"1113311","1133111","3111313","3131113","3131311", -"1131313","1133131","1313113","1113133","1113331" }; - -/* - * Check that the text can be encoded. Returns 0 or -1. - * If it's all lowecase convert to uppercase and accept it. - * If the first character is a letter (A to D), the last one must be too; - * no other character should be a letter. - */ -int Barcode_cbr_verify(unsigned char *text) -{ - int i, lower=0, upper=0; - int startpresent = 0; - - if (!strlen(text)) - return -1; - for (i=0; text[i]; i++) { - char * pos; - if (isupper(text[i])) upper++; - if (islower(text[i])) lower++; - pos = strchr(alphabet,toupper(text[i])); - if (!pos) - return -1; - if (i == 0 && pos - alphabet >= CODE_A) - startpresent = 1; - else if (pos - alphabet >= CODE_A && - (!startpresent || i != strlen(text) - 1)) - return -1; - } - if (lower && upper) - return -1; - return 0; -} - -static int add_one(char *ptr, int code) -{ - sprintf(ptr,"1%s", /* separator */ patterns[code]); - return 0; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * Lowercase chars are converted to uppercase - */ -int Barcode_cbr_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *c, *ptr, *textptr; - int i, code, textpos, usesum, checksum = 0, startpresent; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("codabar"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* the partial code is 8 * (head + text + check + tail) + margin + term. */ - partial = malloc( (strlen(text) + 3) * 8 + 2); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * (strlen + check) +term */ - textinfo = malloc(10*(strlen(text) + 1) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - ptr = partial; - textptr = textinfo; - textpos = 0; - usesum = bc->flags & BARCODE_NO_CHECKSUM ? 0 : 1; - /* if no start character specified, A is used as a start character */ - if (!isalpha(text[0])) { - add_one(ptr, CODE_A); - ptr += strlen(ptr); - textpos = WIDE; - checksum = CODE_A; - startpresent = 0; - } else { - startpresent = 1; - } - for (i=0; i<strlen(text); i++) { - c = strchr(alphabet, toupper(text[i])); - if (!c) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - code = c - alphabet; - add_one(ptr, code); - sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i])); - textpos += code < 12 ? NARROW : WIDE; - textptr += strlen(textptr); - ptr += strlen(ptr); - checksum += code; - if (startpresent && usesum && i == strlen(text) - 2) { - /* stuff a check symbol before the stop */ - c = strchr(alphabet, toupper(text[i+1])); - if (!c) /* impossible */ - continue; - code = c - alphabet; - checksum += code; - - /* Complement to a multiple of 16 */ - checksum = (checksum + 15) / 16 * 16 - checksum; - add_one(ptr, checksum); - ptr += strlen(ptr); - } - } - if (!startpresent) { - if (usesum) { - /* if no start character specified, B is used as a stop char */ - checksum += CODE_B; - checksum = (checksum + 15) / 16 * 16 - checksum; - add_one(ptr, checksum); - ptr += strlen(ptr); - } - add_one(ptr, CODE_B); - } - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels1/barcode-0.98/code128.c b/glabels1/barcode-0.98/code128.c deleted file mode 100644 index cebba54..0000000 --- a/glabels1/barcode-0.98/code128.c +++ /dev/null @@ -1,607 +0,0 @@ -/* - * code128.c -- encoding for code128 (A, B, C) - * - * Copyright (c) 1999,2000 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -static char *codeset[] = { - "212222", "222122", "222221", "121223", "121322", /* 0 - 4 */ - "131222", "122213", "122312", "132212", "221213", - "221312", "231212", "112232", "122132", "122231", /* 10 - 14 */ - "113222", "123122", "123221", "223211", "221132", - "221231", "213212", "223112", "312131", "311222", /* 20 - 24 */ - "321122", "321221", "312212", "322112", "322211", - "212123", "212321", "232121", "111323", "131123", /* 30 - 34 */ - "131321", "112313", "132113", "132311", "211313", - "231113", "231311", "112133", "112331", "132131", /* 40 - 44 */ - "113123", "113321", "133121", "313121", "211331", - "231131", "213113", "213311", "213131", "311123", /* 50 - 54 */ - "311321", "331121", "312113", "312311", "332111", - "314111", "221411", "431111", "111224", "111422", /* 60 - 64 */ - "121124", "121421", "141122", "141221", "112214", - "112412", "122114", "122411", "142112", "142211", /* 70 - 74 */ - "241211", "221114", "413111", "241112", "134111", - "111242", "121142", "121241", "114212", "124112", /* 80 - 84 */ - "124211", "411212", "421112", "421211", "212141", - "214121", "412121", "111143", "111341", "131141", /* 90 - 94 */ - "114113", "114311", "411113", "411311", "113141", - "114131", "311141", "411131", "b1a4a2", "b1a2a4", /* 100 - 104 */ - "b1a2c2", "b3c1a1b" -}; - -#define START_A 103 -#define START_B 104 -#define START_C 105 -#define STOP 106 -#define SHIFT 98 /* only A and B */ -#define CODE_A 101 /* only B and C */ -#define CODE_B 100 /* only A and C */ -#define CODE_C 99 /* only A and B */ -#define FUNC_1 102 /* all of them */ -#define FUNC_2 97 /* only A and B */ -#define FUNC_3 96 /* only A and B */ -/* FUNC_4 is CODE_A when in A and CODE_B when in B */ - -#define SYMBOL_WID 11 /* all of them are 11-bar wide */ - -/* - * code 128-b includes all printable ascii chars - */ - -int Barcode_128b_verify(unsigned char *text) -{ - if (text[0] == '\0') - return -1; - while (*text && *text>=32 && !(*text&0x80)) - text++; - if (*text) - return -1; /* a non-ascii char */ - return 0; /* ok */ -} - -int Barcode_128b_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *textptr; - int i, code, textpos, checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("code 128-B"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* the partial code is 6* (head + text + check + tail) + final + term. */ - partial = malloc( (strlen(text) + 4) * 6 +2); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * strlen +term */ - textinfo = malloc(10*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - /* up to now, it was the same code as other encodings */ - - strcpy(partial, "0"); /* the first space */ - strcat(partial, codeset[START_B]); - checksum += START_B; /* the start char is counted in the checksum */ - textptr = textinfo; - textpos = SYMBOL_WID; - - for (i=0; i<strlen(text); i++) { - if ( text[i] < 32 || (text[i] & 0x80)) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - code = text[i]-32; - strcat(partial, codeset[code]); - checksum += code * (i+1); /* first * 1 + second * 2 + third * 3... */ - sprintf(textptr, "%i:12:%c ", textpos, text[i]); - textptr += strlen(textptr); - textpos += SYMBOL_WID; /* width of each code */ - } - /* Add the checksum, independent of BARCODE_NO_CHECKSUM */ - checksum %= 103; - strcat(partial, codeset[checksum]); - /* and the end marker */ - strcat(partial, codeset[STOP]); - - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} - -/* - * code 128-c is only digits, but two per symbol - */ - -int Barcode_128c_verify(unsigned char *text) -{ - if (text[0] == '\0') - return -1; - /* must be an even number of digits */ - if (strlen(text)%2) - return -1; - /* and must be all digits */ - for (; *text; text++) - if (!isdigit(*text)) - return -1; - return 0; -} - -int Barcode_128c_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *textptr; - int i, code, textpos, checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("code 128-C"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* the partial code is 6* (head + text + check + tail) + final + term. */ - partial = malloc( (strlen(text) + 3) * 6 +2); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn.5:fff:c " * strlen +term */ - textinfo = malloc(12*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - strcpy(partial, "0"); /* the first space */ - strcat(partial, codeset[START_C]); - checksum += START_C; /* the start char is counted in the checksum */ - textptr = textinfo; - textpos = SYMBOL_WID; - - for (i=0; text[i]; i+=2) { - if (!isdigit(text[i]) || !isdigit(text[i+1])) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - code = (text[i]-'0') * 10 + text[i+1]-'0'; - strcat(partial, codeset[code]); - checksum += code * (i/2+1); /* first * 1 + second * 2 + third * 3... */ - - /* print as "%s", because we have ".5" positions */ - sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos, text[i], - textpos + (double)SYMBOL_WID/2, text[i+1]); - textptr += strlen(textptr); - textpos += SYMBOL_WID; /* width of each code */ - } - /* Add the checksum, independent of BARCODE_NO_CHECKSUM */ - checksum %= 103; - strcat(partial, codeset[checksum]); - /* and the end marker */ - strcat(partial, codeset[STOP]); - - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} - -/* - * generic (full-featured) code128 implementation: it selects between - * A, B, C according to the data being encoded. F1, F2, F3, F4 are expressed - * using ascii chars 0xc1, 0xc2, 0xc3, 0xc4 (0301, 0302, 0303, 0304). - * Char '\0' is expressed by 0x80 (0200). - */ - -int Barcode_128_verify(unsigned char *text) -{ - if (text[0] == '\0') - return -1; - while (*text && (*text<=0x80 || (*text >= 0xc1 && *text <= 0xc4))) - text++; - if (*text) - return -1; /* unencodable character */ - return 0; /* ok */ -} - - -/* - * These functions are extracted from Barcode_128_encode for clarity. - * It deals with choosing the symbols used to represent the text - * and returns a dynamic array of integers, terminated by -1. - * - * The algorithm used in choosing the codes comes from App 2 of - * "El Codigo Estandar EAN/UCC 128", courtesy of AECOC, Spain. - * Thanks to Dani Pardo for getting permission and giving me a copy - * of the document - */ - -#define NEED_CODE_A(c) ((c)<32 || (c)==0x80) -#define NEED_CODE_B(c) ((c)>=96 && (c)<128) - -static int Barcode_a_or_b(unsigned char *text) -{ - for ( ; *text; text++) { - if (NEED_CODE_A(*text)) - return 'A'; - if (NEED_CODE_B(*text)) - return 'B'; - } - return 0; /* any */ -} - -/* code is either 'A' or 'B', and value must be valid */ -static int Barcode_encode_as(int code, int value) -{ - - /* first check the special chars */ - if (value == 0xC1) return FUNC_1; - if (value == 0xC2) return FUNC_2; - if (value == 0xC3) return FUNC_3; - if (value == 0xC4) { /* F4 */ - if (code == 'A') return CODE_A; - return CODE_B; - } - - /* then check ascii values */ - if (value >= 0x20 && value <= 0x5F) - return value - 0x20; /* both codes */ - if (value == 0x80) return 64; /* code A */ - if (value < 0x20) return value+64; /* code A */ - if (value >= 0x60) return value - 0x20; /* code B */ - /* can't happen */ - return -1; -} - -static int *Barcode_128_make_array(struct Barcode_Item *bc, int *lptr) -{ - int len, *codes; - unsigned char *s; - int i=0, j, code, checksum; - - /* allocate twice the text length + 5, as this is the worst case */ - len = 2 * strlen(bc->ascii) + 5; - codes = malloc(len * sizeof(int)); - s = bc->ascii; - - /* choose the starting code */ - if (s[2]=='\0' && isdigit(s[0]) && isdigit(s[1])) { - code = 'C'; - } else if (isdigit(s[0])&&isdigit(s[1]) && isdigit(s[2])&&isdigit(s[3])) { - code = 'C'; - } else { - code = Barcode_a_or_b(s); - if (!code) code = 'B'; /* default */ - } - codes[i++] = START_A + code - 'A'; - - for (s = bc->ascii; *s; /* increments are in the loop */) { - switch(code) { - - case 'C': - if (s[0] == 0xC1) { /* F1 is valid */ - codes[i++] = FUNC_1; - s++; - } else if (isdigit(s[0]) && isdigit(s[1])) { - /* encode two digits */ - codes[i++] = (s[0]-'0') * 10 + s[1]-'0'; - s += 2; - } else { - /* change code */ - code = Barcode_a_or_b(s); - if (!code) code = 'B'; - codes[i++] = (code == 'A') ? CODE_A : CODE_B; - } - break; - - case 'B': - case 'A': - for (j=0; isdigit(s[j]); j++) - ; - if (j>=4) { /* if there are 4 or more digits, turn to C */ - if (j&1) { - /* odd number: encode one first */ - codes[i++] = *(s++) - ' '; - } - codes[i++] = CODE_C; - code = 'C'; - } else if (code == 'A' && NEED_CODE_B(*s)) { - /* check whether we should use SHIFT or change code */ - j = Barcode_a_or_b(s+1); - if (j == 'B') { - codes[i++] = CODE_B; - code = 'B'; - } else { - codes[i++] = SHIFT; - codes[i++] = Barcode_encode_as('B', *s); - s++; - } - } else if (code == 'B' && NEED_CODE_A(*s)) { - /* check whether we should use SHIFT or change code */ - j = Barcode_a_or_b(s+1); - if (j == 'A') { - codes[i++] = CODE_A; - code = 'A'; - } else { - codes[i++] = SHIFT; - codes[i++] = Barcode_encode_as('A', *s); - s++; - } - } else { - codes[i++] = Barcode_encode_as(code, *s); - s++; - } - break; - } - } - /* add the checksum */ - checksum = codes[0]; - for (j=1; j<i; j++) - checksum += j * codes[j]; - checksum %= 103; - codes[i++] = checksum; - codes[i++] = STOP; - if (i > len) { - fprintf(stderr, "impossible: length is > allocated len\n"); - } - *lptr = i; - return codes; -} - -/* - * Encoding is tricky, in that we cannot print the ascii - * representation in an easy way. Therefore, just skip non-printable - * chars and try to fit the rest somehow. - */ -int Barcode_128_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *textptr; - int *codes; /* dynamic */ - int i, c, len; - double textpos, size, step; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("code 128"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - - codes = Barcode_128_make_array(bc, &len); - if (!codes) return -1; - - /* the partial code is 6*codelen + ini + term (+margin) */ - partial = malloc( 6 * len + 4); - if (!partial) { - bc->error = errno; - free(codes); - return -1; - } - - /* the text information is at most "nnn.n:ff.f:c " * strlen +term */ - textptr = textinfo = malloc(13*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - free(codes); - return -1; - } - - /* up to now, it was almost the same code as other encodings */ - - strcpy(partial, "0"); /* the first space */ - for (i=0; i<len; i++) /* the symbols */ - strcat(partial, codeset[codes[i]]); - - /* avoid bars that fall lower than other bars */ - for (i=0; partial[i]; i++) - if (isalpha(partial[i])) - partial[i] += '1' - 'a'; - - /* - * the accompanying text: reserve a space for every char. - * F[1-4] are rendered as spaces (separators), other unprintable chars - * are rendered as underscoress (placeholders) - */ - - /* - * A size of 9 is good for code-C (used above), so 18 for each symbol, - * but we place an upper limit of 12 to avoid overlapping on the bars. - */ - size = (int)(180.0 * (len-3) / strlen(text) + .5) / 10.0; - if (size > 12.0) size = 12.0; - - /* align the text to the left, using its natural size */ - step = (int)(10 * (size/18.0 * SYMBOL_WID) + .5) / 10.0; - textpos = SYMBOL_WID; - - for (i=0; i<strlen(text); i++) { - c = text[i]; - if (c < 32 || c == 0x80) c = '_'; /* not printable */ - if (c > 0xc0) c = ' '; /* F code */ - sprintf(textptr, "%g:%g:%c ", textpos, size, c); - textptr += strlen(textptr); - textpos += step; - } - - bc->partial = partial; - bc->textinfo = textinfo; - free(codes); - return 0; -} - -/* - * A raw 128 code is given as a sequence of space separated numbers - * from 0 to 105, starting from the start code to be (Leonid) - */ - -int Barcode_128raw_verify(unsigned char *text) -{ - int n; - unsigned val; - - if (!strlen(text)) - return -1; - while (*text) { - if (sscanf(text, "%u%n", &val, &n) < 1) - return -1; - if (val > 105) - return -1; - text += n; - } - return 0; -} - -int Barcode_128raw_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *textptr; - int i, n, count, code, textpos, checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("128raw"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* - * length of partial code is unknown in advance, but it is - * at most 6* (1+text/2 + check + tail) + final + terminator - */ - partial = malloc( (3+ strlen(text)/2) * 6 + 2); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn.5:fff:c " * 1+strlen/2 +term */ - textinfo = malloc(12 * (1+strlen(text)/2) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - strcpy(partial, "0"); /* the first space */ - textptr = textinfo; - textpos = 0; - - for (i=0, count = 0; i < strlen(text); count++) { - if (sscanf(text + i, "%u%n", &code, &n) < 1) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - strcat(partial, codeset[code]); - - /* - * since the start code is part of the "raw" input, it is - * counted in the checksum by itself - */ - if (!count) checksum += code; /* the start code */ - else checksum += code * count; /* first * 1 + second * 2 ... */ - - /* - * print as "%s", because we have ".5" positions - * also, use a size of 9 like codeC above, as each symbol is - * represented by two chars - */ - sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos, - code >= 100 ? 'A' : code/10 + '0', - textpos + (double)SYMBOL_WID/2, code%10 + '0'); - textptr += strlen(textptr); - textpos += SYMBOL_WID; /* width of each code */ - i += n; - } - /* Add the checksum, independent of BARCODE_NO_CHECKSUM */ - checksum %= 103; - strcat(partial, codeset[checksum]); - /* and the end marker */ - strcat(partial, codeset[STOP]); - - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} - diff --git a/glabels1/barcode-0.98/code39.c b/glabels1/barcode-0.98/code39.c deleted file mode 100644 index 3308c95..0000000 --- a/glabels1/barcode-0.98/code39.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * code39.c -- encoding for code39 - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - - -/* this is ordered in decades to simplify encoding */ -static char alphabet[] = - "1234567890" "ABCDEFGHIJ" "KLMNOPQRST" "UVWXYZ-. *" "$/+%"; - -/* the checksum alphabet has a different order */ -static char checkbet[] = - "0123456789" "ABCDEFGHIJ" "KLMNOPQRST" "UVWXYZ-. $" "/+%"; - -/* The first 40 symbols repeat this bar pattern */ -static char *bars[] = { - "31113","13113","33111","11313","31311", - "13311","11133","31131","13131","11331"}; - -/* The first 4 decades use these space patterns */ -static char *spaces[] = {"1311","1131","1113","3111"}; - -/* the last four symbols are special */ -static char *specialbars[] = { - "11111","11111","11111","11111"}; - -static char *specialspaces[] = { - "3331","3313","3133","1333"}; - -static char *fillers[]= { - "0a3a1c1c1a", - "1a3a1c1c1a" -}; - - -/* - * Check that the text can be encoded. Returns 0 or -1. - * If it's all lowecase convert to uppercase and accept it - */ -int Barcode_39_verify(unsigned char *text) -{ - int i, lower=0, upper=0; - - if (text[0] == '\0') - return -1; - for (i=0; text[i]; i++) { - if (isupper(text[i])) upper++; - if (islower(text[i])) lower++; - if (!strchr(alphabet,toupper(text[i]))) - return -1; - } - if (lower && upper) - return -1; - return 0; -} - -static int add_one(char *ptr, int code) -{ - char *b, *s; - - if (code < 40) { - b = bars[code%10]; - s = spaces[code/10]; - } else { - b = specialbars[code-40]; - s = specialspaces[code-40]; - } - sprintf(ptr,"1%c%c%c%c%c%c%c%c%c", /* separator */ - b[0], s[0], b[1], s[1], b[2], s[2], - b[3], s[3], b[4]); - return 0; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * Lowercase chars are converted to uppercase - */ -int Barcode_39_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *c, *ptr, *textptr; - int i, code, textpos, checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("code 39"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* the partial code is 10* (head + text + check + tail) + margin + term. */ - partial = malloc( (strlen(text) + 3) * 10 +2); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * strlen +term */ - textinfo = malloc(10*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - strcpy(partial, fillers[0]); - ptr = partial + strlen(partial); - textptr = textinfo; - textpos = 22; - - for (i=0; text[i]; i++) { - c = strchr(alphabet, toupper(text[i])); - if (!c) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - code = c - alphabet; - add_one(ptr, code); - c = strchr(checkbet,*c); - if (c) /* the '*' is not there */ - checksum += (c-checkbet); - sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i])); - - textpos += 16; /* width of each code */ - textptr += strlen(textptr); - ptr += strlen(ptr); - } - /* Add the checksum */ - if ( (bc->flags & BARCODE_NO_CHECKSUM)==0 ) { - code = (strchr(alphabet, checkbet[checksum % 43]) - alphabet); - add_one(ptr, code); - } - strcat(ptr, fillers[1]); /* end */ - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels1/barcode-0.98/code93.c b/glabels1/barcode-0.98/code93.c deleted file mode 100644 index 73f8cee..0000000 --- a/glabels1/barcode-0.98/code93.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - * code39.c -- encoding for code39 - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * Copyright (c) 2001 Nathan D. Holmes / FedEx Services (ndholmes@fedex.com) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - - -/* this is ordered in decades to simplify encoding */ -static char alphabet[] = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"; - -static char *codeset[] = { - "131112", "111213", "111312", "111411", "121113", /* 0 - 4 */ - "121212", "121311", "111114", "131211", "141111", /* 5 - 9 */ - "211113", "211212", "211311", "221112", "221211", /* A - E */ - "231111", "112113", "112212", "112311", "122112", /* F - J */ - "132111", "111123", "111222", "111321", "121122", /* K - O */ - "131121", "212112", "212211", "211122", "211221", /* P - T */ - "221121", "222111", "112122", "112221", "122121", /* U - Y */ - "123111", "121131", "311112", "311211", "321111", /* Z - $ */ - "112131", "113121", "211131", "121221", "312111", /* / - (%) */ - "311121", "122211", "111141" /* (/) - (terminator) */ -}; - - -/* 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111 */ -/* 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122222222 */ -/* 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 */ -static char shiftset[] = - "%$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%% /// ///// / /%%%%%% %%%%%%++++++++++++++++++++++++++%%%%%"; -static char shiftset2[] = - "UABCDEFGHIJKLMNOPQRSTUVWXYZABCDE ABC FGHIJ L ZFGHIJV KLMNOWABCDEFGHIJLKMNOPQRSTUVWXYZPQRST"; - -#define START_STOP 47 -#define EXTEND_DOLLAR 43 -#define EXTEND_PERCENT 44 -#define EXTEND_SLASH 45 -#define EXTEND_PLUS 46 - -/* - * Check that the text can be encoded. Returns 0 or -1. - * All of ASCII-7 is accepted. - */ -int Barcode_93_verify(unsigned char *text) -{ - int i; - - if (!strlen(text)) - return -1; - for (i=0; text[i]; i++) { - - /* Test if beyond the range of 7-bit ASCII */ - if ((int)text[i] > 127) - return -1; - } - return 0; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * Lowercase chars are converted to uppercase - */ -int Barcode_93_encode(struct Barcode_Item *bc) -{ - static unsigned char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *c, *textptr; - int *checksum_str; - int i, code, textpos, checksum_len=0; - int c_checksum = 0; - int k_checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("code 93"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - - /* the partial code is 6 * (head + 2* text + 2* check + tail) + margin + term. */ - partial = malloc( (strlen(text) *2 + 4) * 6 +2); - if (!partial) { - bc->error = errno; - return -1; - } - - checksum_str = (int *)malloc( (strlen(text) + 3) * 2 * sizeof(int)); - if (!checksum_str) { - free(partial); - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * strlen +term */ - textinfo = malloc(10*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - free(checksum_str); - return -1; - } - - textptr = textinfo; - textpos = 22; - strcpy(partial, "0"); - strcat(partial, codeset[START_STOP]); - - for (i=0; i<strlen(text); i++) { - c = strchr(alphabet, text[i]); - if (!c) { - /* Encode the shift character */ - switch(shiftset[text[i]]) - { - case '$': - code = EXTEND_DOLLAR; - break; - case '%': - code = EXTEND_PERCENT; - break; - case '/': - code = EXTEND_SLASH; - break; - case '+': - code = EXTEND_PLUS; - break; - default: - code = 0; - break; - } - - strcat(partial, codeset[code]); - checksum_str[checksum_len++] = code; - - /* Encode the second character */ - code = strchr(alphabet, shiftset2[text[i]]) - alphabet; - strcat(partial, codeset[code]); - checksum_str[checksum_len++] = code; - } else { - /* Character is natively supported by the symbology, encode directly */ - code = c - alphabet; - strcat(partial, codeset[c -alphabet]); - checksum_str[checksum_len++] = code; - } - sprintf(textptr, "%i:12:%c ", textpos, text[i]); - textptr += strlen(textptr); - /* - * width of each code is 9; composed codes are 18, but aligning - * the text behind the right bars would be ugly, so use 9 anyways - */ - textpos += 9; - } - c_checksum=0; - k_checksum=0; - - /* Add the checksum */ - if ( (bc->flags & BARCODE_NO_CHECKSUM)==0 ) - { - for(i=1; i<=checksum_len; i++) - { - c_checksum += i * (int)checksum_str[checksum_len - i]; - k_checksum += (i+1) * (int)checksum_str[checksum_len - i]; - } - - c_checksum = c_checksum % 47; - k_checksum += c_checksum; - k_checksum = k_checksum % 47; - - strcat(partial, codeset[c_checksum]); - strcat(partial, codeset[k_checksum]); - - } - strcat(partial, codeset[START_STOP]); /* end */ - - /* Encodes final 1-unit width bar to turn the start character into a stop char */ - strcat(partial, "1"); - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels1/barcode-0.98/compat/getopt.c b/glabels1/barcode-0.98/compat/getopt.c deleted file mode 100644 index 91f00b5..0000000 --- a/glabels1/barcode-0.98/compat/getopt.c +++ /dev/null @@ -1,831 +0,0 @@ -/* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu - before changing it! - - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996 - 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. - Ditto for AIX 3.2 and <stdlib.h>. */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#if !defined (__STDC__) || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - -#include <stdio.h> - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ -#include <stdlib.h> -#if defined (_LIBC) || defined (HAVE_UNISTD_H) -#include <unistd.h> -#endif -#endif /* GNU C library. */ - -#ifdef VMS -#include <unixlib.h> -#if HAVE_STRING_H - 0 -#include <string.h> -#endif -#endif - -#ifdef WIN32 -/* It's not Unix, really. See? Capital letters. */ -#include <windows.h> -#define getpid() GetCurrentProcessId() -#endif - -#ifndef _ -/* This is for other GNU distributions with internationalized messages. - When compiling libc, the _ macro is predefined. */ -#ifdef HAVE_LIBINTL_H -# include <libintl.h> -# define _(msgid) gettext (msgid) -#else -# define _(msgid) (msgid) -#endif -#endif - -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As `getopt' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Setting the environment variable POSIXLY_CORRECT disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt.h" - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg = NULL; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* XXX 1003.2 says this must be 1 before any call. */ -int optind = 0; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static char *nextchar; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters. - - PERMUTE is the default. We permute the contents of ARGV as we scan, - so that eventually all the non-options are at the end. This allows options - to be given in any order, even with programs that were not written to - expect this. - - RETURN_IN_ORDER is an option available to programs that were written - to expect options and other ARGV-elements in any order and that care about - the ordering of the two. We describe each non-option ARGV-element - as if it were the argument of an option with character code 1. - Using `-' as the first character of the list of option characters - selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return EOF with `optind' != ARGC. */ - -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER -} ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; - -#ifdef __GNU_LIBRARY__ -/* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -#include <string.h> -#define my_index strchr -#else - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -char *getenv (); - -static char * -my_index (str, chr) - const char *str; - int chr; -{ - while (*str) - { - if (*str == chr) - return (char *) str; - str++; - } - return 0; -} - -/* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ -#ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -#if !defined (__STDC__) || !__STDC__ -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -#endif /* not __STDC__ */ -#endif /* __GNUC__ */ - -#endif /* not __GNU_LIBRARY__ */ - -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -static const char *nonoption_flags; -static int nonoption_flags_len; - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -#if defined (__STDC__) && __STDC__ -static void exchange (char **); -#endif - -static void -exchange (argv) - char **argv; -{ - int bottom = first_nonopt; - int middle = last_nonopt; - int top = optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; -} - -/* Initialize the internal data when the first call is made. */ - -#if defined (__STDC__) && __STDC__ -static const char *_getopt_initialize (const char *); -#endif -static const char * -_getopt_initialize (optstring) - const char *optstring; -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - first_nonopt = last_nonopt = optind = 1; - - nextchar = NULL; - - posixly_correct = getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - - if (posixly_correct == NULL) - { - /* Bash 2.0 puts a special variable in the environment for each - command it runs, specifying which ARGV elements are the results of - file name wildcard expansion and therefore should not be - considered as options. */ - char var[100]; - sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); - nonoption_flags = getenv (var); - if (nonoption_flags == NULL) - nonoption_flags_len = 0; - else - nonoption_flags_len = strlen (nonoption_flags); - } - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns `EOF'. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. - - If OPTSTRING starts with `-' or `+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with `--' instead of `-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of `struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; -{ - optarg = NULL; - - if (optind == 0) - { - optstring = _getopt_initialize (optstring); - optind = 1; /* Don't scan ARGV[0], the program name. */ - } - - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. */ -#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ - || (optind < nonoption_flags_len \ - && nonoption_flags[optind] == '1')) - - if (nextchar == NULL || *nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (last_nonopt > optind) - last_nonopt = optind; - if (first_nonopt > optind) - first_nonopt = optind; - - if (ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (last_nonopt != optind) - first_nonopt = optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (optind < argc && NONOPTION_P) - optind++; - last_nonopt = optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (optind != argc && !strcmp (argv[optind], "--")) - { - optind++; - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; - - optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; - return EOF; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (ordering == REQUIRE_ORDER) - return EOF; - optarg = argv[optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - nextchar = (argv[optind] + 1 - + (longopts != NULL && argv[optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound; - int option_index; - - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - -#ifdef lint /* Suppress `used before initialized' warning. */ - indfound = 0; -#endif - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) - { - if (nameend - nextchar == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (opterr) - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); - nextchar += strlen (nextchar); - optind++; - optopt = 0; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - optarg = nameend + 1; - else - { - if (opterr) - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); - - nextchar += strlen (nextchar); - - optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (optind < argc) - optarg = argv[optind++]; - else - { - if (opterr) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); - nextchar += strlen (nextchar); - optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - nextchar += strlen (nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) - { - if (opterr) - { - if (argv[optind][1] == '-') - /* --option */ - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); - else - /* +option or -option */ - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); - } - nextchar = (char *) ""; - optind++; - optopt = 0; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *nextchar++; - char *temp = my_index (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*nextchar == '\0') - ++optind; - - if (temp == NULL || c == ':') - { - if (opterr) - { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: illegal option -- %c\n"), - argv[0], c); - else - fprintf (stderr, _("%s: invalid option -- %c\n"), - argv[0], c); - } - optopt = c; - return '?'; - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*nextchar != '\0') - { - optarg = nextchar; - optind++; - } - else - optarg = NULL; - nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*nextchar != '\0') - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr) - { - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, - _("%s: option requires an argument -- %c\n"), - argv[0], c); - } - optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = NULL; - } - } - return c; - } -} - -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0); -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ - -int -main (argc, argv) - int argc; - char **argv; -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == EOF) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/glabels1/barcode-0.98/compat/getopt.h b/glabels1/barcode-0.98/compat/getopt.h deleted file mode 100644 index 952f483..0000000 --- a/glabels1/barcode-0.98/compat/getopt.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989, 90, 91, 92, 93, 94 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef _GETOPT_H -#define _GETOPT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -struct option -{ -#if defined (__STDC__) && __STDC__ - const char *name; -#else - char *name; -#endif - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the `has_arg' field of `struct option'. */ - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); - -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* _GETOPT_H */ diff --git a/glabels1/barcode-0.98/configure b/glabels1/barcode-0.98/configure deleted file mode 100755 index 81f79e0..0000000 --- a/glabels1/barcode-0.98/configure +++ /dev/null @@ -1,1708 +0,0 @@ -#! /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: - -# 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=barcode.h - -# 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@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 - - - - -# 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:530: 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:560: 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:611: 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:643: 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 654 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:659: \"$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:685: 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:690: 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:699: \"$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:718: 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 - -# 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:752: 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 - -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. - -# 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:810: 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' - - -if test x$GCC = xyes; then - CFLAGS="$CFLAGS -Wall" -fi - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:869: 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 884 "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:890: \"$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 901 "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:907: \"$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 918 "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:924: \"$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 - -ac_safe=`echo "getopt.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for getopt.h""... $ac_c" 1>&6 -echo "configure:950: checking for getopt.h" >&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 955 "configure" -#include "confdefs.h" -#include <getopt.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:960: \"$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 - : -else - echo "$ac_t""no" 1>&6 -NO_GETOPT=-DNO_GETOPT;GETOPT_O=compat/getopt.o -fi - -ac_safe=`echo "paper.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for paper.h""... $ac_c" 1>&6 -echo "configure:984: checking for paper.h" >&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 989 "configure" -#include "confdefs.h" -#include <paper.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:994: \"$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 - LIBPAPER=-lpaper -else - echo "$ac_t""no" 1>&6 -NO_LIBPAPER=-DNO_LIBPAPER -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:1020: 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 1025 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1030: \"$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 - - -echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:1058: checking for strerror" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1063 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strerror(); 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 strerror(); - -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_strerror) || defined (__stub___strerror) -choke me -#else -strerror(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strerror=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_strerror=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -NO_STRERROR=-DNO_STRERROR -fi - -for ac_func in strcasecmp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1109: 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 1114 "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:1137: \"$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 gmake"""... $ac_c" 1>&6 -echo "configure:1163: checking "for gmake"" >&5 -GMAKE=no -${MAKE=make} --version 2> /dev/null | grep GNU > /dev/null && GMAKE=yes -echo "$ac_t""$GMAKE" 1>&6 -if test "$GMAKE" = "yes"; then - GMAKEDEPEND0='ifeq (.depend,$(wildcard .depend))' - GMAKEDEPEND1='include .depend' - GMAKEDEPEND2='endif' -fi - -echo $ac_n "checking "if makeinfo can output html"""... $ac_c" 1>&6 -echo "configure:1174: checking "if makeinfo can output html"" >&5 -MAKEINFOHTML=no -${MAKEINFO=makeinfo} --help | grep .--html > /dev/null && MAKEINFOHTML=yes -echo "$ac_t""$MAKEINFOHTML" 1>&6 -if test "$MAKEINFOHTML" = "yes"; then - REMOVEHTMLTAGS="cat" - INFOTOHTML="$MAKEINFO --html" -else - REMOVEHTMLTAGS="sed 's/ifnottex/ifinfo/; s/ifnotinfo/iftex/'" - INFOTOHTML="perl texi2html -monolithic" -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 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# 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 "Makefile" | 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%@CC@%$CC%g -s%@RANLIB@%$RANLIB%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CPP@%$CPP%g -s%@GETOPT_O@%$GETOPT_O%g -s%@NO_GETOPT@%$NO_GETOPT%g -s%@NO_LIBPAPER@%$NO_LIBPAPER%g -s%@LIBPAPER@%$LIBPAPER%g -s%@NO_STRERROR@%$NO_STRERROR%g -s%@GMAKEDEPEND0@%$GMAKEDEPEND0%g -s%@GMAKEDEPEND1@%$GMAKEDEPEND1%g -s%@GMAKEDEPEND2@%$GMAKEDEPEND2%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-"Makefile"} -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* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF - -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 - - - - - - -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 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# 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 "doc/Makefile" | 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%@MAKEINFO@%$MAKEINFO%g -s%@REMOVEHTMLTAGS@%$REMOVEHTMLTAGS%g -s%@INFOTOHTML@%$INFOTOHTML%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-"doc/Makefile"} -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* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF - -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 - - diff --git a/glabels1/barcode-0.98/configure.in b/glabels1/barcode-0.98/configure.in deleted file mode 100644 index 07120b4..0000000 --- a/glabels1/barcode-0.98/configure.in +++ /dev/null @@ -1,65 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(barcode.h) -AC_PREREQ(2.12) - -AC_PROG_CC -AC_PROG_RANLIB -AC_PROG_INSTALL - -dnl Add "-Wall" if this is gcc -if test x$GCC = xyes; then - CFLAGS="$CFLAGS -Wall" -fi - - -dnl Check for getopt and libpaper. If getopt is missing, use our version -AC_CHECK_HEADER(getopt.h, ,NO_GETOPT=-DNO_GETOPT;GETOPT_O=compat/getopt.o) -AC_CHECK_HEADER(paper.h, LIBPAPER=-lpaper, NO_LIBPAPER=-DNO_LIBPAPER) -AC_CHECK_HEADERS(unistd.h) - -AC_CHECK_FUNC(strerror, , NO_STRERROR=-DNO_STRERROR) -AC_CHECK_FUNCS(strcasecmp) - -dnl Check if this is gmake, but allow ovverriding using $MAKE -AC_MSG_CHECKING("for gmake") -GMAKE=no -${MAKE=make} --version 2> /dev/null | grep GNU > /dev/null && GMAKE=yes -AC_MSG_RESULT($GMAKE) -if test "$GMAKE" = "yes"; then - GMAKEDEPEND0='ifeq (.depend,$(wildcard .depend))' - GMAKEDEPEND1='include .depend' - GMAKEDEPEND2='endif' -fi - -dnl Check if we use makeinfo or the local texi2html tool -AC_MSG_CHECKING("if makeinfo can output html") -MAKEINFOHTML=no -${MAKEINFO=makeinfo} --help | grep .--html > /dev/null && MAKEINFOHTML=yes -AC_MSG_RESULT($MAKEINFOHTML) -if test "$MAKEINFOHTML" = "yes"; then - REMOVEHTMLTAGS="cat" - INFOTOHTML="$MAKEINFO --html" -else - REMOVEHTMLTAGS="sed 's/ifnottex/ifinfo/; s/ifnotinfo/iftex/'" - INFOTOHTML="perl texi2html -monolithic" -fi - - -AC_SUBST(GETOPT_O) -AC_SUBST(NO_GETOPT) -AC_SUBST(NO_LIBPAPER) -AC_SUBST(LIBPAPER) -AC_SUBST(NO_STRERROR) -AC_SUBST(GMAKEDEPEND0) -AC_SUBST(GMAKEDEPEND1) -AC_SUBST(GMAKEDEPEND2) - -AC_OUTPUT(Makefile) - -AC_SUBST(MAKEINFO) -AC_SUBST(REMOVEHTMLTAGS) -AC_SUBST(INFOTOHTML) - -AC_OUTPUT(doc/Makefile) - diff --git a/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz b/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz Binary files differdeleted file mode 100644 index 69df956..0000000 --- a/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz +++ /dev/null diff --git a/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz.README b/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz.README deleted file mode 100644 index 1608eba..0000000 --- a/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz.README +++ /dev/null @@ -1,24 +0,0 @@ - -[readme written by GNU-barcode maintainer] - -This is a stripped version of what you can find at: - http://www.onefour.net/barcode/SVG/barcode097-SVG.tar.gz - -It's by David J. Humphreys, it's GPL code and the original tarball -(as per the previous URL) contains: - --rwxr--r-- david/david 243 2002-01-02 04:18:00 Makefile --rwxr--r-- david/david 1284 2002-01-08 00:26:42 main.c --rwxr--r-- david/david 37796 2002-01-02 04:33:00 screen1.png --rwxr--r-- david/david 5503 2002-01-08 00:30:00 svg.c --rwxr--r-- david/david 2499 2002-01-02 03:37:00 test1.svg --rwxr--r-- david/david 2499 2002-01-02 03:44:00 test2.svg --rwxr--r-- david/david 2499 2002-01-02 03:49:00 test3.svg --rwxr--r-- david/david 34185 2002-01-02 04:41:00 test4.png --rwxr--r-- david/david 1834 2002-01-02 04:19:00 test4.svg --rwxr--r-- david/david 92713 2002-01-02 04:36:00 transformation.png --rwxr--r-- david/david 586 2002-01-02 04:11:00 transformation.svg - -Here I only included Makefile, main.c, svg.c, after converting -newlines to unix-style and changing permissions. - diff --git a/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz b/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz Binary files differdeleted file mode 100644 index cbc8e67..0000000 --- a/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz +++ /dev/null diff --git a/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README b/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README deleted file mode 100644 index 36d216d..0000000 --- a/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README +++ /dev/null @@ -1,10 +0,0 @@ - -The barcode-for-delphi tarball includes a version of this package -ported to run under Delphi. Please note that you can't distribute the -executable because of the GPL (i.e., disitributing it would be -copyright violation, because the executable is a derived work of GNU -barcode, whose authors don't allow distributing under non-GPL terms. - -I still think it may be useful to some users. - -The code has been contributed by Michael Geddes <michael@webease.com.au>. diff --git a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz b/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz Binary files differdeleted file mode 100644 index 1dadb1c..0000000 --- a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz +++ /dev/null diff --git a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz.README b/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz.README deleted file mode 100644 index b0364f6..0000000 --- a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz.README +++ /dev/null @@ -1,25 +0,0 @@ - - ***** barcodeps 0.1 ***** - 2000-10-07 - -Barcodes generated in PostScript -by Hans Schou http://www.schou.dk - -PostScript is a programming language. It has all the control structures -needed for creating barcodes on the fly. With this example it is not -needed to have another programming language than PostScript as the -barcodes are generated within the PostScript printer. - -This contribution gives some examples of how to generate Interleave 2 of 5 -barcodes. Edit the bottom of i25.ps with a new number and send it to -a PostScript printer to see an example. - -Usage, in PostScript: -To draw a Interleave 2 of 5 use the following command in i25.ps - (123456789) BarCodeI25 - -This method is very usefull used together with other scripts -or programming language as it is only necessary to copy some -files to the printer. No program execution is needed. - - diff --git a/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz b/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz Binary files differdeleted file mode 100644 index 91fa9e6..0000000 --- a/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz +++ /dev/null diff --git a/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz.README b/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz.README deleted file mode 100644 index 4a04807..0000000 --- a/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz.README +++ /dev/null @@ -1,13 +0,0 @@ - -The purpose of this program is to read a (scanned) image containing a -barcode. The image is then interpreted and the barcode is decoded. -The decoded string is outputted to stdout. - -Currently, only Code-128 is supported. - -The program is GPL'd and it's the work of Tuukka Toivonen. - -The home page for this and other programs by Tuukka is - http://www.ee.oulu.fi/~tuukkat/releases.html -while a bare ls-like listing of all packages is at - http://www.ee.oulu.fi/~tuukkat/rel/ diff --git a/glabels1/barcode-0.98/debian/README.debian b/glabels1/barcode-0.98/debian/README.debian deleted file mode 100644 index 7223023..0000000 --- a/glabels1/barcode-0.98/debian/README.debian +++ /dev/null @@ -1,9 +0,0 @@ -The Debian Package barcode ----------------------------- - -This Debian package is integrated in the upstream release of GNU -barcode, maintained by Alessandro Rubini (rubini@gnu.org, -rubini@prosa.it). Since I have no extended experience with Debian -packages, I'm willing to accept any fixes that seem fit, as well as a -real Debian maintainer for the Debian package. - diff --git a/glabels1/barcode-0.98/debian/changelog b/glabels1/barcode-0.98/debian/changelog deleted file mode 100644 index b43e686..0000000 --- a/glabels1/barcode-0.98/debian/changelog +++ /dev/null @@ -1,27 +0,0 @@ -barcode (0.98) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini <rubini@gnu.org> Fri, 1 Mar 2002 23:04:14 +0100 - -barcode (0.96) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini <rubini@gnu.org> Wed, 8 Nov 2000 18:29:18 +0200 - -barcode (0.95) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini <rubini@gnu.org> Thu, 3 Feb 2000 21:16:59 +0200 - -barcode (0.94) unstable; urgency=low - - * Initial Release. - - -- Alessandro Rubini <rubini@gnu.org> Sun, 24 Oct 1999 01:10:23 +0200 - -Local variables: -mode: debian-changelog -End: diff --git a/glabels1/barcode-0.98/debian/control b/glabels1/barcode-0.98/debian/control deleted file mode 100644 index aacbfd4..0000000 --- a/glabels1/barcode-0.98/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: barcode -Section: misc -Priority: optional -Maintainer: Alessandro Rubini <rubini@prosa.it> -Standards-Version: 2.5.0 - -Package: barcode -Architecture: any -Depends: ${shlibs:Depends} -Description: Creates barcodes in .ps format - GNU barcode can create printouts for the conventional - product packagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, code 39 - code 128 (b and c), and interleaved 2 of 5 . Ouput is generated as - either Postscript or Encapsulated Postscript. diff --git a/glabels1/barcode-0.98/debian/copyright b/glabels1/barcode-0.98/debian/copyright deleted file mode 100644 index c193af2..0000000 --- a/glabels1/barcode-0.98/debian/copyright +++ /dev/null @@ -1,8 +0,0 @@ -This package was written by Alessandro Rubini rubini@gnu.org on Sun, 24 Oct 1999 01:10:23 +0200. - -The pristine source can be downloaded from ftp://ftp.gnu.org/pub/barcode -and GNU mirrors. Latest and greatest version (also beta) are immediately -uploaded to ftp://ftp.prosa.it/pub/software. - -Copyright: GPL (see /usr/doc/copyright/GPL) - diff --git a/glabels1/barcode-0.98/debian/dirs b/glabels1/barcode-0.98/debian/dirs deleted file mode 100644 index 6822e40..0000000 --- a/glabels1/barcode-0.98/debian/dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin -usr/include -usr/info diff --git a/glabels1/barcode-0.98/debian/info b/glabels1/barcode-0.98/debian/info deleted file mode 100644 index 18336bf..0000000 --- a/glabels1/barcode-0.98/debian/info +++ /dev/null @@ -1,15 +0,0 @@ -# This is a configuration files for installing a .info menu -# The Description to be placed into the directory -DESCR="Barcode library and frontend" - -# The section this info file should be placed in (Regexp) followed by -# the new section name to be created if the Regexp does not match -# (Optional. If not given the .info will be appended to the directory) -SECTION_MATCH="[cC]ommands" -SECTION_NAME="General Commands" - -# The file referred to from the Info directory -FILE=barcode.info - -# Optional. The files to be copied to /usr/info -FILES=doc/*.info diff --git a/glabels1/barcode-0.98/debian/rules b/glabels1/barcode-0.98/debian/rules deleted file mode 100755 index c48c5a1..0000000 --- a/glabels1/barcode-0.98/debian/rules +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/make -f -# Made with the aid of debmake, by Christoph Lameter, -# based on the sample debian/rules file for GNU hello by Ian Jackson. - -package=barcode - -build: - $(checkdir) - ./configure --prefix=/usr - $(MAKE) CFLAGS="-O2 -g -Wall" - touch build - -clean: - $(checkdir) - -rm -f build - -$(MAKE) distclean - -rm -f `find . -name "*~"` - -rm -rf debian/tmp debian/files* core debian/substvars - -binary-indep: checkroot build - $(checkdir) -# There are no architecture-independent files to be uploaded -# generated by this package. If there were any they would be -# made here. - -binary-arch: checkroot build - $(checkdir) - -rm -rf debian/tmp - install -d debian/tmp - cd debian/tmp && install -d `cat ../dirs` - $(MAKE) install prefix=`pwd`/debian/tmp/usr -# Must have debmake installed for this to work. Otherwise please copy -# /usr/bin/debstd into the debian directory and change debstd to debian/debstd - debstd ChangeLog README TODO INSTALL - dpkg-gencontrol - chown -R root.root debian/tmp - chmod -R go=rX debian/tmp - dpkg --build debian/tmp .. - -define checkdir - test -f debian/rules -endef - -binary: binary-indep binary-arch - -checkroot: - $(checkdir) - test root = "`whoami`" - -.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/glabels1/barcode-0.98/doc/Makefile.in b/glabels1/barcode-0.98/doc/Makefile.in deleted file mode 100644 index dae8f6b..0000000 --- a/glabels1/barcode-0.98/doc/Makefile.in +++ /dev/null @@ -1,135 +0,0 @@ -# -# Makefile (now .in) for the documentation directory -# -# Copyright 1994,2000 rubini@gnu.org (Alessandro Rubini) -# -################# -# -# BE CAREFUL in editing: -# due to the large number of index files, and my use of a non standard -# info input file, any file $(TARGET).* is removed by "make clean" -# -# I chose to use a prefix for the input file ("doc.$(TARGET)"), to ease -# makeing clean and applying my own rules. -# -################################################################### -# -# First of all, retrieve features of makeinfo, to know if we can do images -# and --html. Also, allow MAKEINFO to be specified on the commandline to -# allow me testing with various versions. - -# NOTE: it looks like semi-old versions can do images too, so CANDOIMAGES -# is not (yet?) used - - -MAKEINFO = @MAKEINFO@ -# According to whether this makeinfo can output html, autoconf define these -REMOVEHTMLTAGS = @REMOVEHTMLTAGS@ -INFOTOHTML = @INFOTOHTML@ - -############################################## - - -TARGET = barcode -ALL = $(TARGET).ps $(TARGET).info $(TARGET)doc.txt $(TARGET).html \ - $(TARGET).pdf - -all: $(ALL) terse - -info: $(TARGET).info - -$(TARGET)doc.txt: mktxt - -mpage: all - mv $(TARGET).ps $(TARGET)1.ps - mpage -2A $(TARGET)1.ps > $(TARGET)2.ps && rm $(TARGET)1.ps - -terse: - # preserve the pdf copy - -mv -f $(TARGET).pdf PDF 2> /dev/null && \ - rm -f *~ *.dvi *.log *.aux \ - $(TARGET).*.bak $(TARGET).??? $(TARGET).texinfo && \ - mv PDF $(TARGET).pdf; - - # preserve the ps copy - -mv $(TARGET).ps PS; - -rm -f $(TARGET).??; - -mv PS $(TARGET).ps; - -clean: terse - rm -f $(ALL) $(TARGET)_toc.html - - -#################################################### - -# These rules used to be expressed as "%.texinfo: doc.%" etc. However, this -# is gmake-specific, so I turned every % to $(TARGET), thus loosing generality -# but gaining portability. I also had to drop "$^": it worked with gmake -# and not pmake, while "$<" worked with pmake and not gmake. -# with gmake and not pmake. -# ARub 2000-04-21 - -$(TARGET).texinfo: doc.$(TARGET) - @rm -f $@ 2> /dev/null - sed -f ./infofilter doc.$(TARGET) | $(REMOVEHTMLTAGS) > $@ - chmod 400 $@ - - -# This rule is somewhat a rewrite of texi2dvi. I like make more than sh :-) -# This had to be rewritten too, as "$*" is different in gmake and pmake - -$(TARGET).dvi: $(TARGET).texinfo - -# create a spurious index file to please silly sh (bash will work anyway) - touch $(TARGET).oo - -# get the index list - if test "x`ls $(TARGET).?? $(TARGET).aux`" != "x"; then \ - for i in `ls $(TARGET).?? $(TARGET).aux`; do \ - cp $$i $$i~; \ - done; \ - fi - tex $(TARGET).texinfo - -#check the file list, the file and if needed run TeX again - old="`ls $(TARGET).??~ $(TARGET).aux~ | sed 's/~//g'`"; \ - new="`ls $(TARGET).?? $(TARGET).aux`"; \ - need="n"; \ - if test "$$old" != "$$new"; then need="y"; \ - else \ - for i in `ls $(TARGET).?? $(TARGET).aux`; do \ - cmp -s $$i $$i~; if test $$? -ne 0; then need="y" break; fi; \ - done; \ - fi; \ - if test "$$need" = "y"; then \ - texindex $(TARGET).?? && tex $(TARGET).texinfo; \ - fi - - -$(TARGET).ps: $(TARGET).dvi - dvips -f $(TARGET).dvi > $@ - -$(TARGET).pdf: $(TARGET).ps - ps2pdf $(TARGET).ps > $@ - -$(TARGET).lj: $(TARGET).dvi - dvilj -e- $(TARGET).dvi > $@ - -$(TARGET).info: $(TARGET).texinfo - makeinfo $(TARGET).texinfo -o $@ - -$(TARGET).html: $(TARGET).texinfo - $(INFOTOHTML) -o $@ $< - -#$(TARGET).man: doc.$(TARGET) -# manpages are created by the toplevel Makefile - -$(TARGET)doc.txt: $(TARGET).info - awk -f ./mktxt $(TARGET).info > $@ - - - - - - - diff --git a/glabels1/barcode-0.98/doc/README b/glabels1/barcode-0.98/doc/README deleted file mode 100644 index 5af5490..0000000 --- a/glabels1/barcode-0.98/doc/README +++ /dev/null @@ -1,5 +0,0 @@ - -The input file is "doc.barcode". I preprocess this file to -build both a "barcode.texinfo" file and manual pages. - -The intermediat diff --git a/glabels1/barcode-0.98/doc/barcode.info b/glabels1/barcode-0.98/doc/barcode.info deleted file mode 100644 index 693ca79..0000000 --- a/glabels1/barcode-0.98/doc/barcode.info +++ /dev/null @@ -1,747 +0,0 @@ -This is barcode.info, produced by makeinfo version 4.0 from -barcode.texinfo. - - This file is the User's Manual for the barcode library (version -0.98). - - -File: barcode.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) - -Barcode tools -************* - - This file documents version 0.98 of the barcode library and sample -programs (March 2002). - -* Menu: - -* Overview:: -* The Barcode Object:: -* Supported Flags:: -* The API:: -* The barcode Executable:: -* Supported Encodings:: -* PCL Output:: -* Bugs and Pending Issues:: - - -File: barcode.info, Node: Overview, Next: The Barcode Object, Prev: Top, Up: Top - -Overview -******** - - The "barcode" package is mainly a C library for creating bar-code -output files. It also includes a command line front-end and (in a -foreseeable future) a graphic frontend. - - The package is designed as a library because we think the main use -for barcode-generation tools is inside more featured applications. The -library addresses bar code printing as two distinct problems: creation -of bar information and actual conversion to an output format. To this -aim we use an intermediate representation for bar codes, which is -currently documented in the `ps.c' source file (not in this document). - - Note that the library and the accompanying material is released -according to the GPL license, not the LGPL one. A copy of the GPL is -included in the distribution tarball. - - -File: barcode.info, Node: The Barcode Object, Next: Supported Flags, Prev: Overview, Up: Top - -The Underlying Data Structure -***************************** - - Every barcode-related function acts on a data structure defined in -the `barcode.h' header, which must be included by any C source file -that uses the library. The header is installed by make install. - - The definition of the data structure is included here for reference: - - struct Barcode_Item { - int flags; /* type of encoding and other flags */ - char *ascii; /* malloced */ - char *partial; /* malloced too */ - char *textinfo; /* information about text placement */ - char *encoding; /* code name, filled by encoding engine */ - int width, height; /* output units */ - int xoff, yoff; /* output units */ - int margin; /* output units */ - double scalef; /* requested scaling for barcode */ - int error; /* an errno-like value, in case of failure */ - }; - - The exact meaning of each field and the various flags implemented are -described in the following sections. - - Even though you won't usually need to act on the contents of this -structure, some of the functions in the library receive arguments that -are directly related to one or more of these fields. - -* Menu: - -* The Field List:: -* The Intermediate Representation:: - - -File: barcode.info, Node: The Field List, Next: The Intermediate Representation, Prev: The Barcode Object, Up: The Barcode Object - -The Fields -========== - -`int flags;' - The flags are, as you may suspect, meant to specify the exact - behaviour of the library. They are often passed as an argument to - barcode functions and are discussed in the next section. - -`char *ascii;' -`char *partial;' -`char *textinfo;' -`char *encoding;' - These fields are internally managed by the library, and you are - not expected to touch them if you use the provided API. All of - them are allocated with malloc. - -`int width;' -`int height;' - They specify the width and height of the active barcode region - (i.e., excluding the white margin), in the units used to create - output data (for postscript they are points, 1/72th of an inch, - 0.352 mm). The fields can be either assigned to in the structure - or via Barcode_Position(), at your choice. If either value or - both are left to their default value of zero, the output engine - will assign default values according to the specified scaling - factor. If the specified width is bigger than needed (according to - the scaling factor), the output barcode will be centered in its - requested region. If either the width of the height are too small - for the specified scale factor, the output bar code will expand - symmetrically around the requested region. - -`int xoff;' -`int yoff;' - The fields specify offset from the coordinate origin of the output - engine (for postscript, position 0,0 is the lower left corner of - the page). The fields can be either assigned to in the structure - or via Barcode_Position(), at your choice. The offset specifies - where the white margin begins, not where the first bar will be - printed. To print real ink to the specified position you should - set margin to 0. - -`int margin;' - The white margin that will be left around the printed area of the - bar code. The same margin is applied to all sides of the printed - area. The default value for the margin is defined in `barcode.h' - as BARCODE_DEFAULT_MARGIN (10). - -`double scalef;' - The enlarge or shrink value for the bar code over its default - dimension. The width and scalef fields interact deeply in the - creation of the output, and a complete description of the issues - appears later in this section. - -`int error;' - The field is used when a barcode function fails to host an - errno-like integer value. - -Use of the width and scalef fields. ------------------------------------ - - A width unit is the width of the thinnest bar and/or space in the -chosen code; it defaults to 1 point if the output is postscript or -encapsulated postscript. - - Either or both the code width and the scale factor can be left -unspecified (i.e., zero). The library deals with defaults in the -following way: - -Both unspecified - If both the width and the scale factor are unspecified, the scale - factor will default to 1.0 and the width is calculated according - to the actual width of the bar code being printed. - -Width unspecified - If the width is not specified, it is calculated according to the - values of scalef. - -Scale factor unspecified - If the scale factor is not specified, it will be chosen so that - the generated bar code exactly fits the specified width. - -Both specified - The code will be printed inside the specified region according to - the specified scale factor. It will be aligned to the left. If, - however, the chosen width is too small for the specific bar code - and scaling factor, then the code will extend symmetrically to the - left and to the right of the chosen region. - - -File: barcode.info, Node: The Intermediate Representation, Prev: The Field List, Up: The Barcode Object - -The Intermediate Representation -=============================== - - The encoding functions print their output into the partial and -texinfo fields of the barcode data structure. Those fields, together -with position information, are then used to generate actual output. -This is an informal description of the intermediate format. - - The first char in partial tells how much extra space to add to the -left of the bars. For EAN-13, it is used to leave space to print the -first digit, other codes may have '0' for no-extra-space-needed. - - The next characters are alternating bars and spaces, as multiples of -the base dimension which is 1 unless the code is rescaled. Rescaling is -calculated as the ratio from the requested width and the calculated -width. Digits represent bar/space dimensions. Lower-case letters -represent those bars that should extend lower than the others: 'a' is -equivalent to '1', 'b' is '2' and so on up to 'i' which is equivalent to -'9'. Other letters will be used for encoding-specific meanings, as soon -as I implement them. - - The textinfo string is made up of fields %lf:%lf:%c separated by -blank space. The first integer is the x position of the character, the -second is the font size (before rescaling) and the char item is the -character to be printed. - - Both the partial and textinfo strings may include "-" or "+" as -special characters (in textinfo the char should be a stand-alone word). -They state where the text should be printed: below the bars ("-", -default) or above the bars. This is used, for example, to print the -add-5 and add-2 codes to the right of UPC or EAN codes (the add-5 -extension is mostly used in ISBN codes). - - -File: barcode.info, Node: Supported Flags, Next: The API, Prev: The Barcode Object, Up: Top - -The Flags -********* - - The following flags are supported by version 0.98 of the library: - -`BARCODE_ENCODING_MASK' - The mask is used to extract the encoding-type identifier from the - flags field. - -`BARCODE_EAN' -`BARCODE_UPC' -`BARCODE_ISBN' -`BARCODE_128B' -`BARCODE_128C' -`BARCODE_128' -`BARCODE_128RAW' -`BARCODE_39' -`BARCODE_I25' -`BARCODE_CBR' -`BARCODE_MSI' -`BARCODE_PLS' -`BARCODE_93' - The currently supported encoding types: EAN (13 digits, 8 digits, - 13 + 2 add-on and 13 + 5 add-on), UPC (UPC-A, UPC-E, UPC-A with 2 - or 5 digit add-on), ISBN (with or without the 5-digit add-on), - CODE128-B (the whole set of printable ASCII characters), CODE128-C - (two digits encoded by each barcode symbol), CODE128 (all ASCII - values), a "raw-input" pseudo-code that generates CODE128 output, - CODE39 (alphanumeric), "interleaved 2 of 5" (numeric), Codabar - (numeric plus a few symbols), MSI (numeric) and Plessey (hex - digits). *Note Supported Encodings::. - -`BARCODE_ANY' - This special encoding type (represented by a value of zero, so it - will be the default) tells the encoding procedure to look for the - first encoding type that can deal with a textual string. - Therefore, a 11-digit code will be printed as UPC (as well as - 6-digit, 11+2 and 11+5), a 12-digit (or 7-digit, or 12+2 or 12+5) - as EAN13, an ISBN code (with or without hyphens, with or without - add-5) will be encoded in its EAN13 representation, an even number - of digits is encoded using CODE128C and a generic string is - encoded using CODE128B. Since code-39 offers a much larger - representation for the same text string, code128-b is preferred - over code39 for alphanumeric strings. - -`BARCODE_NO_ASCII' - Instructs the engine not to print the ascii string on output. By - default the bar code is accompanied with an ascii version of the - text it encodes. - -`BARCODE_NO_CHECKSUM' - Instructs the engine not to add the checksum character to the - output. Not all the encoding types can drop the checksum; those - where the checksum is mandatory (like EAN and UPC) just ignore the - flag. - -`BARCODE_OUTPUT_MASK' - The mask is used to extract the output-type identifier from the - flags field. - -`BARCODE_OUT_PS' -`BARCODE_OUT_EPS' -`BARCODE_OUT_PCL' -`BARCODE_OUT_PCL_III' - The currently supported encoding types: full-page postscript and - encapsulated postscript; PCL (print command language, for HP - printers) and PCL-III (same as PCL, but uses a font not available - on older printers). - -`BARCODE_OUT_NOHEADERS' - The flag instructs the printing engine not to print the header and - footer part of the file. This makes sense for the postscript - engine but might not make sense for other engines; such other - engines will silently ignore the flag just like the PCL back-end - does. - - -File: barcode.info, Node: The API, Next: The barcode Executable, Prev: Supported Flags, Up: Top - -Functions Exported by the Library -********************************* - - The functions included in the barcode library are declared in the -header file barcode.h. They perform the following tasks: - -`struct Barcode_Item *Barcode_Create(char *text);' - The function creates a new barcode object to deal with a specified - text string. It returns NULL in case of failure and a pointer to - a barcode data structure in case of success. - -`int Barcode_Delete(struct Barcode_Item *bc);' - Destroy a barcode object. Always returns 0 (success) - -`int Barcode_Encode(struct Barcode_Item *bc, int flags);' - Encode the text included in the bc object. Valid flags are the - encoding type (other flags are ignored) and BARCODE_NO_CHECKSUM - (other flags are silently ignored); if the flag argument is zero, - bc->flags will apply. The function returns 0 on success and -1 in - case of error. After successful termination the data structure - will host the description of the bar code and its textual - representation, after a failure the error field will include the - reason of the failure. - -`int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);' - Print the bar code described by bc to the specified file. Valid - flags are the output type, BARCODE_NO_ASCII and - BARCODE_OUT_NOHEADERS, other flags are ignored. If any of these - flags is zero, it will be inherited from bc->flags which therefore - takes precedence. The function returns 0 on success and -1 in case - of error (with bc->error set accordingly). In case of success, the - bar code is printed to the specified file, which won't be closed - after use. - -`int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff, double scalef);' - The function is a shortcut to assign values to the data structure. - -`int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags);' - The function deals with the whole life of the barcode object by - calling the other functions; it uses all the specified flags. - -`int Barcode_Version(char *versionname);' - Returns the current version as an integer number of the form major - * 10000 + minor * 100 + release. Therefore, version 1.03.5 will be - returned as 10305 and version 0.53 as 5300. If the argument is - non-null, it will be used to return the version number as a - string. Note that the same information is available from two - preprocessor macros: BARCODE_VERSION (the string) and - BARCODE_VERSION_INT (the integer number). - - -File: barcode.info, Node: The barcode Executable, Next: Supported Encodings, Prev: The API, Up: Top - -The barcode frontend program -**************************** - - The barcode program is a front-end to access some features of the -library from the command line. It is able to read user supplied -strings from the command line or a data file (standard input by default) -and encode all of them. - -* Menu: - -* The Command Line:: - - -File: barcode.info, Node: The Command Line, Prev: The barcode Executable, Up: The barcode Executable - -The Command Line -================ - - barcode accepts the following options: - -`--help or -h' - Print a usage summary and exit. - -`-i filename' - Identify a file where strings to be encoded are read from. If - missing (and if -b is not used) it defaults to standard input. - Each data line of the input file will be used to create one - barcode output. - -`-o filename' - Output file. It defaults to standard output. - -`-b string' - Specify a single "barcode" string to be encoded. The option can - be used multiple times in order to encode multiple strings (this - will result in multi-page postscript output or a table of barcodes - if -t is specified). The strings must match the encoding chosen; - if it doesn't match the program will print a warning to stderr and - generate "blank" output (although not zero-length). Please note - that a string including spaces or other special characters must be - properly quoted. - -`-e encoding' - encoding is the name of the chosen encoding format being used. It - defaults to the value of the environment variable BARCODE_ENCODING - or to auto detection if the environment is also unset. - -`-g geometry' - The geometry argument is of the form "[<width> x <height>] [+ - <xmargin> + <ymargin>]" (with no intervening spaces). Unspecified - margin values will result in no margin; unspecified size results - in default size. The specified values represent print points by - default, and can be inches, millimeters or other units according - to the -u option or the BARCODE_UNIT environment variable. The - argument is used to place the printout code on the page. Note that - an additional white margin of 10 points is added to the printout. - If the option is unspecified, BARCODE_GEOMETRY is looked up in the - environment, if missing a default size and no margin (but the - default 10 points) are used. - -`-t table-geometry' - Used to print several barcodes to a single page, this option is - meant to be used to print stickers. The argument is of the form - "<columns> x <lines> [+ <leftmargin> + <bottommargin> [- - <rightmargin> [- <topmargin>]]]" (with no intervening spaces); if - missing, the top and right margin will default to be the same as - the bottom and left margin. The margins are specified in print - points or in the chosen unit (see -u below). If the option is not - specified, BARCODE_TABLE is looked up in the environment, - otherwise no table is printed and each barcode will get its own - page. The size (but not the position) of a barcode item within a - table can also be selected using -g (see "geometry" above), - without struggling with external and internal margins. I still - think management of geometries in a table is suboptimal, but I - can't make it better without introducing incompatibilities. - -`-m margin(s)' - Specifies an internal margin for each sticker in the table. The - argument is of the form "<xmargin>,<ymargin>" and the margin is - applied symmetrically to the sticker. If unspecified, the - environment variable BARCODE_MARGIN is used or a default internal - margin of 10 points is used. - -`-n' - "Numeric" output: don't print the ASCII form of the code, only the - bars. - -`-c' - No checksum character (for encodings that allow it, like code 39, - other codes, like UPC or EAN, ignore this option). - -`-E' - Encapsulated postscript (default is normal postscript). When the - output is generated as EPS only one barcode is encoded. - -`-P' - PCL output. Please note that the Y direction goes from top to - bottom for PCL, and the origin for an image is the top-left corner - instead of the bottom-left - -`-p pagesize' - Specify a non-default page size. The page size can be specified in - millimeters, inches or plain numbers (for example: "210x297mm", - "8.5x11in", "595x842"). A page specification as numbers will be - interpreted according to the current unit specification (see -u - below). If libpaper is available, you can also specify the page - size with its name, like "A3" or "letter" (libpaper is a standard - component of Debian GNU/Linux, but may be missing elsewhere). The - default page size is your system-wide default if libpaper is - there, A4 otherwise. - -`-u unit' - Choose the unit used in size specifications. Accepted values are - "mm", "cm", "in" and "pt". By default, the program will check - BARCODE_UNIT in the environment, and assume points otherwise (this - behaviour is compatible with 0.92 and previous versions. If -u - appears more than once, each instance will modified the behaviour - for the arguments at its right, as the command line is processes - left to right. The program internally works with points, and any - size is approximated to the nearest multiple of one point. The -u - option affect -g (geometry), -t (table) and -p (page size). - - -File: barcode.info, Node: Supported Encodings, Next: PCL Output, Prev: The barcode Executable, Up: Top - -Supported Encodings -******************* - - The program encodes text strings passed either on the command line -(with -b) or retrieved from standard input. The text representation is -interpreted according to the following rules. When auto-detection of -the encoding is enabled (i.e, no explicit encoding type is specified), -the encoding types are scanned to find one that can digest the text -string. The following list of supported types is sorted in the same -order the library uses when auto-detecting a suitable encoding for a -string. - -EAN - The EAN frontend is similar to UPC; it accepts strings of digits, - 12 or 7 characters long. Strings of 13 or 8 characters are - accepted if the provided checksum digit is correct. I expect most - users to feed input without a checksum, though. The add-2 and - add-5 extension are accepted for both the EAN-13 and the EAN-8 - encodings. The following are example of valid input strings: - "123456789012" (EAN-13), "1234567890128" (EAN-13 wih checksum), - "1234567" (EAN-8), "12345670 12345" (EAN-8 with checksum and - add-5), "123456789012 12" (EAN-13 with add-2), "123456789012 - 12345" (EAN-13 with add-5). - -UPC - The UPC frontend accepts only strings made up of digits (and, if a - supplemental encoding is used, a blank to separate it). It - accepts strings of 11 or 12 digits (UPC-A) and 6 or 7 or 8 digits - (UPC-E). - - The 12th digit of UPC-A is the checksum and is added by the - library if not specified in the input; if it is specified, it must - be the right checksum or the code is rejected as invalid. For - UPC-E, 6 digit are considered to be the middle part of the code, a - leading 0 is assumed and the checksum is added; 7 digits are - either considered the initial part (leading digit 0 or 1, checksum - missing) or the final part (checksum specified, leading 0 - assumed); 8 digits are considered to be the complete code, with - leading 0 or 1 and checksum. For both UPC-A and UPC-E, a trailing - string of 2 digits or 5 digits is accepted as well. Therefore, the - following are examples of valid strings that can be encoded as UPC: - "01234567890" (UPC-A) "012345678905" (UPC-A with checksum), - "012345" (UPC-E), "01234567890 12" (UPC-A, add-2) and "01234567890 - 12345" (UPC-A, add-5), "0123456 12" (UPC-E, add-2). Please note - that when setting BARCODE_ANY to auto-detect the encoding to be - used, 12-digit strings and 7-digit strings will always be - identified as EAN. This because I expect most user to provide - input without a checksum. If you need to specify UPC-with-checksum - as input you must explicitly set BARCODE_UPC as a flag or use -e - upc on the command line. - -ISBN - ISBN numbers are encoded as EAN-13 symbols, with an optional add-5 - trailer. The ISBN frontend of the library accepts real ISBN - numbers and deals with any hyphen and, if present, the ISBN - checksum character before encoding data. Valid representations for - ISBN strings are for example: "1-56592-292-1", "3-89721-122-X" and - "3-89721-122-X 06900". - -CODE 128-B - This encoding can represent all of the printing ASCII characters, - from the space (32) to DEL (127). The checksum digit is mandatory - in this encoding. - -CODE 128-C - The "C" variation of Code-128 uses Code-128 symbols to represent - two digits at a time (Code-128 is made up of 104 symbols whose - interpretation is controlled by the start symbol being used). Code - 128-C is thus the most compact way to represent any even number of - digits. The encoder refuses to deal with an odd number of digits - because the caller is expected to provide proper padding to an - even number of digits. (Since Code-128 includes control symbols to - switch charset, it is theoretically possible to represent the odd - digit as a Code 128-A or 128-B symbol, but this tool doesn't - currently implement this option). - -CODE 128 RAW - Code-128 output represented symbol-by-symbol in the input string. - To override part of the problems outlined below in specifying - code128 symbols, this pseudo-encoding allows the used to specify a - list of code128 symbols separated by spaces. Each symbol is - represented by a number in the range 0-105. The list should - include the leading character.The checksum and the stop character - are automatically added by the library. Most likely this - pseudo-encoding will be used with BARCODE_NO_ASCII and some - external program to supply the printed text. - -CODE 39 - The code-39 standard can encode uppercase letters, digits, the - blank space, plus, minus, dot, star, dollar, slash, percent. Any - string that is only composed of such characters is accepted by the - code-39 encoder. To avoid loosing information, the encoder refuses - to encode mixed-case strings (a lowercase string is nonetheless - accepted as a shortcut, but is encoded as uppercase). - -INTERLEAVED 2 OF 5 - This encoding can only represent an even number of digits (odd - digits are represented by bars, and even digits by the - interleaving spaces). The name stresses the fact that two of the - five items (bars or spaces) allocated to each symbol are wide, - while the rest are narrow. The checksum digit is optional (can be - disabled via BARCODE_NO_CHECKSUM). Since the number of digits, - including the checksum, must be even, a leading zero is inserted - in the string being encoded if needed (this is specifically stated - in the specs I have access to). - -CODE 128 - Automatic selection between alphabet A, B and C of the Code-128 - standard. This encoding can represent all ASCII symbols, from 0 - (NUL) to 127 (DEL), as well as four special symbols, named F1, F2, - F3, F4. The set of symbols available in this encoding is not - easily represented as input to the barcode library, so the - following convention is used. In the input string, which is a - C-language null-terminated string, the NUL char is represented by - the value 128 (0x80, 0200) and the F1-F4 characters are - represented by the values 193-196 (0xc1-0xc4, 0301-0304). The - values have been chosen to ease their representation as escape - sequences. - - Since the shell doesn't seem to interpret escape sequences on the - command line, the "-b" option cannot be easily used to designate - the strings to be encoded. As a workaround you can resort to the - command echo, either within back-ticks or used separately to - create a file that is then fed to the standard-input of barcode - - assuming your echo command processes escape sequences. The - newline character is especially though to encode (but not - impossible unless you use a csh variant. - - These problems only apply to the command-line tool; the use of - library functions doesn't give any problem. In needed, you can use - the "code 128 raw" pseudo-encoding to represent code128 symbols by - their numerical value. This encoding is used late in the - auto-selection mechanism because (almost) any input string can be - represented using code128. - -CODABAR - Codabar can encode the ten digits and a few special symbols - (minus, plus, dollar, colon, bar, dot). The characters "A", "B", - "C" and "D" are used to represent four different start/stop - characters. The input string to the barcode library can include - the start and stop characters or not include them (in which case - "A" is used as start and "B" as stop). Start and stop characters - in the input string can be either all lowercase or all uppercase - and are always printed as uppercase. - -PLESSEY - Plessey barcodes can encode all the hexadecimal digits. Alphabetic - digits in the input string must either be all lowercase or all - uppercase. The output text is always uppercase. - -MSI - MSI can only encode the decimal digits. While the standard - specifies either one or two check digits, the current - implementation in this library only generates one check digit. - -CODE 93 - The code-93 standard can natively encode 48 different characters, - including uppercase letters, digits, the blank space, plus, minus, - dot, star, dollar, slash, percent, as well as five special - characters: a start/stop delimiter and four "shift characters" - used for extended encoding. Using this "extended encoding" - method, any standard 7-bit ASCII character can be encoded, but it - takes up two symbol lengths in barcode if the character is not - natively supported (one of the 48). The encoder here fully - implements the code 93 encoding standard. Any characters natively - supported (A-Z, 0-9, ".+-/$&%") will be encoded as such - for any - other characters (such as lower case letters, brackets, - parentheses, etc.), the encoder will revert to extended encoding. - As a note, the option to exclude the checksum will eliminate the - two modulo-47 checksums (called C and K) from the barcode, but this - probably will make it unreadable by 99% of all scanning systems. - These checksums are specified to be used at the firmware level, - and their absence will be interpreted as an invalid barcode. - - -File: barcode.info, Node: PCL Output, Next: Bugs and Pending Issues, Prev: Supported Encodings, Up: Top - -PCL Output -********** - - While the default output is Postscript (possibly EPS), and Postscript -can be post-processed to almost anything, it is sometimes desirable to -create output directly usable by the specific printer at hand. PCL is -currently supported as an output format for this reason. Please note -that the Y coordinate for PCL goes from top to bottom, while for -Postscript it goes from bottom to top. Consistently, while in -Postscript you specify the bottom-left corner as origin, for PCL you -specify the top-left corner. - - Barcode output for PCL Printers (HP LaserJet and compatibles), was -developed using PCL5 Reference manuals from HP. that really refers to -these printers: - * LaserJet III, III P, III D, III Si, - - * LaserJet 4 family - - * LaserJet 5 family - - * LaserJet 6 family - - * Color LaserJet - - * DeskJet 1200 and 1600. - - - However, barcode printing uses a very small subset of PCL, probably -also LaserJet II should print it without problem, but the resulting -text may be horrible. - - The only real difference from one printer to another really depends -on which font are available in the printer, used in printing the label -associated to the bars (if requested). - - Earlier LaserJet supports only bitmaps fonts, so these are not -"scalable". (Ljet II ?), Also these fonts, when available, have a -specified direction, and not all of them are available in both Portrait -and Landscape mode. - - From LaserJet 4 series, (except 4L/5L that are entry-level printers), -Arial scalable font should be available, so it's the "default font" -used by this program. - - LaserJet III series printers (and 4L, 5L), don't feature "Arial" as a -resident font, so you should use BARCODE_OUT_PCL_III instead of -BARCODE_OUT_PCL., and font the font used will be "Univers" instead of -"Arial". - - Results on compatible printers, may depend on consistency of PCL5 -compatibility, in doubt, try BARCODE_OUT_PCL_III - - PJL commands are not used here, as it's not very compatible. - - Tested Printers: - * Hp LaserJet 4050 - - * Hp LaserJet 2100 - - * Epson N-1200 emul PCL - - * Toshiba DP2570 (copier) + PCL option - - * Epson EPL-7100 emul. HP LaserJet II: bars print fine but text is - bad. - - -File: barcode.info, Node: Bugs and Pending Issues, Prev: PCL Output, Up: Top - -Bugs and Pending Issues. -************************ - - The current management of borders/margins is far from optimal. The -"default" margin applied by the library interferes with the external -representation, but I feel it is mandatory to avoid creating barcode -output with no surrounding white space (the problem is especially -relevant for EPS output). - - EAN-128 is not (yet) supported. I plan to implement it pretty soon -and then bless the package as version 1.0. - - - -Tag Table: -Node: Top153 -Node: Overview525 -Node: The Barcode Object1403 -Node: The Field List2820 -Node: The Intermediate Representation6585 -Node: Supported Flags8358 -Node: The API11342 -Node: The barcode Executable14028 -Node: The Command Line14457 -Node: Supported Encodings19556 -Node: PCL Output28996 -Node: Bugs and Pending Issues31315 - -End Tag Table diff --git a/glabels1/barcode-0.98/doc/barcode.pdf b/glabels1/barcode-0.98/doc/barcode.pdf Binary files differdeleted file mode 100644 index d7f66cb..0000000 --- a/glabels1/barcode-0.98/doc/barcode.pdf +++ /dev/null diff --git a/glabels1/barcode-0.98/doc/barcode.ps b/glabels1/barcode-0.98/doc/barcode.ps deleted file mode 100644 index 6e2db98..0000000 --- a/glabels1/barcode-0.98/doc/barcode.ps +++ /dev/null @@ -1,2378 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software -%%Title: barcode.dvi -%%Pages: 12 -%%PageOrder: Ascend -%%BoundingBox: 0 0 596 842 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -f barcode.dvi -%DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2002.03.01:2356 -%%BeginProcSet: texc.pro -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 -1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx -0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx -sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp -gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B -/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ -/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ -A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy -get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} -ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp -fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 -{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add -chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ -1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} -forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} -B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ -p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -TeXDict begin 39158280 55380996 1000 600 600 (barcode.dvi) -@start -%DVIPSBitmapFont: Fa cmbxti10 14.4 8 -/Fa 8 115 df<13FCEA03FF000F13804813C05AA25AA2B5FCA31480A214006C5A6C5A6C -5AEA0FE0121271912B>46 D<ED3FF8913801FFFE020F9038FF83F0023FECC7F891B6EAEF -FC499038F83FFF0107D9E0077F49EB800349496C5B495A49487F495AA248495D5A48495B -A2485F5C485DA248495DA25E5A91C75CA25EB5FC495EA25EA24993C7FCA24CEB01F81803 -17FE5B167FF007F017FCA2007F03FFEB0FE05D6D5B003F4A9038F81FC0001F021F13FC6C -6C017FEC3F809027FF81FFDFEB7F006C90B5388FFFFE0001ECFE076CDAF8035B013FD9E0 -0013F0010390C7EA3FC03D3773B547>97 D<EC7FF048B5FC5AA45DEA00035BA25DA25BA2 -5DA25BA292C9FCA25BA25CA2137FA25CA213FFED1FFC4AB57E02FB14E04890B612F88392 -38F83FFE9238C00FFF48DA000713805C02F86D13C05C484915E0A25CA24817F0A25CA248 -5DA291C7FCA2484B13E0A25BA25E007F17C05BA25E18805B00FF17005E5FA26C484A5AA2 -4B5B5F5D5F6C6C495B4B5B001F93C7FC6DEB3FFE6C6C495A3A07FF83FFF06C90B55A6C15 -806C6C49C8FC011F13F801031380345473D240>I<923807FF80037F13F00203B512FC02 -0F80023F8091B500031380499038F8007F010701E0EBFFC049EB800149495A49485B495A -49485B5A485BA248491580180048496D5A486F5A93C8FC485BA35A91CAFCA3B5FC5BA45B -A65B17036C6CED0780170FEF3FC0003F167F6DEC01FF001F4B13806C6C021F13006C6DEB -7FFC6C9039F00FFFF86C90B612E06C5E013F4AC7FC010F14F0010049C8FC323773B540> -I<F00FFEEF3FFF5FA419FCEF007F18FFA219F8A25FA219F0A25FA219E0A25FA219C0A25F -A21980A25FED3FF8912601FFFE1400020FEBFF9F023F91B5FC91B8FC49D9F83F5B0107EB -E00749EB800349497E49485D49487F495AA248495D5A48495BA2485F5C485DA248495DA2 -5E5A91C75CA25EB5FC495EA25EA24993C7FCA24CEB01F8180317FE5B167FF007F017FCA2 -007F03FFEB0FE05D6D5B003F4A9038F81FC0001F021F13FC6C6C017FEC3F809027FF81FF -DFEB7F006C90B5388FFFFE0001ECFE076CDAF8035B013FD9E00013F0010390C7EA3FC03F -5473D247>I<923807FF8092B512E0020714F8021F80027F80903A01FFFE03FF49D9F000 -13804901C0EB7FC0495B013F90C7123F495A495A5C5A485B4849147F18804816FF4A4913 -00485DEE0FFE4849EB7FFC923807FFF891B612E0485E94C7FC16F04BC8FCB5CAFC5BA45B -A7007F1603EF0780170F003FEE3FC0177F6C6CEC01FF4C13806C6C021F13006C01C0EB7F -FC6C9039F00FFFF86C90B612E06C6C5D6D4AC7FC010714F09026007FFEC8FC323773B540 ->I<923807FFC0037F13FC0203B6FC020F15C0023F8191B5000313F8499039F8007FFC01 -0701E0133F4901806D7E4990C76C7E49481680495A4948804818C0485BA2485BA248494A -13E05AA2485BA24D13C05A91C8FCA25FB517805BA25F19005B6017FF605E60495E5E6C6C -4A5B604C5B003F4B90C7FC6D4A5A001F4B5A6C6C4A5A6CD980035B6CD9F01F13C06C90B6 -5A6C4BC8FC013F14F0010F14C0010001F8C9FC3B3773B547>111 -D<D91FE0EB07FED97FFC90383FFFC0496C90B512F048D9FF83804802C780D807F19039CF -FC07FED80FE09039FFF001FFDCC000138048484A5A4C5A4848495B0181495B4B5BEA7F01 -5D5B00FE18004B5C715A496F5A0000705A4B90C8FCA25BA25DA25BA292CAFCA25BA25CA2 -137FA25CA213FFA25CA25AA25CA25AA25CA25C6C5B6C90CBFC137E393776B53C>114 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb cmsy10 10.95 1 -/Fb 1 16 df<EB0FFCEB3FFF90B512C0000314F04880488048804880A2481580A3B712C0 -AA6C1580A36C1500A26C5C6C5C6C5C6C5CC614C0013F90C7FCEB0FFC22227BA72D>15 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc cmb10 10.95 10 -/Fc 10 115 df<EB0FFE90387FFFC048B512F04814FC3907FC0FFE48486C7E6D6C7F486C -7E82A26E7FA36C5A6C5AEA01E0C8FC5C49B5FC131F90B6FC000313F84813C0481300EA1F -FC485A127F5B12FF5BA45CA26C6C5A16F83B3FF807BFFF80391FFC1F3F390FFFFE1F6C49 -7E0001EBF80326003FE0C8FC292B7EA92C>97 D<13FFB5FCA512077EAF4AB4FC020F13E0 -023F13F891B57E9138FE07FFDAF8011380DAE00013C05C4AEB7FE017F0A3EE3FF8A317FC -AC17F8A3EE7FF0A217E06E13FF17C06E481380DAF80313009138FE0FFE9039FC7FFFFC49 -6C13F0496C13C0C7D803FEC7FC2E407FBE33>I<EB03FF011F13E0017F13F890B57E48EB -83FE3903FE01FF00075B4848481380121F13F8123FA2127F496C13006E5AEC007800FF91 -C7FCAC127FA27F003FEC07C0A26C6C130F16806C6C131F000715006C6C137F6CEBC1FE6C -EBFFFC6D13F0011F5B010390C7FC222B7DA928>I<16FF92B5FCA5150781AFEB01FF011F -13E3017F13FB90B7FC4813C148EB003F48487F48487F001F805B123FA2485AA312FFAC12 -7FA36C7EA3001F5C6C6C5B00074A13806D4913FC2603FF83B5FCC690B6FC6D13F7011F13 -C7903A03FE07FC002E407DBE33>I<49B47E010F13F0013F7F90B512FE48EBC3FF480100 -13804848EB7FC04848133F001F15E05B003FEC1FF0A2485A150F16F8A212FFA290B6FCA4 -01F0C8FCA5127FA37F003F15F8A26C6C1301000F15F06D13036C6CEB07E06C9038800FC0 -6C9038F07F806C6CB512006D5B010F13F8010013C0252B7EA92A>I<D907FE13FC90393F -FFC3FE90B5EAF7FF4891B5128048130F3907FC03FE3A0FF801FF7F001FEDFF00496C13BE -1680003F81A7001F5DA26D5A000F92C7FC6C6C485A3903FF0FFCECFFF8485CD80F3F13C0 -D907FEC8FC90CAFC5AA27FA213E090B512F015FF6C15C0826C816C8182120F4881393FE0 -003FD87F80EB07FF150148C7FC81A56D5B007F5D6D13036C6C495AD81FF8EB1FF86CB4EB -FFF06C90B55A000115806C6C49C7FC010713E0293D7EA82D>103 -D<EA01F8487E487E487E481380A66C13006C5A6C5A6C5AC8FCA913FFB5FCA512077EB3AB -B512F8A515407EBF19>105 D<01FFEB7FE0B53801FFF802077F4A7F91381FC3FFDA3E03 -13800007137C6CEB780102F014C014E0A214C0A31480B3A4B5D8FE1F13FFA530297EA833 ->110 D<49B47E010F13F0013F13FC90B6FC48018113803A03FE007FC04848EB3FE0000F -15F049131F001F15F8A24848EB0FFCA2007F15FEA400FF15FFAB007F15FEA3003F15FC6D -131F001F15F8A26C6CEB3FF0000715E06C6CEB7FC03A01FF81FF806C90B51200013F13FC -010F13F001011380282B7EA92D>I<3901FE07F800FFEB0FFE91383FFF804A13C0EC7C7F -9138F8FFE03807FFF06C5B5CA2ED7FC09138803F80ED1F0092C7FCA291C8FCB3A3B6FCA5 -23297FA827>114 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fd cmbxti10 17.28 7 -/Fd 7 115 df<EEFFE0030F13FC037F01FF13FC4AB6EA83FE0207EDEFFF4AD9E07FB57E -023FEB000F4A487F4948487F4913F04981495B49496D91C7FC495B5B92C8FC90B55E485B -5F485B4860A248495CA248605C5F5A4A5EA2485EA24A5EA2B55DA24A5EA25FA291C85CA2 -4DEC3F801A7F19005B94B513FFA24E1400A24C5C007F614C13FC4C1403003F4B5D6D4A14 -076C4B5D6C6D49140F4BB55C6CD9C007013F495A6C9026F03FFEEBFE3FC690B5D8F81FB5 -5A6DDAF0075C011FDAC00349C7FC010749C75B9026007FF0EC1FF0494271C055>97 -D<EC1FFE90B6FC5A5AA46C5CC7FC5BA25DA25BA25DA25BA25DA25BA25DA25BA25DA25BA2 -5DA25BA2923800FFE0030F13FC90B5003F13FF92B612C084048113F8489139FC007FFC03 -F06D7E4B804B7F484A158092C77E4A16C05C485B19E05CA25AA25C5F5AA25CA2485EA25C -A2485EA291C814C0A2B592B5FCA2491780A25E19005B5E60A24C5BA2495E4C5BA24C5B60 -5E007F5F6D4A90C7FC4C5A003F5E6D495B001F4A5B6C6C495B6CD9801F13806C01E0B5C8 -FC6C90B512FC6C6C14F06D14C0010F49C9FC010013E03B6570E34C>I<EE1FFE0303B512 -E0031F14F8037F804AB7FC0207D9FC071380021FD9E00013C04A0180137FDAFFFEC7EAFF -E049495B4949130749494913F049495B495B49495B5B90B5C714E0A2485B4818C05C4870 -13804A91380FFE0048705AEF00E0484992C7FCA25A5CA25AA25CA2B5FCA25CA491CBFCA6 -5BA2F00380007FEF07C0F00FE06DEE1FF06C173F187F6C6DEDFFE0050313C06C6D020F13 -806C043F13006C6DECFFFE6C01F8010713F86C01FE90B55A6DB712C0011F93C7FC010715 -F801001580020F01F0C8FC3C4271C04C>I<963803FFC0061FB512E06060A47214C0F000 -1F61A21B80A261A21B00A296B5FCA262A260A262A260A262A260A262A260A2DCFFE05C03 -0F13FC037FEBFF1F4AB6129F020792B55A4AEBE07F023FEB000F4A487F4948486D5C4913 -F04981495B49496D91C7FC495B5B92C8FC90B55E485B5F485B4860A248495CA248605C5F -5A4A5EA2485EA24A5EA2B55DA24A5EA25FA291C85CA24DEC3F801A7F19005B94B513FFA2 -4E1400A24C5C007F614C13FC4C1403003F4B5D6D4A14076C4B5D6C6D49140F4BB55C6CD9 -C007013F495A6C9026F03FFEEBFE3FC690B5D8F81FB55A6DDAF0075C011FDAC00349C7FC -010749C75B9026007FF0EC1FF04B6571E355>I<EE1FFE0303B512C0031F14F092B612FC -020381020F9038FC07FF4AD9E0011380027F90C713C04A48EC7FE04913F8010749143F49 -5B5B495B495B92C8FC90B5FC485B48177F5C48EFFFC05F48494A13804D130048161F4AEC -7FFC933803FFF848033F5B4AB612C091B75A4804FCC7FC17E004FCC8FC03E0C9FC02C0CA -FCB5FC5CA591CBFCA67EF00380F007C0F00FE06CEF1FF0183F187F6C6DEDFFE06C040313 -C06E020F13806C6D023F13006C6DECFFFE6C6D010713F86C01FE90B55A013FB712C06D93 -C7FC010715F801001580020F01F0C8FC3C4271C04C>I<93381FFF804BB512F8031F14FF -037F15C04AB77E0207D9FC0313F8021FD9E0007F4A0180EB3FFEDAFFFEC76C7E49491680 -49496E13C0495B49496E13E0495B494916F05B90B5C87E1AF8485B485F5C5A5C5AA2485B -605A5CA2485FA24A17F0A2B55EA24A17E0A2601AC091C9FC95B51280A21A005F615F495F -4D5B127F6D4B5B616C4C5B4D5B6C6D4A90C7FC4D5A6C6D495B6C4B5B6C6D010F13E06C01 -F8013F5B6CD9FE01B5C8FC013FB612FC6D15F0010715C0010002FCC9FC020F13C0454271 -C055>111 D<D907FCEC0FFE90261FFF8090387FFFE049D9E001B512F890B5D8F00714FE -48DAFC0F802A03FE3FFE3FFC071380D9FC1F90267FE00013C0D807F890B50080EB7FE000 -0F93380001FF01F04A5B001F4B4913F001E04A5B003F4B5B13C04A495B007F5D018018E0 -5E00FF5B1AC0010091C76C13801A0091B5EC07FC48715AC74991C8FCA25BA25DA25BA25D -A25BA25DA25BA25DA25BA25DA25BA25DA25BA292CBFCA290B5FCA25CA25AA25CA26C5B5C -6D5AEB1F80444275C048>114 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe cmbxti10 13.15 11 -/Fe 11 120 df<EDFFC0020713F0023FEBFC3E91B56CB4FC4901E0B512800107D9003F13 -C049487F49487F495A49486D1380495A485D4A15005A5A4A5B485E91C7FC5A163F5F485A -A2167F007F5E5BA216FF00FF5E5BA25DEFE01E49163FA24B147FEFC07EA3007F17FC5D4B -1380003F4AEB81F85D6C6C49EB83F06C6C48B513E02707FE0FFC13CF6CB539F07FFFC06C -4A6C13806C6CD9800F1300903A0FFC0003FC383375B141>97 D<ED3FF80203B5FC020F14 -80023F14C09139FFF81FE001039038C007F049010013F84948130F4948EB1FFC4948133F -4948137F495A48EDFFF8485BA2484914F048ED7FE0EE3FC04890C7EA1F8093C7FCA2485A -A3127F5BA312FF5BA45BA4007F166017F0EE01F8003F15036D1407001FED1FF0EE3FE06C -6CECFFC06C6C010713803B03FFC07FFE006C90B512F86C6C14E0011F91C7FC010313F02E -3375B13A>99 D<943801FF800403B512C05E1980A282EE000F1900A25FA260A2173FA260 -A2177FA260A217FFA260A25EEDFFC1020701F15B023F13FD91B7FC4913E00107D9003F5B -49487F49487F495A49486D5B495A485D5C4894C7FC5A4A5B5A91C75B5A163FA248485DA2 -167F127F495DA216FF12FF495DA25D181E49EDE03FA24B5C187E17C0A2007F5F5D4B1380 -003F4AEB81F85D6C6C49EB83F06C6C48B55B2707FE0FFC13CF6CB539F07FFFC06C4A6C5B -6C6CD9800F90C7FC903A0FFC0003FC3A4D75CB41>I<ED3FF80203B5FC021F1480027F14 -C0903A01FFF81FE0499038C00FF04990380007F8D91FFE1303495A494814FC494813014A -13034816F8485B5A4A130748ED0FF091C7EA1FE048153FEEFFC0480207138049017F1300 -90B612FC16F048158003F0C7FC01FCC9FCA3485AA55B127FA2176017F0EE01F86C6C1403 -1607001FED1FF06C6CEC3FE0EEFFC06CB4010713806C9039C07FFE00C690B512F86D14E0 -011F91C7FC010113F02E3375B13A>I<EF1FF0EFFFFE4CEBFF80040714C093390FFC3FE0 -EE1FF893393FF07FF0047F13FF17F1EEFFE1A24B01E313E0A205E113C04B01C1138005C0 -1300187E95C7FCA25D5FA45D94C8FCA349B712FC4982A36D5E90C7D81FFEC8FCA2153F5E -A4157F5EA515FF5EA45C5EA45C5EA55C5EA45C93C9FCA45C5DA45D143FA25DA2EA07E039 -1FF07FF0EA3FF8127F5D00FF13FF5D5DA201F190CAFCEBE1FE495A6C485A6CB45A6C5B00 -071380D801FECBFC3C6382CC2C>I<EC1FF890383FFFFC5B5DA27F13005DA25BA25DA25B -A25DA25BA25DA25BA292CAFCA25B4BB47EDAFE0F13F0033F13FC013F90B57E91B5EA07FF -DBF8037FDBE0017F4913C015004A81A2495A5C5CA2485D605CA2485D605CA2485D95C7FC -5C5E485EA291C7123F5F5A047FEB03C0499238F807E0A2003F03FF130F05F013C0495BEF -E01F007F1880183F4903C01300187E12FF60496DEBC1F893387FC7F0EFFFE049021F5B6C -486E90C7FC001FC8EA03FC3B4D78CB41>104 D<15F8EC03FC4A7E4A7EA25CA35DA25D6E -5AEC03E091C8FCAEEB07F8EB1FFEEB7FFF90B57E3901FC7FC0D803F07FEA07E0D80FC07F -A2381F80FFA2485A5B007E5CA25B00FE5C485A007C5C12005B92C7FCA25B5C133F5CA213 -7F5CA213FFECF00F48EC1F8014E0153F48150014C05D48147E14805D14816CEB01F84A5A -4A5A6CEB1FC06CEBFF806D90C7FC6D5AEB07F0214E78CC27>I<EC7FE090B512F05A15E0 -A27E130315C0A25BA21580A25BA21500A25BA25CA2133FA25CA2137FA25CA213FFA25CA2 -5AA25CA25AA25CA25AA25CA25AA291C7FCA25AA25BA2123FA25BA2127F140F9038F81F80 -A200FF133F150013F0A25C147E13E05CA2387FE1F8A2383FE3F06CB45A6C5B6C5BC648C7 -FC1C4D77CB20>108 D<913801FFC0021F13F8027F13FE91B6FC4901001380D903FCEB3F -C0D907F0130F010FEC3FE04948137F4A13FF133FA2017F4913C0A26F138017006E137E02 -FC90C7FCECFFC015FE6F7E16E06D80826D807F6D80010180EB003F1403EC003FD803C013 -0FD80FE01303EA3FF0486C7FA200FF5DA34B5A5B49495A495C49130F6CC7485AD83FC0EB -7FC03A1FF803FF806CB548C7FC6C14F8000114E026001FFEC8FC2B3377B135>115 -D<EC0FC04A7E4A7E147F14FFA35BA25DA25BA25DA25BA25DA25BA2003FB612C04815E0B7 -FCA26C15C026001FFEC7FC133FA25CA2137FA25CA213FFA25CA25AA25CA25AA25CA25AA2 -5CA25AED03C091380007E0A248140F16C049131F1680ED3F005D49137E5D4A5A000F495A -EC0FE00007EB3FC06CB55A6C91C7FC38007FFCEB1FE0234777C52A>I<D907F8EF1F80D9 -1FFEDA01F0EB3FC090267FFF80D903FCEB7FE090B56C0107ECFFF02701FC7FE0496C5A26 -03F83F021F15F8D807E06D5D000F017F143F01C016FCEA1F8085263F00FF027F7F4E137F -4848181F007E5C05FF140FD8FE034CEB07F000FC5C127CC6485C03804A14E0A25B4B4815 -0F494C14C05CA24C151F013F4C14805CA2F23F00017F5C4A92C7FC1A7EA21A7C1AFCA24F -5A62013F4A14034F5A6D6C5B4C6D485A6D6C90B56C485A902707FF83FCD9E07FC7FC6D90 -3AFFF87FFFFE01004A6C5B023FD9C00F13F00207D9000113C04D3378B154>119 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff cmbx12 13.14 13 -/Ff 13 117 df<923807FFE092B512FC020714FF021F81027F9038007FC0902601FFF0EB -0FE04901C0497E4990C7487ED90FFC147F011F824A14FF495AA2137F5CA2715A715A715A -EF078094C8FCA7EF07FCB9FCA526007FF0C7123F171FB3B3A2003FB5D8E00FB512F8A53D -4D7ECC44>12 D<EA07E0EA1FF8EA3FFCEA7FFEA2B5FCA6EA7FFEA2EA3FFCEA1FF8EA07E0 -1010778F22>46 D<B700F8023FB512F8A5D8001F01C0C9380FE000745AB3B3AD6D180F63 -811A1F6D96C7FC626D7F1A7E6D7F6D606E6C4B5A6E6CED07F06E6C4B5A6E01C0EC3FC06E -01F049B45A020101FF011F90C8FC6E91B55A033F15F8030715E0030092C9FC040713F055 -4C7CCA5E>85 D<ECFFFC010FEBFFC0017F14F090B612FC489038803FFE3B03FC0007FF80 -486C6D7F6D7F486D6C7F83167F83A2707E6C90C7FC6C5A6C5AC9FCA5ED1FFF021FB5FC49 -B6FC130F013FEBC03F9038FFFE00000313F04813C04890C7FC485A485AA2485AA2485AA4 -167FA26D14FF007F15EF6D01017F6C6C903907CFFF806C6CD90F8F13FE6C9038E07F076C -9038FFFE0300014A7ED8003F9038F0007F0103018090C7FC37347CB23C>97 -D<EF1FF0EE3FFFA51600177FB3EC0FFF91B512E0010314F8010F14FC013FEB01FF903A7F -F8003FFFD9FFE0130F48497F48497F4890C77E48815B121F5B123FA2127F5BA312FFAC12 -7FA36C7EA3121F6D5C120F6C6C5C6C6D5B6C5D6C01E0013F7F6D6C49EBFFE090393FFE03 -FE6DB512F801075C0100148091261FFC00EBC0003B4D7CCB44>100 -D<EC0FFF91B512F0010314FC010F14FF90263FFE077F90267FF0007F49486D7E4801806D -7E486F7E4890C7120F484881707E121F491403003F82A2127F5B701380A212FFA390B8FC -A401F8CAFCA5127FA27FA2123FA26C6CED0F80A26C6C151F6C17006E5C6C6D147E6C6D5C -6C6D495AD93FFCEB07F0903A1FFF803FE0010790B55A010192C7FC6D6C13FC020713C031 -347DB238>I<ED7FF0913807FFFC023F7F4A7F902601FFE0138049018113C049484813E0 -EB0FFCEB1FF8A2EB3FF0A2017F6D13C04A6C1380EE7F00163E93C7FCACB77EA526007FF0 -C8FCB3B3A3003FB512F8A52B4D7DCC26>I<EB7FC0B5FCA512037EB3923801FFC0030F13 -F8033F7F4B13FFDBFE077F9138C1F0039126C3E0017FDAC78080ECCF0014DE02DC6D7F14 -FC5CA25CA35CB3AAB6D8C07FEBFFE0A53B4C7BCB44>104 D<EB7FC0B5FCA512037EB3B3 -B3AAB61280A5194C7BCB22>108 D<903A7FC001FFC0B5010F13F8033F7F4B13FFDBFE07 -7F9138C1F00300039026C3E0017F6CD9C78080ECCF0014DE02DC6D7F14FC5CA25CA35CB3 -AAB6D8C07FEBFFE0A53B327BB144>110 D<913807FF80027F13F80103B6FC010F15C090 -261FFE017F903A7FF0003FF849486D7E480180EB07FE4890C76C7E4817804980000F17C0 -48486E13E0A2003F17F0A249157F007F17F8A400FF17FCAB007F17F8A46C6CEDFFF0A200 -1F17E0A26C6C4A13C0A26C6C4A13806C6D4913006C5E6C01E0EB1FFC6D6C495A903A3FFE -01FFF0010FB612C0010392C7FCD9007F13F80207138036347DB23D>I<903907FF807001 -7FEBF1F048B6FC1207380FFC01391FE0003F4848130F491307127F90C71203A2481401A2 -7FA27F01F090C7FC13FCEBFFC06C13FEECFFE06C14FC6C806CECFF806C15C06C15E06C15 -F06C7E011F14F8010114FCEB000FEC007FED1FFE0078140F00F8140715037E1501A27E16 -FC7E15036D14F86D13076D14F001F8EB1FE001FFEBFFC04890B51280486C1400D8F81F13 -FCD8E00313C027347CB230>115 D<14F8A51301A41303A21307A2130FA2131F133F137F -13FF1203000F90B512F0B7FCA426007FF8C7FCB3A7167CAA013F14F880A290391FFE01F0 -010F1303903907FF87E06DEBFFC06D14806D6C1300EC0FFC26467EC430>I -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg cmti10 10.95 35 -/Fg 35 122 df<933807FF80043F13E09338FE00F8DB01F0133EDB07E0130E4B48131F4C -137F031F14FF4BC7FCA218FE157E1878180015FE5DA31401A25DA414030103B712F0A218 -E0903A0003F000070207140F4B14C0A3171F020F15805DA2173F1800141F5D5F177EA214 -3F92C712FE5FA34A1301027EECF81CA3160302FEECF03C4A1538A21878187013014A0101 -13F018E0933800F1C0EF7F804948EC1F0094C7FCA35C1307A2001E5B127F130F00FF5BA2 -49CAFC12FEEAF81EEA703CEA7878EA1FF0EA07C0385383BF33>12 -D<EE07FC93393FFF87F09338FC07C7923A03F001E7E0DB07C013F792390F8007FF031F49 -13C016005DA2037E1580EF039FEF001F183F4B1500A3600201157E5DA218FE6014035D01 -03B7FC60A2903A0007F000014B130360A31707020F5D5DA2170F60141F5D171F60A2143F -92C7123F95C7FCA34A5C027EEC7E07A317FE02FE4A5A4A150EA2181E181C13014AEC7C3C -1838EF3C70EF1FE04948EC07C094C8FCA3495AA3001E5BEA7F0FA200FF5BA249CBFC12FE -EAF83EEA703CEA7878EA1FF0EA07C03C5383BF35>I<ED01801507ED0F00151C5D5D5D14 -014A5A4A5A4AC7FC141E143E5C14785C1301495AA2495A5C130F49C8FCA2133EA25BA213 -FC5B12015BA212035B1207A25B120FA25BA2121FA290C9FCA25AA2123EA2127EA2127CA6 -5AAB1278A67EA47EA2120E120F7EA26C7EA26C7E6C7E1360215A73C325>40 -D<14031580A2EC01C0EC00E0A21570A215781538153CA3151EA4151FA2150FA7151FA915 -3FA2153EA3157EA2157CA215FCA215F8A21401A215F0A2140315E0A2140715C0A2EC0F80 -A2141F15005C143EA25CA25CA2495A5C1303495A5C130F49C7FC131E5B137C5B5B485A48 -5A485A48C8FC121E5A12705A5A205A7FC325>I<387FFFFEA3B5FCA21705799521>45 -D<120FEA3FC0127FA212FFA31380EA7F00123C0A0A77891C>I<15031507150F151F151E -153E157EEC01FEEC03FC1407141FEB01FF90380FFBF8EB1FC3EB0E07130015F0A2140FA2 -15E0A2141FA215C0A2143FA21580A2147FA21500A25CA25CA21301A25CA21303A25CA213 -07A25CA2130FA25CA2131FA25CEB7FE0B612F0A215E0203D77BC2E>49 -D<15FE913803FFC091380F01F091383C00F84A137C4A7F4948133F49487F4A148049C7FC -5BEB0E0C011E15C0EB1C0EEB3C06133813781370020E133FD9F00C148013E0141C021813 -7F00011600EBC0384A13FEEC600102E05B3A00E3C003F89039FF0007F0013C495A90C748 -5A5E037FC7FC15FC4A5A4A5AEC0FC04AC8FC147E14F8EB03E0495A011FC9FC133E491418 -01F0143C48481438485A1678485A48C85A120E001E4A5AD83FE0130301FF495A397C3FF0 -1FD8780FB55AD8700391C7FCD8F0015B486C6C5A6E5AEC07C02A3F79BC2E>I<157F9138 -01FFE0913807C0F091381F007C023C133C4A133E4A131F1301495A5C1307A2495AA2163F -011F143EA2167E6E137C16F8ECE00102F013F09138F803E09138FC07C090390FFE0F00EC -FFBE6D13F86D5B7F6D7F8101037F90380F9FFFD91F0F1380D97C0713C0497E48486C13E0 -3903E0007F4848133F4848131F001F140F90C7FC003E1407A2127E127CA200FC15C05AA2 -ED0F80A2ED1F00153E007C143C157C007E5C6CEB03F0391F8007C0390FE03F802607FFFE -C7FC000113F838003FC0283F78BC2E>56 D<49B712C018F818FE903B0003FC0001FF9438 -007F804BEC3FC0A2F01FE014074B15F0180FA2140F5D181FA2021F16E05D183F19C0023F -ED7F804B14FF19004D5A027F4A5A92C7EA07F0EF1FE0EF7F804AD903FEC7FC92B512F017 -FE4AC7EA3F800101ED1FE04A6E7E17078401036F7E5CA30107825CA3010F5E4A1407A260 -011F150F5C4D5A60013F153F4A4A5A4D5A017F4A90C7FC4C5A91C7EA0FF849EC3FF0B812 -C094C8FC16F83C3E7BBD40>66 D<49B77E18F018FC903B0003FE0003FEEF00FF4BEC7F80 -F03FC00207151F19E05DA2020F16F0A25DA2141FF03FE05DA2023F16C0187F4B1580A202 -7FEDFF00604B495A4D5A02FF4A5A4D5A92C7EA3FC04CB4C7FC4990B512FC17E04ACAFCA2 -1303A25CA21307A25CA2130FA25CA2131FA25CA2133FA25CA2137FA25C497EB67EA33C3E -7BBD3E>80 D<92390FF001C0ED7FFE4AB5EA0380913907F80FC791390FC003EF91391F80 -01FF4AC71300027E805C495A4948143EA2495AA2010F153C5CA3011F1538A38094C7FC80 -A214FC6DB4FC15F015FE6DEBFFC06D14F06D14FC6D80143F020F7F020180EC001F150303 -007F167F163FA2161FA212075A5F120EA2001E153F94C7FCA2163E003E157E167C003F15 -FC4B5A486C5C4B5A6D495AD87DE0EB1F80D8F8F849C8FC017F13FE39F03FFFF8D8E00F13 -E048C690C9FC32427ABF33>83 D<277FFFFE01B500FC90B512E0B5FCA200039026800007 -90C7380FFC006C90C701FCEC07F049725A04035EA26350C7FCA20407150EA2040F5D1A3C -041F153862163B6216734F5A6D14E303014B5A6C15C303034BC8FC1683DB0703140E191E -030E151C61031C7F61ED380161157003F04A5A15E002014B5A15C0DA03804AC9FC60DA07 -00140E60140E605C029C5D14B8D97FF85D5C715A5C4A5DA24A92CAFC5F91C7FC705A137E -5F137C5F137801705D53406EBD5B>87 D<147E49B47E903907C1C38090391F80EFC09038 -3F00FF017E137F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F -5C90C7FCA21401485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E01 -3F13E0003E137FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977 -A72E>97 D<EB1FC0EA0FFF5CA2EA003FA291C7FCA25BA2137EA213FEA25BA21201A25BA2 -1203A25B147E3907F1FF809038F783E09038EF01F013FE390FF800F8A24913FC49137C48 -5A157E5B15FE123FA290C7FCA248130115FC127EA2140300FE14F85AA2EC07F0A215E048 -130F15C0141F15800078EB3F00127C147E003C5B383E01F8381E03E06C485A6CB4C7FCEA -01F81F4076BE2A>I<EC1FE0ECFFF8903803F03E903807C00F90381F8007D93F00138001 -7E131F49137F485A485A000715005B000F147E484890C7FCA2485AA3127F90C9FCA35A5A -A6481403007E5C5D151E003E5C5D6C5CEC03E0390F800F802603E07EC7FC3801FFF83800 -3FC0212977A72A>I<EE3F80ED1FFF1700A2ED007FA2167EA216FEA25EA21501A25EA215 -03A25EA21507A25E147E903801FF8F903807C1CF90391F80EFC090383F00FF017E137F5B -48486D5A485AA2485A000F92C7FC5B001F5CA24848137EA215FE127F90C75AA214015A48 -5CA2140316384814F0A21407167891380FE070127C021F13F0007E013F5B003E137FECF3 -E1261F01E35B3A0F8781E3802703FF00FFC7FCD800FC133E294077BE2E>I<EC3F809038 -01FFE0903807E0F890381F803CEB3E0001FC131E485A485A12074848133E49133C121F48 -48137C15F8EC03F0397F000FE0ECFF80B5EAFC0014C048C8FCA45AA61506150E151E007C -143C15786C14F0EC01E06CEB07C0390F801F003807C0FC3801FFF038007F801F2976A72A ->I<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E004BC7 -FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA4143F92C8 -FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2EAFE1E -EAF83C1270EA7878EA3FE0EA0F802A5383BF1C>I<EC03F0EC0FFC91383E0E1C9138FC07 -7E903901F003FE1303903807E001D90FC013FCEB1F80A2EB3F004914F8137E01FE1303A2 -484814F0A2150712034914E0A2150F12074914C0A2151FA216805B153F1203ED7F006D5B -A200015B0000495A9038F80F7E90387C1EFEEB1FF8903807E0FC90C7FC1401A25DA21403 -A25D001C1307007F5C48130F5D4A5A4AC7FC48137E00F85B387C03F0381FFFC0D803FEC8 -FC273B7CA72A>I<EB01FC13FF5CA21303A25CA21307A25CA2130FA25CA2131FA25CA213 -3FA291C8FCEC03F890387F0FFE91383E0F80D97E7813C0ECE007D9FFC013E014801400A2 -485A5BA25B0003140F16C05BA20007141F16805BA2000F143F16005B5D001F147EEDFE07 -4913FCA2003F0101130FEDF80E1300161E48ECF01CA2007E1538A200FE1570020013E048 -EC7FC00038EC1F0028407ABE2E>I<1478EB01FCA21303A314F8EB00E01400AD137C48B4 -FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F140012 -005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80E0A2EB -81C01383148038078700EA03FEEA00F8163E79BC1C>I<EB07F0EA03FF14E0A2EA000FA2 -14C0A2131FA21480A2133FA21400A25BA2137EA213FEA25BA21201A25BA21203A25BA212 -07A25BA2120FA25BA2121FA25BA2123FA290C7FCA25A1307127EA2EAFE0F130E12FCA213 -1E131CA2EA7C381378EA3C70EA1FE0EA0780144079BE17>108 D<D801F0D93F80137F3D -07FC01FFE003FFC03D0F3E07C1F80F83F03D0E1F0F00FC1E01F8001E011C90387C380000 -1C49D97E707F003C01F05C0038157F4A5C26783FC05C12704A91C7FC91C7127E00F003FE -1301494A5CEA007EA20301140301FE5F495CA203031407000160495C180F03075D000305 -1F13E0494A1480A2030FEC3F810007F001C0495CA2031F91383E0380120F494AEC0700A2 -033F150E001FEF1E1C4991C7EA0FF80007C7000EEC03E0432979A74A>I<D801F0EB3F80 -3A07FC01FFE03A0F3E07C1F83A0E1F0F00FC001E011C137C001C49137E003C13F012385C -38783FC012705C91C7FC00F015FE495CEA007EA2150101FE5C5BA2150300015D5B15075E -0003020F13704914C0A2031F13F00007ED80E05B1681EE01C0120F49EC0380A2EE070000 -1FEC0F0E49EB07FC0007C7EA01F02C2979A733>I<EC1FC0ECFFF8903803F07C90380FC0 -1FEB1F8090393F000F80017E14C0491307484814E0485A12075B000F15F0485AA2485AA2 -ED0FE0127F90C7FCA2151F4815C05AA2ED3F80A2ED7F00A248147E007C5C007E13015D4A -5A003E495A6C495A4A5A260F803EC7FC3807C0FC3801FFF038003F80242977A72E>I<90 -3903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0 -EB783F017001C013F0ED80019038F07F0001E015F8147E1603000113FEA2C75AA2010114 -0717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F15005E167E5E131F4B5A -6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201 -A25BA21203A2387FFFE0B5FCA22D3A80A72E>I<D801F013FC3A07FC07FF803A0F3E0F03 -C0260E1F1C13E0001EEB380F001C1370003CEBE01F123814C0D8783F14C0007090388007 -0092C7FC91C8FC12F05BEA007EA313FE5BA312015BA312035BA312075BA3120F5BA3121F -5B0007C9FC232979A726>114 D<EC7F80903801FFE0903807C0F890381F003C013E131C -013C131E017C133E49137E15FEA2000114FCA215706D13007FEBFFC014FC6C13FF15806D -13C06D13E0010F13F01300140F14071403120C123F387F80011403D8FF0013E0A300FCEB -07C000F0EB0F8012700078EB1F006C133C381F01F83807FFE0C690C7FC1F297AA725>I< -EB01C0EB03F01307A25CA2130FA25CA2131FA25CA2133FA291C7FCA2007FB51280B6FC15 -00D8007EC7FC13FEA25BA21201A25BA21203A25BA21207A25BA2120FA25BA2121F141C13 -80A2003F133C1438EB0078147014F05C495AEA1F03495A6C48C7FCEA07FCEA01F0193A78 -B81E>I<137C48B4141C26038F80137EEA0707000E7F001E15FE121CD83C0F5C12381501 -EA781F007001805BA2D8F03F1303140000005D5B017E1307A201FE5C5B150F1201495CA2 -151F0003EDC1C0491481A2153F1683EE0380A2ED7F07000102FF13005C01F8EBDF0F0000 -9038079F0E90397C0F0F1C90391FFC07F8903907F001F02A2979A731>I<017CEB01C048 -B4EB07F038038F80EA0707000E01C013F8121E001C1403EA3C0F0038EC01F0A2D8781F13 -0000705BA2EAF03F91C712E012005B017E130116C013FE5B1503000115805BA2ED070012 -03495B150EA25DA25D1578000114706D5B0000495A6D485AD97E0FC7FCEB1FFEEB03F025 -2979A72A>I<017C167048B491387001FC3A038F8001F8EA0707000E01C015FE001E1403 -001CEDF000EA3C0F0038177C1507D8781F4A133C00701380A2D8F03F130F020049133812 -005B017E011F14784C137013FE5B033F14F0000192C712E05BA2170100034A14C049137E -17031880A2EF070015FE170E00010101141E01F86D131C0000D9039F5BD9FC076D5A903A -3E0F07C1E0903A1FFC03FFC0902703F0007FC7FC372979A73C>I<903903F001F890390F -FC07FE90393C1E0E0F9026780F1C138001F0EBB83FD801E013F89039C007F07FEA038000 -0714E0D9000F140048151C000E4AC7FCA2001E131FA2C75BA2143F92C8FCA35C147EA314 -FE4A131CA30101143C001E1538003F491378D87F811470018314F000FF5D9039077801C0 -39FE0F7C033A7C0E3C078027783C1E1EC7FC391FF80FFC3907E003F029297CA72A>I<13 -7C48B4143826038F8013FCEA0707000E7F001E1401001C15F8EA3C0F12381503D8781F14 -F000701380A2D8F03F1307020013E012005B017E130F16C013FE5B151F1201491480A215 -3F000315005BA25D157EA315FE5D00011301EBF8030000130790387C1FF8EB3FF9EB07E1 -EB00035DA21407000E5CEA3F80007F495AA24A5AD8FF0090C7FC143E007C137E00705B38 -7801F0383803E0381E0FC06CB4C8FCEA03F8263B79A72C>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fh cmsl10 10.95 33 -/Fh 33 122 df<007FB5FCA2B512FEA418067C961E>45 D<157015F014011407143F9038 -03FFE0137FEBFFCFEBF80F1300141F15C0A5143F1580A5147F1500A55C5CA513015CA513 -035CA513075CA5130F5CA3131F497EB612F8A31D3D78BC2D>49 D<EC01FE91380FFFE002 -3F13F89138FC07FC903901E001FE903907C000FF49C7EA7F80011E15C0163F4915E05B01 -70141F13FF80A35A163FA26C90C7FC137E0118EC7FC090C8FCEEFF80A24B1300A24B5A5E -4B5A4B5A4B5A5E4B5A4BC7FC15FEEC01F84A5A4A5A4A5A4AC8FC143E5C5CEB01E0494813 -0E49485B49C7FC131E495C13705B48485C484814F0000FB6FC5A485D5AB7FC5EA22B3D7C -BC2D>I<EC07FC91383FFF809138F80FE0903903C007F09039078003FC90380F0001011C -14FE013C14FF137F1480EBFFC0A31480A291380003FE137E90C7FCED07FC16F8150F16F0 -ED1FE016C0ED3F80ED7E005DEC07F0903803FF8015F090380001FC6E7EED7F80ED3FC0A2 -ED1FE016F0A316F8A4120EEA3F80486C133F16F012FFA216E0157F5B48C7EAFFC000F015 -80007049130012786C495A003EEB07F86C495A390FE03FE00003B51280C649C7FCEB1FE0 -283F7ABC2D>I<01061403D90780131F90390FF801FE91B512FC16F816F016E0168049EB -FE0015F890381C7FC091C8FCA3133C1338A513781370A2EC1FE0ECFFF8903873E03E9038 -FF001F01FCEB0F804914C049EB07E04914F049130390C7FC16F8A61507A21206EA3F8048 -7EA2150F00FF15F0A24914E090C7121F00FC15C000F0143F00701580ED7F0012786C14FE -4A5A6C495A390F800FE03907E03FC06CB5C7FCC613FCEB1FE0283F7ABC2D>53 -D<EC03FC91381FFF8091387C07E0903901F001F0903903C000F84948137C49C7123E131E -013E141F133C137C137813F8A3163F486C143E167E6D147C6C6C14FC6E13F89138C001F0 -9138F003E090397FF807C09138FC0F0090383FFF3E6D13F86D13E06D7F01017F8101077F -90391F1FFF80D93E0F13C0EBF8072601F00113E048486C13F04848137F4848131F001FEC -0FF890C71207003E1403A2481401A300FC15F05AA3ED03E0A26CEC07C0007C1580007E14 -0F003EEC1F00003F143E6C6C5B6C6C485A3907F00FE00001B512806C6C48C7FCEB0FF028 -3F7ABC2D>56 D<EC07F8EC3FFE9138FC0F80903901F007C0903907E003E0D90FC013F090 -381F8001013F14F8EB7F004914FC48481300A24848EB01FEA21207A3485AA41503121F5B -A31507A2000F15FC150FA2151F1207153F000315F86C6C137F000014EF90387C01CF9039 -3E078FF090380FFE1FEB03F890C713E0A2ED3FC0A3ED7F8016005D003F5C487E4A5A00FF -495A5D4A5A49485A48495A007049C7FC0078137E383E03FC381FFFF06C13C0D801FEC8FC -273F79BC2D>I<17E016011603831607A2160FA2161F83163FA2167F167716F7EEE7FCED -01E316C3150316831507EE03FEED0F01150E151E151C153C03387FED7800157015F05D4A -4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC5CA20270C7EA3FE0171F5CA2495AA2 -494881170F49C8FCA2130EA24982013C1507A2137CD801FE4B7E2607FF80EC3FFEB500F0 -0107B512FC19F85E3E417DC044>65 D<013FB7FC18E018FC903B007FE00007FE6E489038 -01FF809438007FC05DF03FE0F01FF0A3027F16F892C8FCA54A16F04A153F19E0187F19C0 -F0FF8001014B13004A4A5A4D5AEF1FF04D5ADC03FFC7FC49B612F8EFFF8002F8C7EA3FE0 -EF0FF0EF07FC717E010715014A81711380A319C0130F5CA5011F4B13805C19005F601707 -013F4B5A4A4A5A4D5A4D5A017F913801FF8001FF020F90C7FCB812FC17F094C8FC3D3E7D -BD40>I<DCFFC01338030F01F01378037F01FC13F0913A01FF803F01913A07FC000781DA -1FE0EB03C3DA7FC0EB01E74AC812FF4948ED7FE0D907FC153F495A4948151F495A494815 -0F494816C018074890C9FC485AA2485A000F1880491603121FA248481607A295C7FC485A -A412FF5BA75BA2181C183C1838A27F007F1778187018F0003F5F6D150160001F16036C6C -4B5A95C7FC6C6C5D6C6C151E6C6C5D6C6C15F86D6C495A6D6CEB07C0D91FF0EB1F80D907 -FE01FEC8FC0101B512F86D6C13E0DA07FEC9FC3D4276BF42>I<013FB812F8A39026007F -F0C7127F6E48140F18034B14011800A31978147F4B1570A502FF143892C7FCA319001778 -4915704A14F016011603160F91B6FC495DA29138FC001F16071603160101075D5CA21970 -19F019E0010F4A5A4A90C7120119C0A218031980011F16075CF00F00A260181E013F163E -4A157E4D5A1703017F150F01FFEDFFF8B9FCA2603D3E7DBD3E>69 -D<011FB512FC5BA29039003FF8006E5AA25DA5143F5DA5147F5DA514FF92C7FCA55B5CA5 -13035CA513075CA5130F5CA5131F5CA3133F497E007FB512F0A2B6FC263E7EBD21>73 -D<90263FFFF0933807FFFE5013FC629026007FF8EFFC00023F4D5AA2023BEF77F0A2DA39 -FC16E7A2F101CF0279EE038FDA70FE5FF1070FA2190E1A1FDAF07F151C02E06019381970 -6F7EF1E03F130102C0DB01C05BA26F6CEB0380A2953807007F0103160E4A6C6C93C7FC60 -A2606201076D6C5B02005F60A26F6C485A94380380015B010EDB07005BA2923801FC0EA2 -4D1303131E011C6D6C485C5FA25F1907013CEC7FC0013860013C5D137C01FE6EC7120F26 -07FF80013E4A7EB500FC031FB512F8043C5E4A131C573E7DBD53>77 -D<90263FFFE0023FB5FC6F16FEA29026003FF8020313C0021F030013004A6C157C023B16 -3C6F15381439810238167802787FDA707F157082153F82031F15F002F07FDAE00F5D8215 -078203031401010180DAC0015D82811780047F1303010315C04A013F5C17E0161F17F004 -0F1307010715F891C7000791C7FC17FC160317FE04015B4915FF010E6E130E188E177F18 -CEEF3FDE011E16FE011C6F5AA2170FA21707133C01386F5A133C017C150113FE2607FF80 -1400B512FC18705C483E7DBD44>I<013FB612FEEFFFE018F8903B007FF0000FFC6E48EB -01FF7113804BEC7FC0183F19E0F01FF0A2147F5D19F8A402FFED3FF092C8FCA219E0A2F0 -7FC05B4AEDFF8019004D5A4D5AEF0FF80103ED3FE04A903801FF8091B648C7FC17F002FC -CAFCA213075CA5130F5CA5131F5CA5133F5CA3137F497EB612E0A25D3D3E7DBD3E>80 -D<9239FF8003800207EBF007021F9038FC0F0091387F00FE02FCEB1F1FD903F0EB07BF49 -486DB4FC49487F4A6D5A49C8FC49157E133E137E173E49153CA57F1738A26D92C7FC8080 -80EB7FFEECFFE06D13FEEDFFC06D14F06D14FC010380010080143F020380DA003F7F1503 -1500707E163F161FA2160F121CA31607160F003C5EA35F003E151F94C7FC007E5D007F15 -3E6D5C16FC01E0495AD87DF0495AD8FCFCEB0FC03AF87F803F8027F01FFFFEC8FCD8E007 -13F839C0007FC031427BBF33>83 D<B600E090B512FC4B15F8A2000101C0C7000F13006C -49EC03FCEF01F091C9FC60A317015A495EA417031203495EA4170712074993C7FCA45F12 -0F49150EA4171E121F49151CA4173C123F491538A31778177017F05F001F15015F16036D -4A5A000F93C8FC5E6C6C141E6C6C5C000115F86C6C495A017FEB07C090393FC03F809026 -0FFFFEC9FC010313F89038007FC03E4073BD44>85 D<EC7FC0903803FFF890380FC07E90 -383E003F496D7E01FF6D7E82A248140782A26C5A137890C7120FA25EA2EC03FF147F9038 -07FF1FEB1FE0D97F805B3801FE00EA03F8485A4848133F485A003F5D49EC81C048C7FCA2 -157F48ED03804814FFA2007F5B913903BF0700903880073F3A3FC00E1F8E260FE03C13FC -3A03FFF00FF83A007FC003E02A2A7CA82D>97 D<EB3F80EA1FFFA3C6FC137FA291C9FCA5 -5B5BA512015BA4EC07F80003EB3FFF9039F8F80FC09039FBE003E09039FF8001F891C77E -5B4848147E49147F5B821780A2120F5B17C0A3167F001F16805BA4EEFF00123F5B4B5AA2 -4B5A5E007F4A5AA24B5A6D495A4BC7FCD87CE0137E39F87001F839F03C07E039E00FFF80 -260003FCC8FC2A4077BE33>I<EC1FF0ECFFFE903903F01F8090390FC003C0D93F0013E0 -017E130F49131F000115F04848EB3FE0485AA24848EB1FC0001FEC0F004990C7FC123FA2 -485AA412FF90C9FCA96CEC0380150716006C6C5B151E001F5C6C6C5B6C6C5B6C6C485A39 -01F80F8026007FFEC7FCEB0FF0242A7AA828>I<EE03F8ED01FFA3ED000F1607A217F0A4 -160FA217E0A4161FA217C0A491380FF03FECFFFC902603F81F138090390FC007BF90391F -8003FF90387E0001497F0001157F48481500485A120F5B001F5D485A5E5B127FA2150112 -FF90C75BA41503A25EA37E1507A26C4A5A7F001F141F6C6C133F6C6CEBFFF83B03F001EF -FFC03900F80F8F90383FFE0FD90FF0EBE0002D407ABE33>I<EC3FE0903801FFF8903807 -E07E90380F801F90393F000F80017E14C049EB07E0485A12034848EB03F0485AA2121F5B -123FA248481307A290B6FCA2D8FF80C8FC90C9FCA87EED01C015036C15806D1307001FEC -0F006D131E000F5C6C6C5B6C6C485A3900FC07C0D93FFFC7FCEB07F8242A7BA828>I<ED -07F0ED3FFCEDFC1E913803F03F4A48B4FC4A481380141FEC3F81DA7F0113008102FE137C -93C7FCA213015CA513035CA50007B512F8A3260007F0C8FCA3130F5CA5131F5CA5133F5C -A5137F91C9FCA55B5BA4EA03FF007F13FEB5FCA229407DBF1C>I<1478EB01FE130314FF -A25B14FE130314FCEB00F01400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0 -A5133F1480A5137F1400A55B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>105 -D<143FEB1FFF5BA213017FA214FEA5130114FCA5130314F8A5130714F0A5130F14E0A513 -1F14C0A5133F1480A5137F1400A55B5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 -D<903907F007F8D803FFEB1FFF9139E0781FC09138E1E00F3B001FE38007E090380FE700 -02EE14F014FC14D814F85CA24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C713 -80A4167F5B491500A300015D486C491380B5D8F87F13FCA32E287DA733>110 -D<EC0FF0ECFFFE903903F01F8090390FC007C049C66C7E013E6D7E01FC6D7E4848804914 -7C0003157E485A000F157F5B121FA2485AA2007F1680A2170048C85AA54B5AA25E5A6C4A -5A7E4B5A5E6C140F6C6C5C4B5A6C6C013EC7FC6C6C5B6C6C485A3900FC0FE090383FFF80 -D90FF8C8FC292A7BA82D>I<903907F01F80D803FFEB7FE09138E1E1F09138E387F83900 -1FE707EB0FE614EE02FC13F002D813E09138F801804AC7FCA25C131FA25CA4133F5CA513 -7F91C8FCA55B5BA31201487EB512FEA325287EA724>114 D<9138FF81C0010713E39038 -1F807F90397C003F8049131F4848130F5B00031407A248481400A27FA27F6D90C7FCEBFF -8014FC6C13FF6C14C015F06C6C7F011F7F13079038007FFE1403140100381300157EA212 -3C153E157E007C147CA2007E147815F8007F495A4A5A486C485A26F9E01FC7FC38E0FFFC -38C01FE0222A7DA824>I<EB0380A4130791C7FCA25BA25BA2133EA2137E13FE12011207 -001FB512C0B6FCA2D801FCC7FCA312035BA512075BA5120F5BA41407001F130E13C0A414 -1E141C1380A26D5AA2000F5B14F03807E1E03801FF80D8007EC7FC1A3978B723>I<B539 -E007FFF05D17E02707FE000313006C48EB01FC6F5A5E00014A5A5EA24B5A6D1307000092 -C7FC5D150E6D5B7F5DA25D1480013F5B14815D14C3011F5B02C7C8FCA214CE14EEEB0FFC -A25CA26D5A5CA25CA26D5A2C2878A630>118 D<B500C3B53803FFFCA204FE14F8290FFE -003FE00013C0D807F86D48EB7F000003173E183C150F18386D5E0001141F705B153F4D5A -15776D4B5A0000ECE7F04DC7FCEC01C3170E9038FF0383017F5D91380703F85FEC0E0102 -1E5CD93F9C14F002BC6D5A02B813FDDAF8005B4A13FF5F6D5A94C8FC5C4A137E167C6DC7 -FC1678010E14383E2878A642>I<90B539E007FFF05E18E0902707FE000313006D48EB01 -FC705A5F01014A5A5F16036E5C0100140794C7FC160E805E805E1678ED8070023F13F05E -ED81C015C191381FC38015C793C8FC15EF15EEEC0FFCA25DA26E5AA25DA26E5A5DA24AC9 -FC5C140E141E141C5C121C003F5B5A485B495A130300FE5B4848CAFCEA701EEA783CEA3F -F0EA0FC0343A80A630>121 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fi cmbx12 17.28 43 -/Fi 43 122 df<EA01FCEA07FF4813804813C04813E04813F0A2B512F8A76C13F0A26C13 -E06C13C06C13806C1300EA01FC151574942D>46 D<16F04B7E1507151F153FEC01FF1407 -147F010FB5FCB7FCA41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>49 -D<913801FFF8021FEBFFC091B612F8010315FF010F16C0013F8290267FFC0114F89027FF -E0003F7F4890C7000F7F48486E7FD807F86E148048486E14C048486E14E048486F13F001 -FC17F8486C816D17FC6E80B56C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5D -EA01F0CA14FEA34D13FCA219F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B -604C13804C90C7FC4C5A4C5A4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F -4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD9 -0FC0150749B8FC5B5B90B9FC5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5 -FC020F14F8023F14FF49B712C04916F0010FD9C01F13FC90271FFC00077FD93FE001017F -49486D8049C86C7F484883486C6F7F14C0486D826E806E82487FA4805CA36C5E4A5E6C5B -6C5B6C495E011FC85A90C95CA294B55A614C91C7FC604C5B4C5B4C5B4C5B047F13809226 -0FFFFEC8FC020FB512F817E094C9FC17F817FF91C7003F13E0040713F8040113FE707F71 -7F7113E085717FA2717F85A285831A80A31AC0EA03FCEA0FFF487F487F487FA2B57EA31A -80A34D14005C7E4A5E5F6C495E49C8485BD81FF85F000F5ED807FE92B55A6C6C6C491480 -6C01F0010791C7FC6C9026FF803F5B6D90B65A011F16F0010716C001014BC8FCD9001F14 -F0020149C9FC426079DD51>I<F01F804E7E187F18FFA25F5F5F5FA25F5F5FA294B5FC5E -5E5EA25E5EEE3FBFEE7F3FA216FEED01FCED03F8ED07F0A2ED0FE0ED1FC0ED3F8016005D -15FE4A5A4A5AA24A5A4A5A4A5A4A5AA24AC7FC14FE495A5C1303495A495A495A5C133F49 -C8FC13FE485AA2485A485A485A5B121F485A48C9FC12FEBCFCA6CA6CEBC000B1037FB8FC -A6485E7CDD51>I<01C0EE01C0D801F8160F01FF167F02F0EC07FFDAFF8090B5FC92B712 -8019006060606060606095C7FC17FC5F17E0178004FCC8FC16E09026FC3FFCC9FC91CBFC -ADED3FFE0203B512F0020F14FE023F6E7E91B712E001FDD9E00F7F9027FFFE00037F02F8 -01007F02E06EB4FC02806E138091C8FC496F13C04917E07113F0EA00F090C914F8A219FC -83A219FEA419FFA3EA03F0EA0FFC487E487E487FA2B57EA319FEA35C4D13FC6C90C8FC5B -4917F8EA3FF001804B13F06D17E0001F5E6C6C17C06D4B1380D807FC92B512006C6C4A5B -6C6C6C01075B6C01E0011F5BD97FFE90B55A6DB712C0010F93C7FC6D15FC010115F0D900 -3F1480020301F0C8FC406078DD51>I<EE1FFF0303B512E0031F14F892B612FE0203814A -D9FC037F021F9039C0007FC04A90C7EA1FE0DAFFFC6E7E494914074949EC7FF8494914FF -49495B4949497F4990C7FC495D5C13FF485BA25A4A6E5B5A715B48496E5B725A4894C8FC -A35AA35C48913801FFE0030F13FE033F6D7E4B14E092B612F89126E1FE037FB53AE3F000 -7FFEDAE7E06D7EDAEFC06D7F4B6D7F02FFC76C7F4A82717F4A82A2854A8085A24A1780A5 -4A17C0A37EA77EA47E6E1780A27EA21A007E4D5B7E6E5E7E6E5E6C4C5B6D7E013F4B5B6D -6C4A5B6D01C0495B6D6D90B5C7FC6DD9FC0713FC6D90B65A6D5E023F15C0020F92C8FC02 -0114F8DA001F1380426079DD51>I<EA07E0120F7F13FCEBFFFC91B912F8A45AA21AF01A -E01AC01A801A00A248606161616101E0C9123F01804C5A48CA485A4D90C7FC60007E4C5A -17074D5A4D5A4D5A485F4D5A17FF4C90C8FCC9485A5F4C5A160F4C5A5F163F4C5A16FF5F -5D94C9FC5D5D5E150FA24B5AA2153FA24B5AA215FFA34A5BA25CA35CA44A5BA45CA65CAD -6E5BA26E5BDA03FECAFC6E5A456377E051>I<92383FFF800203B512FC021FECFF80027F -15E049B712F849D9F0077F010F90C76C7ED91FFCEC1FFFD93FF06E7F494802037F494882 -717F484980854890C9127FA24884183FA25A80A380806E157F6E5E14FE6E7E6F4A5A6C14 -F003FC495B03FF495B6C1580DCE0075B6CDBF80F90C7FC9338FE1FFE6C9238FF7FF84D5A -6D16C06D5E6D4BC8FC6D6F7E6D16E00101826D16FC023F814A8149B87E01078349839026 -3FFE3F8190267FFC0F819026FFF003814849C6FC48496D804849131F4890C70007801601 -48486E1580003F163F49150F007F7014C0491501717E8400FF835B8484A384A21A80A27F -007F1900607F003F606D160F001F606D4C5A6C6D153F6C6D4B5A6C01F04B5A6C01FC0203 -5B6C01FF021F5B6D9027F001FFFEC7FC6D90B65A010F16F001035E010093C8FC020F14F8 -DA007F90C9FC426079DD51>I<BB12F0F2FF801BF81BFEF3FFC088D800010280C7000114 -F8DF003F7F080F13FF74807480867480757FA2757FA28987A289A965A26365A2515BA298 -B55A505C505C5091C7FC505B505B087F13F00703B512C096B6C8FC93B812F81BC01BF8F3 -FF801CE00480C8001F13F8080713FE08016D7E7480757F757F757F89757F89871E80871E -C0A41EE087A663A21EC0A3631E80A2511400A2515B515B6398B55A505C08075C081F5C97 -B6C7FCBD5A1CF81CE099C8FC1BF898C9FC63627AE173>66 D<4DB5ED03C0057F02F01407 -0407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF -92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC1607 -4A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC484A -84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380 -A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F -4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC -020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380 -030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375 ->I<BB12E0F2FF801BF01BFE757E1CF0D800010280C7000780DF007F13FE080F6D7E0801 -807480093F7F090F13FC757F757F877580767F8A88767F8A888AA2767FA28A881F80A376 -14C0A41FE0A5881FF0B05214E0A51FC0A4521480A31F006466A2525BA2525BA2525B6664 -99B55A515C5191C7FC515B515B515B097F5B50B512C008075C083F91C8FC0707B512FCBD -12F01CC051C9FC1BF81B8008E0CAFC6C627AE17C>I<BD12FCA488A2D8000102C0C71201 -F1000F1A01F2007F1B3F1B0F1B07757EA28787A288A3F43F80A31C1FA3197EA3F40FC0A4 -99C7FC19FEA31801A218031807181F18FF93B6FCA6EEC000181F180718031801A21800A2 -1D7E197EA21DFCA696C812011DF8A31C03A3F407F0A31C0FA21C1F1C3F1DE01C7F1CFF63 -631B0F093F13C098B5FC1A0797B6FCBEFCA31D80A35F617AE06A>I<BD12E0A41CF0A2D8 -000102C0C71207F1003F1A0F1A031A001B7F1B3FF31FF81B0FA21B07A21B03A21B011CFC -A31B00A419FCA21C7EA41C00A21801A31803A21807180F183FEF01FF93B6FCA6EEC001EF -003F180F18071803A21801A31800A896C9FCB3A5B912F8A657617AE065>I<B912E0A6C7 -02E0C7FCB3B3B3B3AEB912E0A633627CE13C>73 D<B912F8A6D8000102C0CBFCB3B3B1F3 -07E0A5F30FC0A61B1FA31B3F1C80A21B7FA21BFFA262A262625013006262624FB5FC1907 -191F4EB6FCBDFC63A553627AE161>76 D<94381FFFE00407B67E043F15F04BB712FE030F -EEFFC0033FD9FC0014F092B500C0010F13FC020349C7000113FF4A01F86E6C7F021F496F -13E04A01C0030F7F4A496F7F91B5C96C7F0103497013FF494970804B834949717F498749 -49717F49874B8390B586484A717FA24891CB6C7FA2481D804A84481DC0A348497214E0A3 -481DF0A34A85481DF8A5B51CFCB06C1DF8A36E96B5FCA36C1DF0A46C6D4E14E0A36C1DC0 -6E606C1D80A26C6E4D1400A26C6E4D5BA26C6E4D5BA26D6D4D5B6D636D6D4D5B6F94B5FC -6D636D6D4C5C6D6D4C91C7FC6D6E4B5B6D02E0031F5B023F6D4B13F06E01FC92B55A6E01 -FF02035C020302C0010F91C8FC020002FC90B512FC033F90B712F0030F17C0030394C9FC -DB007F15F804071580DC001F01E0CAFC666677E379>79 D<BB7E1AFCF2FFC01BF81BFE75 -7ED800010280C7001F80070114F0736C7F081F7F747F747F7414807414C0A27414E0A21D -F0A27513F8A41DFCA91DF8A498B512F0A21DE0A25014C01D8062501400505B505B087F5B -4FB512E0071F5C93B9C7FC1BFC1BF01B8008F0C8FC04C0CCFCB3B3A2B97EA65E627AE16E ->I<DBFFFCEC01E0020FD9FFE01303027F02FC130749B7130F0107EEC01F011F16F049D9 -C007EBF83F4948C7383FFE7FD9FFF8020FB5FC4801E014014849804849153F91C97E4848 -82001F834982003F83845B007F187FA2193FA200FF181FA27F190FA27FA26D1707808080 -6C01F893C7FC80ECFF8015F86CECFFC016FC6CEDFFE017FE6CEEFFE018F86C17FE6C717E -6C846C846D17F86D836D836D8313036D18806D6C17C0020F17E01401DA000F16F0150004 -0715F8EE007F1703050014FC183F84060713FE84A2007C8300FC83A2197FA3193F7EA31A -FC7EA27F1AF86D177F7F1AF06D17FF6D18E06D5E01FF18C06E4B138002E04B130002F84B -5A02FFED3FFC01CF01E0ECFFF8018301FF010F5B010191B65A6D6C5E48011F93C7FC4801 -0315FC48D9003F14E048020149C8FC476677E35A>83 D<001FBEFCA64849C79126E0000F -148002E0180091C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181F -A4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>I<B96C -023FB612FEA6D8000102C0CA0007EBF000E2007FC7FCB3B3B3AA656D63A2821C01806570 -170380525A6E7F6E4F5A70171F6E626E6D4D5A6E6D177F525A6E6E030390C8FC033F01E0 -4B5A6F6DED1FFC6F01FCED7FF80303D9FF80903803FFE06F02F8017F5B6F6C90B7C9FC04 -1F5E040716F8040016C0050F4ACAFCDD003F13C06F647AE17C>I<913803FFFE027FEBFF -F00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077FD9FFF801017F486D6D7F -717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090C9FCA74BB6FC157F0207 -B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891C7FC485B4813F85A5C48 -5B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903F1EBFF806C01FED90FE1 -14FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC130F010302F001011400D9 -001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF8004 -7F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02 -007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA4 -4F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C49 -5B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C700 -1F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E -01039039FE001FFF4901F8010113804901E0010713C04901804913E0017F90C7FC49484A -13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE -7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC -1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D -020F1580020102FCC7FCDA000F13C03E437BC148>I<F17FF8050FB5FCA6EF000F8484B3 -A892380FFF804AB512F8020F14FE023FECFF8391B712E301039138807FF3499039F8000F -FB011F01E00103B5FC494913004990C87E49488148498148834A815A485BA2485BA25AA3 -485BA4B5FCAE7EA46C7FA37EA26C7FA26C5F806C5F6C6D5D6C6D5D017F93B5FC6D6C6C01 -03806D6D49806D01F0D91FF7EBFFFE6D9039FE01FFE7010190B612876D6CECFE07021F14 -F8020314E09127003FFE00ECC0004F657BE35A>I<92380FFFC04AB512FC020FECFF8002 -3F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F -49486E7F48498048844A804884485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA4 -1A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17 -016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D -6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A>I<EE3FFC0307B51280 -033F14C04AB612F0020715F84A9038F03FFC4AEB807F913A7FFE00FFFE4A5A4B4813FF49 -13F05B4913E0A24913C0A27013FE4949EB7FFCEF3FF8EF1FF0EF07C094C7FCB0B812C0A6 -D8001F01C0C8FCB3B3B0007FB612FCA638657CE431>I<F107F8DB7FFEEC3FFE020FB5D8 -F001B5FC027FDAFE03148049B7128F49DCDFFD13C0010FD9F00FEBFFC149D98001140149 -90C7EBFC0349486E6C7E4948EC3FFF48496E018113800780130048F0C03E97C7FC48496E -7FA34884A96C60A36C6D4A5BA26C60A26C6D4A90C8FC6D6C4A5A6D6C4A5A6D6D485BDBF0 -0F5B4990B612C060D97C7F4AC9FCD9FC0F14F09126007FFECAFC92CCFC1201A47FA27F80 -14F091B77E18FE6CEFFFC019F06D17FC19FF6D846D846D846D84013F8490BAFC00038548 -01E0C712014890C9000F7F484816014848EE007F4848717E8512FF5B85A56D5F007F616D -173F003F616D177F6C6C4D5A6C01C003035B6C6D4B5B6C01F8031F5BC601FF92B5C7FC6D -01F8011F5B011F90B712F8010717E0010094C8FC020F15F0DA003F01FCC9FC4A607CC151 ->I<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267F -E07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC -825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>I<EB0FE0EB3FF8497E48B5FC -A24880A24880A76C5CA26C91C7FCA238007FFC6D5AEB0FE090C9FCAF903807FF80007FB5 -FCA6C6FC7F7FB3B3AEB712C0A622657BE42C>I<903807FF80B6FCA6C6FC7F7FB3B3B3B3 -ADB712E0A623647BE32C>108 D<902607FF80D91FFFEEFFF8B691B500F00207EBFF8004 -0702FC023F14E0041F02FF91B612F84C6F488193267FE07F6D4801037F922781FE001F90 -27E00FF0007FC6DA83F86D9026F01FC06D7F6DD987F06D4A487F6DD98FC0DBF87EC7804C -6D027C80039FC76E488203BEEEFDF003BC6E4A8003FC04FF834B5FA24B5FA24B94C8FCA4 -4B5EB3B2B7D8F007B7D8803FB612FCA67E417BC087>I<902607FF80EB1FFFB691B512F0 -040714FC041F14FF4C8193267FE07F7F922781FE001F7FC6DA83F86D7F6DD987F07F6DD9 -8FC0814C7F039FC78015BE03BC8003FC825DA25DA25DA45DB3B2B7D8F007B71280A65141 -7BC05A>I<923807FFE092B6FC020715E0021F15F8027F15FE494848C66C6C7E010701F0 -010F13E04901C001037F49496D7F4990C87F49486F7E49486F7E48496F13804819C04A81 -4819E048496F13F0A24819F8A348496F13FCA34819FEA4B518FFAD6C19FEA46C6D4B13FC -A36C19F8A26C6D4B13F0A26C19E06C6D4B13C0A26C6D4B13806C6D4B13006D6C4B5A6D6D -495B6D6D495B010701F0010F13E06D01FE017F5B010090B7C7FC023F15FC020715E00200 -92C8FC030713E048437CC151>I<902607FF80EBFFF8B6010FEBFF80047F14F00381B612 -FC038715FF038F010114C09227BFF0003F7FC6DAFFC0010F7F6D91C76C7F6D496E7F03F8 -6E7F4B6E7F4B17804B6F13C0A27313E0A27313F0A21BF885A21BFCA3851BFEAE4F13FCA4 -1BF861A21BF0611BE0611BC06F92B512801B006F5C6F4A5B6F4A5B03FF4A5B70495B04E0 -017F13C09226CFFC03B55A03C7B648C7FC03C115F803C015E0041F91C8FC040313E093CB -FCB3A3B712F0A64F5D7BC05A>I<D90FFFEB0FFCB690383FFF8093B512E04B14F04B14F8 -923907FC7FFC92390FE0FFFEC6EC1F806DD93F0113FF6D133E157E157C15F8A215F07013 -FEA24BEB7FFCEF3FF8EF0FE04B90C7FCA55DB3B0B712F8A638417BC042>114 -D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F -D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 -E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 -1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 -1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC -EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>I<EC07 -E0A6140FA5141FA3143FA2147FA214FF5BA25B5B5B5B137F48B5FC000F91B512FEB8FCA5 -D8001F01E0C8FCB3AFEF0FC0AC171F6D6D1480A2173F6D16006F5B6D6D137E6D6D5B6DEB -FF836EEBFFF86E5C020F14C002035C9126003FFCC7FC325C7DDA3F>I<902607FFC0ED3F -FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 -48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 -F0C7FC51427BC05A>I<B700C00103B512FCA6C66C01C0C8381FFE006D6DED07F0A26D6D -5E190F6D6D5E191F6D606F153F6D95C7FC6F5DA26D6D157E19FE6D6E5C18016E5E701303 -6E5E701307A26E6D5C180F6E6D5C181F6E6D5C183F6E93C8FC705BA26E6D13FEA26E6E5A -17816FEBC1F817C36F5C17E76F5C17FFA26F5CA26F5CA26F91C9FCA26F5BA36F5BA2705A -A2705AA2705AA2705A4E417DBF55>I<B70081B600FC0103B512FCA6C66C0180C701FCC8 -381FFE006F6FED03F86D047F5F856F6E16076D646F70140F6D705F866F6E161F6D646F4A -6D143F6D99C7FC4E7F6F616D1B7E6F4A6D14FE6D6395B57E7001FC15016E62DCC0016E13 -036EDBF87F5D05038004E0496C14076E62DCF007ED800F6E4B6C5D050F15C004F8496C14 -1F6E62DCFC1FEDE03F6E4B6C92C8FC053F15F004FE496C5C6E197E7048EDF8FE6E027E6D -5C05FE15FC4D6D13FD6F601BFF6F496E5BA24D806F60A26F496E5BA24D806F60A26F496E -90C9FCA294C87E6F5FA26F486F5A047C6F5A6E417DBF75>I<007FB600C0017FB512F8A6 -D8001F01F8C70007EBF0006D040190C7FC6D6D5D6D6D4A5A6D6D4A5A70495A6D4C5A6E7F -6E6D495A6E6D495A7049C8FC6E4A5A6E6D485A6E6D485A6E13FFEF8FF06EEC9FE06FEBFF -C06F5C6F91C9FC5F6F5B816F7F6F7F8481707F8493B57E4B805D4B80DB0FF37FDB1FE17F -04C080153F4B486C7F4B486C7F4A486D7F4A486D7F4A5A4B6D7F020F6E7F4A486D7F4A48 -6D804A5A4AC86C7F49486F7F4A6F7F0107707FEB3FFFB600F049B7FCA650407EBF55>I< -B700C00103B512FCA6D8003F01C0C8381FFE006FED07F0A26D6D5E190F6D6D5E191F6D6D -5E193F6D95C7FC6F5D6D177E6F15FEA26D6E495AA26E6D5C18036E6D5C18076E5E70130F -6E5E70131FA26E6D495AA26E6D91C8FC606E6D137E18FE6E5D17816F5C17C3A26FEBE7F0 -A26FEBF7E017FF6F5CA26F5CA26F91C9FCA36F5BA26F5BA2705AA2705AA2705AA35FA25F -163F94CAFC5E167E16FED807E05CD81FF81301487E486C495AA2B5495AA24B5A5E151F4B -5A6C4849CBFC15FEEBFC01393FF807FC391FF03FF06CB55A6C5C6C91CCFCC613FCEB1FE0 -4E5D7DBF55>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fj cmtt10 10.95 76 -/Fj 76 126 df<00101304007C131F00FEEB3F80A26C137FA248133FB2007E1400007C7F -003C131E00101304191C75B830>34 D<D803C0EB01E0D80FF01303486C497E487E150F48 -7ED87E7E495AEAFE7F5E486C133FA25E157FA24BC7FC6C5A5D387E7E01EA7FFED83FFC5B -1403EA1FF86C48485AEA03C0C75B140FA25D141FA24A5AA25D147FA292C8FC5CA2495AA2 -5C1303A25C1307A290390FF001E0ED07F84A487E011F497EA24A487E133F163F90267F80 -7F1380ED7E1F14005BA25B1201A24848EB7F3F033F13004914FF12076F5A5B6F5A6C486D -5A0001EC01E029477DBE30>37 D<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0 -EB7F80EBFF00485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127F -A47F123FA27F121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB -07FCEB03FEEB01FF7F147F141E184771BE30>40 D<127812FE7E7F6C7E6C7EEA0FF06C7E -6C7E6C7E6C7EEB7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300 -A4147FAD14FEA4130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF -00485A485A485A485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA6 -0038EC0380007EEC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB6128000 -0FECFE00000314F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FEC -FF80267FFBFB13C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC03800000 -91C7FCA66D5A6D5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76C -C8FCAF143EA229297DAF30>I<EA03E0EA0FF0EA1FF813FCEA3FFEA213FFA27EA27E1203 -EA007FA2137E13FEEA01FC1203EA07F8EA3FF0127FEAFFE0EA7F801300123C1019708B30 ->I<007FB612F0A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA -7FE0A2EA3FC0EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED -3FC0A2ED7F80A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FC -A2495AA25C1303A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485A -A2485AA2485AA2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0 -497F013F13F8497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F -001F15F0491307A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D -1303003F15F8A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13 -FF2601FF8313006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>I<EB03C0 -497EA2130FA2131FA2133F137F13FF1203123FB5FCA213EF138FEA7E0F1200B3B0003FB5 -12F84814FCB612FEA26C14FC6C14F81F3977B830>I<EB07FC90383FFFC090B512F00003 -804814FE4880261FF80F1380263FE00113C09038C0007F4848EB3FE090C7121FED0FF048 -14075A6C15F81503A3127E1218C8FCA2150716F0150F16E0151F16C0153FED7F8015FF4A -13005DEC07FC4A5A4A5A4A5A4A5A4A5A4990C7FC495A495AEB0FF0EB3FE0495A495A4890 -C8FC4848EB01F04848EB03F8485AEA1FE048B6FCB7FCA37E6C15F025397BB830>I<EB03 -FF013F13E090B512F84814FE4880481580260FFE0113C09038F0007F4848EB1FE0150F16 -F01507A26C5A6C5AC8FC150F16E0A2151FED3FC0157FEDFF8002071300903807FFFE495B -5D8115FF6D1480D9000113C09138003FE0ED1FF0ED07F8150316FC150116FE1500A21218 -127EB4FCA2150116FC4814036C15F86C6C13076DEB1FF0D83FF0133F3A1FFE01FFE06CB6 -12C06C15806CECFE00C65C013F13F001031380273A7CB830>I<EC03FC4A7E140F141FA2 -143F147F157E14FEA2EB01FCEB03F8A2EB07F0A2EB0FE0EB1FC0A2EB3F80A2EB7F0013FE -A2485A485AA2485AA2485A485AA2485AA248C7FC12FEB8FC1780A46C1600C8007EC7FCAA -91387FFFFE91B6FCA46E5B29397DB830>I<000FB612804815C05AA316800180C8FCAEEB -83FF019F13C090B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC712 -0F000E15F0C81207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB -3FC06D137F3A3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC -25397BB730>I<EC0FF8EC7FFF49B51280010714E0131F4914F090387FF80F9039FFC007 -F84813803803FE005B485A4848EB03F0ED01E0484890C7FC5B123F5BA2127FEB000C9038 -03FFE0010F13F8D8FF3F13FE48B6FCB7128016C09039FE007FE001F8EB1FF001E0130F49 -EB07F849EB03FCA290C7120116FE1500A37EA46C7E15016D14FC121F6D1303000FEC07F8 -6D130F6C6CEB1FF06DEB3FE03A03FF81FFC06C90B512806C15006D5B011F13F8010713E0 -01011380273A7CB830>I<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0 -C8EA7F80EDFF00A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213 -035CA213075CA4495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13 -FC90B57E0003ECFF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB -03FC90C71201A56D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF -83FF806C90B512006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0 -D81FE0EB0FF04848EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D -1303003F15F86D1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE00 -6D5B011F13F0010190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E48804880 -48010113803A0FFC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A -4815FC1501A416FEA37E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C -14FE6C14F9013FEBE1FC010F138190380060011400ED03F8A2150716F0150F000F15E048 -6C131F486CEB3FC0157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649 -C7FCEB3FF0273A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7 -FCAF120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>I<EA03C0EA -0FF0EA1FF8A2EA3FFCA4EA1FF8A2EA0FF0EA03C0C7FCAFEA03C0EA0FF0121F13F8123F13 -FCA3121FA2120F12031200120113F8120313F01207EA1FE0123FEA7FC0EAFF80EA7F0012 -7E12380E3470A630>I<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383F -FE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7F -FC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F01 -0113F06D7FEC3FFE91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F -7BB230>I<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1F -FF6D7F010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153F -EDFFF05C020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC -48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>62 -D<EC1FE0ECFFF8010313FE010F7F4914804914C090397FF03FE09038FF800F4890380007 -F0D803FC13033A07F801FBF89038F007FF380FE01F4A13FCEA1FC0495A003FEBFF0F9038 -00FE07903901FC03FE007FEBF801EA7E03ECF000A2EAFE0700FC49137EAA00FE6D13FED8 -7E0314FCA2ECF801D87F0114F8003FEBFC03903900FE07F0903880FF0F001F90387FFFE0 -6D6C13C0EA0FE06E13803A07F007FE009038F801F86C6CC7127C6CB414FE6CEB80039038 -7FF01F6DB512FC6D14F86D14E0010314C00100EBFE00EC1FF0273A7CB830>64 -D<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7FA490383F80FE -A590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130FA40007814913 -07A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>I<007FB512F0B612FE6F7E -82826C813A03F8001FF815076F7E1501A26F7EA615015EA24B5A1507ED1FF0ED7FE090B6 -5A5E4BC7FC6F7E16E0829039F8000FF8ED03FC6F7E1500167FA3EE3F80A6167F1700A25E -4B5A1503ED1FFC007FB6FCB75A5E16C05E6C02FCC7FC29387EB730>I<91387F803C9039 -03FFF03E49EBFC7E011F13FE49EBFFFE5B9038FFE07F48EB801F3903FE000F484813075B -48481303A2484813015B123F491300A2127F90C8FC167C16005A5AAC7E7EA2167C6D14FE -123FA27F121F6D13016C6C14FCA26C6CEB03F86D13076C6CEB0FF03901FF801F6C9038E0 -7FE06DB512C06D14806D1400010713FC6D13F09038007FC0273A7CB830>I<003FB512E0 -4814FCB67E6F7E6C816C813A03F8007FF0ED1FF8150F6F7E6F7E15016F7EA2EE7F80A216 -3F17C0161FA4EE0FE0AC161F17C0A3163F1780A2167F17005E4B5A15034B5A150F4B5AED -7FF0003FB65A485DB75A93C7FC6C14FC6C14E02B387FB730>I<007FB7FCB81280A47ED8 -03F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800A4157C92C8FCA5EE07C0EE -0FE0A9007FB7FCB8FCA46C16C02B387EB730>I<003FB712804816C0B8FCA27E7ED801FC -C7121FA8EE0F8093C7FCA5153E157FA490B6FCA69038FC007FA4153E92C8FCAE383FFFF8 -487FB5FCA27E6C5B2A387EB730>I<02FF13F00103EBC0F8010F13F1013F13FD4913FF90 -B6FC4813C1EC007F4848133F4848131F49130F485A491307121F5B123F491303A2127F90 -C7FC6F5A92C8FC5A5AA892B5FC4A14805CA26C7F6C6D1400ED03F8A27F003F1407A27F12 -1F6D130F120F7F6C6C131FA2D803FE133F6C6C137FECC1FF6C90B5FC7F6D13FB010F13F3 -0103EBC1F0010090C8FC293A7DB830>I<3B3FFF800FFFE0486D4813F0B56C4813F8A26C -496C13F06C496C13E0D803F8C7EAFE00B290B6FCA601F8C7FCB3A23B3FFF800FFFE0486D -4813F0B56C4813F8A26C496C13F06C496C13E02D387FB730>I<007FB6FCB71280A46C15 -00260007F0C7FCB3B3A8007FB6FCB71280A46C1500213879B730>I<D83FFF90380FFF80 -486D4813C0B56C5AA26C497E6C496C1380D803F0903803F8004B5A4B5A151F4B5A5E4BC7 -FC15FE14014A5A5D4A5A4A5A141F5D4A5A4AC8FC5C13F18101F37F13F790B57E14EFECC7 -F01483EC03F8140101FE7F496C7E5B157F497F82151F82150F826F7EA26F7E1501821500 -D83FFF903803FFC0486D4813E0B56C5AA26C497E6C496C13C02B387FB730>75 -D<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80EE1FC0A9003FB7FC5AB8FCA2 -7E6C16802A387EB730>I<D83FF8ECFFE0486C4913F0486C4913F8A2007F16F06C6C4913 -E00007160001EF14BFEC800FA39039E7C01F3FA4ECE03F01E3133EA2ECF07EA201E1137C -A2ECF8FCA201E013F8A214FDEC7DF0A3147FEC3FE0A3EC1FC0A2EC070091C7FCADD83FFC -903801FFE0486C4913F0B54913F8A26C486D13F06C486D13E02D387FB730>I<D83FFC90 -381FFF80486C4913C0B54913E0A26C6D6C13C06C6E13800003913801F800EBF7C0A3EBF3 -E0A314F013F1A214F8A213F014FCA2147C147EA2143E143FA2141FA21581A2140F15C1A2 -140715E1A2140315F1A21401A215F91400A3157DA3153FEA3FFF481380B5EAC01FA26CEB -800F6C496C5A2B387EB730>I<90383FFFE048B512FC000714FF4815804815C04815E0EB -F80001E0133FD87F80EB0FF0A290C71207A44815F8481403B3A96C1407A26C15F0A36D13 -0FA26D131F6C6CEB3FE001F813FF90B6FC6C15C06C15806C1500000114FCD8003F13E025 -3A7BB830>I<007FB512F0B612FE6F7E16E0826C813903F8003FED0FFCED03FE15016F7E -A2821780163FA6167F17005EA24B5A1503ED0FFCED3FF890B6FC5E5E16804BC7FC15F001 -F8C9FCB0387FFFC0B57EA46C5B29387EB730>I<003FB57E4814F0B612FC15FF6C816C81 -2603F8017F9138003FF0151F6F7E15071503821501A515035E1507150F4B5A153F4AB45A -90B65A5E93C7FC5D8182D9F8007FED3FE0151F150F821507A817F8EEF1FCA53A3FFF8003 -FB4801C0EBFFF8B56C7E17F06C496C13E06C49EB7FC0C9EA1F002E397FB730>82 -D<90390FF803C0D97FFF13E048B512C74814F74814FF5A381FF80F383FE001497E484813 -7F90C7123F5A48141FA2150FA37EED07C06C91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C -14E0000114F86C80011F13FF01031480D9003F13C014019138007FE0151FED0FF0A2ED07 -F8A2007C140312FEA56C140716F07F6DEB0FE06D131F01F8EB3FC001FF13FF91B5128016 -0000FD5CD8FC7F13F8D8F81F5BD878011380253A7BB830>I<003FB712C04816E0B8FCA4 -3AFE003F800FA8007CED07C0C791C7FCB3B1011FB5FC4980A46D91C7FC2B387EB730>I< -3B7FFFC007FFFCB56C4813FEA46C496C13FCD803F8C7EA3F80B3B16D147F00011600A36C -6C14FE6D13016D5CEC800390393FE00FF890391FF83FF06DB55A6D5C6D5C6D91C7FC9038 -007FFCEC1FF02F3980B730>I<D87FFE90380FFFC0B54913E06E5AA24A7E6C486D13C0D8 -07F0903801FC00A26D130300035DA46C6C495AA46C6C495AA46D131F6D5CA3EC803F013F -5CA46D6C48C7FCA490380FE0FEA401075B14F1A301035BA314FB01015BA314FFA26D5BA4 -6E5A6E5A2B397EB730>I<D83FFC903801FFE0486C4913F000FF16F8A2007F16F06C486D -13E0D81FC09038001FC0000F1680A76D143F00071600A7000390380F803E9039F01FC07E -EC3FE0A3EC7FF0A2147D0001157CA29039F8FDF8FCA314F8A300005D01F913FCA2ECF07C -A201FD137DA2017D5CECE03DA3017F133FA2ECC01FA2013F5CA2EC800F6D486C5A2D397F -B730>I<3A3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7FC00 -005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA26D90 -C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001143F -49800003141F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387DB730 ->I<D87FFF90381FFFC0B56C4813E0A46C496C13C0D803F8903803F8006D1307A26C6C49 -5AA26C6C5C151F6D5CEC803F013F5CECC07F011F91C7FCA290380FE0FEA214F101075BA2 -903803FBF8A201015B14FF6D5BA26E5AA36E5AB1903803FFF8497F497FA26D5B6D5B2B38 -7EB730>I<007FB612F0A2B712F8A36C15F0A225077B7D30>95 D<EB3FFC48B57E4814E0 -4880488048809038F00FFE9038E001FF806F7E6C48133F6C4880C8121FA491B5FC130F13 -7F48B6FC12075A48EBC01F383FFC00EA7FE0138048C7FC5AA46C143FA26C6C137F9038C0 -01FF263FF80FEBFFC06CB712E0A2000714F76C14C3C6020013C0D93FF090C7FC2B2A7CA8 -30>97 D<EA3FFC487E12FFA2127F123F1200AAEC03FE91381FFF80027F13E091B57E90B6 -12FC82ECFE079138F001FF4A6C13804A137F4AEB3FC091C7121F4915E0160FA217F01607 -A8160FA217E07F161F6EEB3FC0A26EEB7F806E13FFDAF00313009138FC0FFE91B55A5E49 -5CD97E7F13C0D93C1F90C7FC90380003FC2C3980B730>I<ECFFE0010713FC011F7F017F -7F90B612804815C048EB807F3907FC003F485A485A49EB1F804848EB0F004990C7FC127F -90C9FCA25A5AA87E7EA27F003FEC07C06DEB0FE06C7E6D131F6C6C14C0D807FE133F9039 -FFC0FF806C90B5FCC615006D5B011F13F801075B01011380232A7AA830>I<913801FFE0 -4A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF0 -133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E -6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0 -D907FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E48804801811380 -3A07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7 -FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FF -C07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>I<EDFF80 -020713E0021F13F05C4A13F891B5FC491387903803FE079138FC03F0903907F800C04A13 -00A8003FB612C04815E0B7FCA36C15C0260007F0C7FCB3A9003FB512FE4880B71280A26C -15006C5C25397DB830>I<D903FC13FF90261FFF8713C04913DF90B712E05A5A2607FE07 -138F903AF801FE07C048486C6CC7FCA2497F001F8149133FA56D137F000F92C7FC6D5BA2 -6C6C485AEBFE0790B55A5D485C15C001DF5BD9C3FCC8FC01C0C9FCA37F7F6CB512F015FF -6C15C04815F0488148813A3FE0001FFE0180130148C8127F007E8100FE168048151FA56C -153F007FED7F006D5C6C6C495A01F013076CB4EB7FFC6C90B55A6C5D000115C06C6C91C7 -FC011F13FC010113C02B3E7DA730>I<EA3FFC487E12FFA2127F123F1200AAEC01FE9138 -0FFF80023F13E091B57E90B67EA29138FE07FCECF8039138E001FE14C0EC8000A291C7FC -A25BB3A23B3FFFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC6C496C13F82F3880B7 -30>I<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3 -A9003FB612C04815E0B7FCA27E6C15C023397AB830>I<EA7FF8487EA4127F1200AB0203 -B512804A14C017E0A217C06E14809139001FE0004B5A4B5A4BC7FC4A5A4A5AEC0FF84A5A -4A5A4A5A4A5A01FD7F90B57E8114F7ECE3F8ECC1FCEC81FEEC00FF497F496D7E6F7E826F -7E15076F7E6F7E3B7FFFF81FFFE0B56C4813F017F8A217F06C496C13E02D387FB730> -107 D<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB730>I< -02FC137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07 -EB03F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80B54801 -8F13C0A46C486C01071380322881A730>I<EC01FE3A3FFC0FFF80267FFE3F13E000FF90 -B57E90B67E7E6C9038FE07FCC6EBF8039138E001FE14C0EC8000A291C7FCA25BB3A23B3F -FFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC6C496C13F82F2880A730>I<49B4FC -010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0F -F0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D130300 -3F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B512806C1500 -6C6C13FC6D5B010F13E0010190C7FC272A7CA830>I<EC03FE3A3FFC1FFF80267FFE7F13 -E000FF90B57E90B612FC6C816CEBFE07C69038F001FF4A6C13804A137F4AEB3FC091C712 -1F4915E0160FA217F01607A8160FA217E07F161F6EEB3FC0A26EEB7F806E13FFDAF00313 -009138FC0FFE91B55A5E495C6E13C0021F90C7FCEC03FC91C9FCAD383FFFF8487FB57EA2 -6C5B6C5B2C3C80A730>I<49B413F8010FEBC1FC013F13F14913FD48B6FC5A481381390F -FC007F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E15037FA26C6C -1307150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F13F101 -0F13C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>I<ED07F83A3FFF -803FFF486DB51280B512C302CF14C06C13DF6C9038FFFC3FD8001F13E09238801F809238 -000F004A90C7FC5C5C5CA25CA45CAF003FB512FC4880B7FCA26C5C6C5C2A287EA730>I< -90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E007F91 -C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02001380 -007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00 -FC14F0D8F83F13C026780FFEC7FC222A79A830>I<EB0780497E131FA9003FB612E04815 -F0B7FCA36C15E026001FC0C7FCB216F8ED01FCA5ECE003010FEB07F814F09138FC1FF06D -B512E06D14C016806D14009038007FFCEC1FF026337EB130>I<D83FFCEB3FFC486C497E -00FF14FFA2007F147F003F143F00001400B3A41501A2150315076D130F903A7FC07FFFF8 -91B612FC6D15FE7F6D4913FC6D9038F87FF8010001C0C7FC2F2880A630>I<3B3FFFC07F -FF80486DB512C0B515E0A26C16C06C496C13803B01F80003F000A26D130700005DA26D13 -0F017E5CA2017F131F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0FE01075BA214 -F101035BA3903801FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFFC01FFFE0486D -4813F0B515F8A26C16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA56D14FE00015D -EC0F80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A3017E13FBA29039 -3FF07FE0A3ECE03FA2011F5C90390F800F802D277FA630>I<3A3FFF81FFFC4801C37FB5 -80A26C5D6C01815BC648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB0FE3ECE7F06D -B45A6D5B7F6D5B92C8FC147E147F5C497F81903803F7E0EB07E790380FE3F0ECC1F89038 -1F81FC90383F80FE90387F007E017E137F01FE6D7E48486D7E267FFF80B5FCB500C11480 -14E3A214C16C0180140029277DA630>I<3B3FFFC07FFF80486DB512C0B515E0A26C16C0 -6C496C13803B01FC0003F000A2000014076D5C137E150F017F5C7F151FD91F805BA214C0 -010F49C7FCA214E00107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFDF0147D147FA2 -6E5AA36E5AA35DA2143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3F81387EB8FF0 -EBFFE06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE5AA316FC90C7 -EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A5A4A5A4A5A49 -90C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A485A485A485A48B7 -FCB8FCA46C15FE28277DA630>I<ED3FF0913803FFF8140F5C147F16F09138FFF00092C7 -FC495A5CB3A21303495A133F383FFFF0B55A5C91C8FC14C080003F7F38003FF813076D7E -1301B3A2806D7E15F091387FFFF016F8141F8014039138003FF025477BBE30>I<EA7FE0 -EAFFFE6D7E8014F07EC66C7E13076D7E1301B3A2806D7E15E091387FFFE06E13F8801407 -141F5C4A13E09138FFE00092C7FC495A5CB3A21303495A137F387FFFF0B5FC14C05C49C8 -FCEA7FE025477BBE30>125 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fk cmbx12 14.4 49 -/Fk 49 122 df<151E153E157E15FCEC01F8EC07F0EC0FE0EC1FC01580143FEC7F0014FE -1301495A5C1307495AA2495A133F5C137FA2495AA24890C7FCA25A5BA21207A2485AA312 -1F5BA3123FA25BA3127FA55B12FFB3A3127F7FA5123FA37FA2121FA37F120FA36C7EA212 -03A27F7EA26C7FA26D7EA2133F80131F6D7EA26D7E1303806D7E1300147FEC3F80141F15 -C0EC0FE0EC07F0EC01F8EC00FC157E153E151E1F7973D934>40 D<127012F8127C127E7E -EA1FC06C7E6C7E12037F6C7E6C7E7F6D7E133F806D7EA26D7E80130780A26D7EA26D7EA2 -15807FA215C0A2EC7FE0A315F0143FA315F8A2141FA315FCA5140F15FEB3A315FC141FA5 -15F8A3143FA215F0A3147F15E0A3ECFFC0A21580A25B1500A2495AA2495AA25C130F5C49 -5AA2495A5C137F49C7FC5B485A485A5B1207485A485A48C8FC127E127C5A12701F7979D9 -34>I<EA07F0487E487E487E487EB51280A76C13006C5A6C5A6C5A6C5A1111769025>46 -D<913803FFC0023F13FC91B6FC010315C0010F018113F0903A1FFC003FF849486D7E4948 -6D7E49486D7E48496D138048496D13C0A24817E04890C813F0A34817F8A24817FC49157F -A3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D15FFA26C17F8A36C17F0A26C6D -4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495AD91FFCEB3FF8903A0FFF81FFF0 -6D90B55A01011580D9003F01FCC7FC020313C0384F7BCD43>48 D<157815FC1403140714 -1F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43 ->I<EC3FFE0103B512E0010F14FC013F14FF90B712C048D9C07F7F2703FE000F13F8D807 -F801037FD80FE06D7F48486D7F48488001F01680486C6E13C07F486C6E13E07FA27013F0 -A56C5AA26C5AEA0FF0EA03C0C914E05EA218C05E1880A24C13005F4C5A4B5B5F4B5B5F4B -5B4B90C7FC4B5A5E4B5AED7FE04B5A4A5B4A48C8FC4A5A5D4A48EB01F04A5AEC3F804AC7 -FC02FEEC03E0495A495A495A495AD91F80140749C8FC013E150F017FB7FC90B812C05A5A -5A5A5A5A5AB9FC1880A4344E79CD43>I<91380FFFC091B512FC0107ECFF80011F15E090 -263FF8077F9026FF800113FC4848C76C7ED803F86E7E491680D807FC8048B416C080486D -15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C0 -4B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0030113F89238007FFE707E7013 -807013C018E07013F0A218F8A27013FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318 -FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C484A1380D80FF84A13006CB44A -5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FCD9001F1380374F7ACD43>I<17 -7C17FEA2160116031607160FA2161F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E15 -7C15FCEC01F815F0EC03E01407EC0FC01580EC1F005C147E147C5C1301495A495A5C495A -131F49C7FC133E5B13FC485A5B485A1207485A485A90C8FC123E127E5ABA12C0A5C96C48 -C7FCAF020FB712C0A53A4F7CCE43>I<D80380150ED807E0157E01FEEC03FED9FFF0137F -91B65A5F5F5F5F5F94C7FC5E5E16F016C093C8FC15F801E190C9FC01E0CAFCABEC0FFF02 -7F13F001E3B512FE01E76E7E9026FFF8077FDAC0017F49C713F8496E7E49143F4981496E -7E6C481680C9FC18C08218E0A418F0A3EA0FE0487E487E487E487EA418E0A35B6C484A13 -C05B491680003EC85A003F17006C6C4A5A6D5D6C6C4A5AD807F8495BD803FE01075B2701 -FFC03F5B6C90B65A013F4AC7FC6D14F8010314C09026007FF8C8FC344F79CD43>I<ED0F -FF92B512E0020780021F14FC91397FFE03FE903A01FFF0007F4901C0EB3F804990C7121F -4948EC7FC0494814FF49484913E049485B01FF5C485BA2485B5AA2486F13C04A6D138048 -6F1300177E94C7FC5AA291CAFC5AA21508913801FFF8020713FFB54814C04A14F04AC66C -7E023C6D7E4A6D7E4A6D7E7013804A15C0A24A15E07013F05C18F8A491C714FCA37EA67E -A46C17F880A27E18F06C5D18E06C6D15C07E6E4913806C6D15006D6C495A6D6CEB7FFC6D -B448485A6D90B55A010315C0010092C7FC023F13FC020713C0364F7ACD43>I<121F7F7F -EBFF8091B81280A45A1900606060A2606060485F0180C86CC7FC007EC95A4C5A007C4B5A -5F4C5A160F4C5A484B5A4C5A94C8FC16FEC812014B5A5E4B5A150F4B5AA24B5AA24B5A15 -FFA24A90C9FCA25C5D1407A2140FA25D141FA2143FA4147F5DA314FFA55BAC6D5BA2EC3F -C06E5A395279D043>I<913807FFC0027F13FC0103B67E010F15E090261FFC0113F8903A -3FE0003FFCD97F80EB0FFE49C76C7E48488048486E1380000717C04980120F18E0177FA2 -121F7FA27F7F6E14FF02E015C014F802FE4913806C7FDBC00313009238F007FE6C02F85B -9238FE1FF86C9138FFBFF06CEDFFE017806C4BC7FC6D806D81010F15E06D81010115FC01 -0781011F81491680EBFFE748018115C048D9007F14E04848011F14F048487F4848130303 -0014F8484880161F4848020713FC1601824848157F173FA2171FA2170FA218F8A27F007F -17F06D151FA26C6CED3FE0001F17C06D157F6C6CEDFF806C6C6C010313006C01E0EB0FFE -6C01FCEBFFFC6C6CB612F06D5D010F1580010102FCC7FCD9000F13C0364F7ACD43>I<91 -380FFF8091B512F8010314FE010F6E7E4901037F90267FF8007F4948EB3FF048496D7E48 -4980486F7E484980824817805A91C714C05A7013E0A218F0B5FCA318F8A618FCA46C5DA3 -7EA25E6C7F6C5DA26C5D6C7F6C6D137B6C6D13F390387FF803011FB512E36D14C3010302 -8313F89039007FFE03EC00401500A218F05EA3D801F816E0487E486C16C0487E486D4913 -80A218005E5F4C5A91C7FC6C484A5A494A5A49495B6C48495BD803FC010F5B9027FF807F -FEC7FC6C90B55A6C6C14F06D14C0010F49C8FC010013F0364F7ACD43>I<171F4D7E4D7E -A24D7EA34C7FA24C7FA34C7FA34C7FA24C7FA34C8083047F80167E8304FE804C7E030181 -16F8830303814C7E03078116E083030F814C7E031F81168083033F8293C77E4B82157E84 -03FE824B800201835D840203834B800207835D844AB87EA24A83A3DA3F80C88092C97E4A -84A2027E8202FE844A82010185A24A820103854A82010785A24A82010F855C011F717FEB -FFFCB600F8020FB712E0A55B547BD366>65 D<BA12C019FEF1FFC01AF01AFCD8000701F0 -C7000313FFDE007F7F737F070F7F737F878587858785A287A84F5BA263616361634F5B4F -5B077F90C7FC4E485A060713F892B812E097C8FC861AF003F0C7000313FE9539003FFF80 -070F13E0737F07017F87737F747E1C807413C0A27413E0A31CF0A386A362A31CE0A2621C -C0A250138097B5FC1C004F5B19074F5B073F13F04EB55ABC128098C7FC1AF81AC007F8C8 -FC54527CD160>I<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F -92B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC -494848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F -485B481A3FA24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C -7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D -6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1F -F80203903AFFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC -525479D261>I<BA7E19FCF1FF801AF01AFCD8000701F0C7000F13FF060014C0071F7F07 -0713F807017F737F747E747F747F86747F747F8886888688A2757EA31D8087A21DC0A51D -E0A387A963A31DC0A51D80A2631D00A3515AA2646264505B6264505B505B5090C7FCF2FF -FE4F5B07075B071F5B96B512C0060F91C8FCBB5A1AF01AC007FCC9FC19805B527CD167> -I<BC1280A5D8000701F8C7000114C0F0001F19071901851A7F1A3F1A1FA2F20FE0A21A07 -A31A03A318F81BF01A01A497C7FC1701A317031707170F177F92B6FCA59238F8007F170F -170717031701A317001B3EA31B7CA395C8FCA21BFCA21BF8A21A01A31A031BF01A071A0F -A21A1F1A3FF27FE0F101FF1907191F0603B5FCBCFCA21BC0A34F517CD058>I<BB12FEA5 -D8000701F8C700077FF0007F191F190785858586861B80A21A1FA31A0FA41BC006F81307 -A497C7FCA31701A317031707170F177F92B6FCA59238F8007F170F170717031701A31700 -A795C9FCB3B812F8A54A517CD055>I<B812C0A5D8000701F8C7FCB3B3B3B2B812C0A52A -527CD132>73 D<B812F8A5D8000701F8CAFCB3B3A91A7CA41AFC1AF8A51901A31903A219 -071AF0190FA2191F193F197F19FF180360183F4DB5FCBB12E0A546527CD151>76 -D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 -C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF49496F7F49496F7F4990C96C7F -49854948707F4948707FA24849717E48864A83481B804A83481BC0A2481BE04A83A2481B -F0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D -4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D -6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0020F01FC90B512C0020390B7C8 -FC020016FC031F15E0030392C9FCDB001F13E0565479D265>79 D<BAFC19F819FF1AE086 -D8000701F0C7001F13FC060113FF726C13807313C0070F13E01BF0857313F81BFCA27313 -FEA41BFFA81BFEA31BFC61A21BF84F13F04F13E0614F13C04F13004E485A061F5B92B812 -F01AC04FC7FC19E003F8CBFCB3AEB812C0A550527CD15C>I<B912F0F0FF8019F819FF1A -C0D8000701F0C714F0060F7F060113FE727F737F737F85737F87A2737FA387A863A26163 -63A24F5B4F5B4F90C8FC4F5A06035B060F13F095B512C092B8C9FC19F819E019F89226F0 -000313FE9439007FFF80727F727F727F727F727F8684A28684A787A71D1C75133EA38575 -137E73157C7513FC731401B86C6D9038F803F807039038FE07F07390B512E0736C14C008 -0F1400CEEA7FFC5F537CD164>82 D<91260FFF80130791B500F85B010702FF5B011FEDC0 -3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00 -1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15 -F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301 -0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882 -A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A -5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048 -D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8 -060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6 -C994C7FCB3B3AC91B912F0A553517BD05E>I<B800C00103B612FCA5D8000701F8CAEBF0 -00F31F80B3B3B11B3FA26D97C7FC81637F1B7E6D6D17FE505A6E7E505A6E6D15076E4D5A -6E6D4B5A6E6D4B5A6E01F84B5A6E6DDA03FFC8FC6E6CB46CEB0FFE6F9039F001FFF8030F -90B65A030316C0DB007F92C9FC040F14F8DC007F13805E537CD167>I<EC7FFF0107B512 -F0013F14FE90B77E48D9E00F7F2703FE000113F0486C6D7F6EEB3FFC48826E131F83707F -A36C496D7FA26C90C7FC6C5AC9FCA6037FB5FC020FB6FC91B7FC01071487013FEBF00749 -13803901FFFC004813F0485B485B485B4890C7FC5A5BA2485AA45EA26D5C007F151D163D -6C6C02797F6C6D01F113F86C9026C003E1EBFFE06C9026F81FC014F06C90B5487EC6ED00 -1F011F01FC010713E0010101E090C8FC3C387CB641>97 D<EB3FF0B5FCA51203C6FCB3A4 -923801FFE0030F13FE033FEBFFC092B612F002F301017F913AF7F8003FFEDAFFE0EB0FFF -03806D7F92C76C7F4A6E7F4A824A6E7FA2727EA285A28584A31A80AC1A00A44E5AA36118 -FF616E4A5BA26E4A5B6E4A5B6F495BDACFC04990C7FCDA87F0EB7FFC913A03FE03FFF849 -C6B612E0496D148049011F01FCC8FC90C7000313C041547BD24B>I<913801FFF8021FEB -FF8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817 -C048495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27E -A2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB -03F8010F9038E01FF0010390B55A01001580023F49C7FC020113E033387CB63C>I<4DB4 -7E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038E03FE7 -4990380007F7D97FFC0101B5FC49487F4849143F484980485B83485B5A91C8FC5AA3485A -A412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED9 -0FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7FC4154 -7CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849486D7E -49486D7E4849130F48496D7E48178048497F18C0488191C7FC4817E0A248815B18F0A212 -FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6D -EC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390B55A01 -0015C0021F49C7FC020113F034387CB63D>I<ED3FFC0203B5FC020F14C0023F14E09139 -FFF81FF0499038C03FF849EB807F49903800FFFC495A495AA2495AA2EE7FF8495AEE3FF0 -EE0FC093C7FCAEB712E0A526007FF8C8FCB3B3A7007FB512FEA52E547CD329>I<DA3FFF -14FF0103B5D8F00713C0010FDAFC1F13E0013FECFF7F90267FFC0F9038FF9FF09026FFE0 -01EBF83F48496C13E0484990387FF01F4890C7D83FF813E0489338FC0FC0F0078048486E -6CC7FCA2003F82A9001F5EA26C6C4A5AA26C5E6C6D495A6C6D495A6C6D485BDAFC0F5B48 -90B6C8FCD803EF14FC01C314F02607C03F90C9FC91CBFCA2120FA37FA213F813FE90B7FC -6C16F817FF18C06C836C836C836D828448B9FC12074848C700031480D81FF8EC003F4848 -150748486F13C083485A83A56D5D007F18806D5D003F18006C6C4B5AD80FFEED1FFC6C6C -6CEC7FF86C01E049485A6C01FE011F5B6C6CB71280010F03FCC7FC010115E0D9000F01FC -C8FC3C4F7CB543>I<EB3FF0B5FCA51203C6FCB3A4EE1FFC93B512C0030314F0030F8092 -391FE07FFC92393F001FFE037C8003F07FDAF1E081ECF3C0DAF7807F8502FFC7FC5CA25C -A45CB3ACB6D8F807B612C0A542537BD24B>I<137F497E000313E0487FA2487FA76C5BA2 -6C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>I<EB -3FF0B5FCA512017EB3B3B3B1B612F0A51C537BD225>108 D<D93FF0D91FFCEDFFE0B591 -B500C0010713FE030302F0011F6D7E030F6E017F8092271FE07FFCD9FF037F922A3F001F -FE01F8007F0003027C9126FF03E080C602F06DD90780137FDAF1E0038FC77FDAF3C0159E -DAF7806D01BC143F07FC8102FFC75C4A5EA24A5EA44A5EB3ACB6D8F807B6D8C03FB512FE -A567367BB570>I<D93FF0EB1FFCB591B512C0030314F0030F8092391FE07FFC92393F00 -1FFE0003027C80C602F07FDAF1E081ECF3C0DAF7807F8502FFC7FC5CA25CA45CB3ACB6D8 -F807B612C0A542367BB54B>I<913801FFE0021F13FE91B612C0010315F0010F9038807F -FC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F48834890C86C7E -A24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C5FA26C5F -6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF807FFC -6D90B55A010015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B5010F13FE -033FEBFFC092B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC602806D7F92C7 -6C7F4A824A6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA2615F616E4A -5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E06F148003 -1F01FCC8FC030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB590380FFF80 -033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE78014EF1500 -14EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537>114 -D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F4980 -127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15F06C -816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC007F00 -F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE9039FF -C00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147EA414 -FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3A9EE -07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B0203 -13802A4D7ECB34>I<D93FF8913801FFC0B50207B5FCA50003ED001FC61607B3AE5FA35F -A2017F5D173B177B6D6C14F3DC01E313F06D6CD907C3EBFFC0903A0FFFC03F836D90B512 -03010114FE6D6C13F8020701E091C7FC42377BB54B>I<B600F00107B5FCA5000101F8C8 -EA7FE06C6DED3F00A2017F163E6E157E013F167C6E15FC6D5E6F13016D5E8117036D5E6F -13076D5E6F130F6D5E6F131F6D93C7FC815F6E6C133E177E023F147C6F13FC6E5C16816E -5C16C3A26EEBE3E016E76E5C16FF6E5CA26E91C8FCA26F5AA36F5AA26F5AA26F5AA26F5A -6F5A40367DB447>I<B6D8E07FB5D8C003B512C0A5000101F0C701F0C7381FF8006E027F -ED07E06C715DA26E023F150F017F705DA26E181F013F4B6C92C7FC6E606D70143E94B5FC -6F177E6D4A6E137C03C001F315FC6D715B160303E001E114016D020702E05B03F013C06D -71485A160F03F8D9807F13076D05F85B93381F003F03FC160F027F4902FC5BDBFE3E011F -131F023F04FE90C8FC167EDBFF7C010F5B6E01FCECFF3E4C6D137E6E5FA24C7F6E5F4C7F -6E5FA24C7F6E5F4C147FA26E5F93C8123F6F5EA2033E6FC9FC5A367DB461>I<007FB500 -F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A6D6D -91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E91C9 -FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A486C7E -020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E49486E7E -49486E7FEBFFF0B500FE49B612C0A542357EB447>I<B600F00107B5FCA5C601F8C8EA7F -E06EED3F00A26D6C153E187E013F167C6E15FC6D5E6F13016D5E6F13036D5E8117076D6D -5C170F6D6D5C171F6D93C7FC6F5B027F143E6F137E023F147C6F13FCA26E6D5A16816EEB -C1F016C36E5C16E76E5C16FF6E5CA26E91C8FCA36F5AA26F5AA26F5AA26F5AA26F5AA35E -150F5E151F93C9FC5DD81FC0133E486C137E486C137C486C13FC5D14015D14034A5A6C48 -485A49485A263FC07FCAFCEB81FE6CB45A6C13F000035BC690CBFC404D7DB447>I -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fl cmr10 10.95 83 -/Fl 83 124 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 -F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 -FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 -D<4AB4FC021F13C091387F01F0903901FC0078D907F0131C4948133E494813FF49485A13 -7F1400A213FE6F5A163893C7FCAA167FB8FCA33900FE00018182B3AC486CECFF80007FD9 -FC3F13FEA32F407FBF33>I<4AB47E021F13F791387F00FFEB01F8903807F001EB0FE0EB -1FC0EB3F80137F14008101FE80AEB8FCA3C648C77EB3AE486CECFF80007FD9FC3F13FEA3 -2F407FBF33>I<001E130F397F803FC000FF137F01C013E0A201E013F0A3007F133F391E -600F3000001300A401E01370491360A3000114E04913C00003130101001380481303000E -EB070048130E0018130C0038131C003013181C1C7DBE2D>34 D<14E0A4EB07FC90383FFF -8090B512E03901F8E3F03903E0E0FCD807C0133CD80F807FD81F007F003E80003C158000 -7C140316C00078141F00F8143F157FA47EED3F806CEC0E0092C7FC127F138013C0EA3FF0 -13FEEA1FFF6C13FC6C13FF6C14C06C806C6C13F8011F7F130301007FECE7FF14E102E013 -80157F153FED1FC0A2003E140F127FD8FF801307A5130000FC158000F0140F1270007815 -005D6C141E153E6C5C6C5C3907C0E1F03903F8EFE0C6B51280D93FFEC7FCEB0FF8EB00E0 -A422497BC32D>36 D<013F4C7ED9FFC04B7E2601E0E015072607C070150F48486C4B5A02 -3E4BC7FC48486C5D48D90FC0EB01FE003ED90EF0EB07FCDA0F3F133E007E903A070FFFF8 -F8007C0200EBC1F0EE000300FC6D6C495A604D5A171F95C8FC173E177E177C5F16015F00 -7C4948485A1607007E5E003E49495A020E131F003F93C9FC6C49133E260F803C137E0238 -137C6C6C485B3901E0E0016CB448485AD93F0049133F90C74848EBFFC0030F903801E0E0 -93398007C0704B4848487E4B153C033E90381F001C4B497F03FC133E4B150F4A48017E7F -0203147C5D4A4801FCEB0380140F5D4AC7FC5C143E5C14FC5C495A13034948027CEB0700 -5C4948147E011F033E5B91C8140E013E153F017E6F5B017C92380F803C4917380001706C -5A49923801E0E0496FB45A6C48043FC7FC41497BC34C>I<EC0FC0EC3FF0ECF878903801 -F01CEB03E049487E130FEC800F011F7FA2EB3F00A5EC800EA25DA25DA25D6D6C5AECC1C0 -A2ECC38002E7C7387FFFFCEB0FEE14FC4A020713C06D48913801FE006E5DEF00F06D7E4D -5A496C5D010F1503D91DFF4A5A013893C7FC496C6C5B01E0150E48486C6C131E00036E13 -1C2607801F143C000F6E5B001F6D6C1370263F000714F06F485A48D903FE5B913801FF03 -486D495A0487C8FCED7FCFED3FFE6F4814386D6D5AA2007F6E6C14786D6D6C14704B6C14 -F06C6C496C6C13E0001F91393E3FC0016C6C903AFC1FF003C03D07FC07F007FC1F800001 -B5D8C001B512006C6C90C7EA7FFCD90FF8EC0FF03E437CC047>I<121EEA7F8012FF13C0 -A213E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A1218123812300B -1C79BE19>I<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B12015B -1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E12 -3FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB01 -C0EB00E014701430145A77C323>I<12C07E12707E7E121E7E6C7E7F12036C7E7F12007F -1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A614C0 -130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC121E12 -1C5A5A5A5A145A7BC323>I<EB03C0A2805CA600F0140F00FC143F00FE147F00FF14FF39 -3FC3C3FC390FE187F03903F18FC03900FDBF00EB3FFCEB0FF0EB03C0EB0FF0EB3FFCEBFD -BF3903F18FC0390FE187F0393FC3C3FC39FF03C0FF00FE147F00FC143F00F0140F000014 -00A6805CA220277AC32D>I<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013 -C0A312011380120313005A120E5A1218123812300B1C798919>44 -D<B512FEA617067F961E>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>I<ED -0180ED03C01507A21680150FA216005DA2151E153EA2153C157CA2157815F8A25D1401A2 -5D1403A25D1407A25D140FA24AC7FCA2141E143EA2143C147CA2147814F8A25C1301A25C -1303A25C1307A25C130FA291C8FC5BA2131E133EA25BA2137813F8A25B1201A25B1203A2 -5B1207A25B120FA290C9FC5AA2121E123EA2123C127CA2127812F8A25A1260225B7BC32D ->I<EB01FE90380FFFC090383F03F090387C00F849137C48487F48487F4848EB0F80A200 -0F15C04848EB07E0A3003F15F0A290C712034815F8A64815FCB3A26C15F8A56C6CEB07F0 -A3001F15E0A36C6CEB0FC0A26C6CEB1F80000315006C6C133E6C6C5B017C5B90383F03F0 -90380FFFC0D901FEC7FC263F7DBC2D>I<EB01C013031307131F137FEA07FFB5FC139FEA -F81F1200B3B3ACEB7FF0B612F8A31D3D78BC2D>I<EB07FC90383FFF8090B512E03903F0 -1FF83907C007FC390F0001FE001E6D7E001C1580003CEC7FC05AED3FE01270B4FC6DEB1F -F07FA56C5A6CC7FC120CC813E0153FA216C0157F168015FF16004A5A5D4A5A4A5A5D4A5A -4A5A4AC7FC147E147C5C495A495A495A495A49C71270133E133C5B4914E0485A485A485A -48C7120148B6FCA25A4815C0B7FCA3243D7CBC2D>I<EB07FC90383FFF809038F80FE039 -01E003F839078001FCD80F007F000E6D7E001E1580D81F80137F486C14C07FA27F5BA212 -1F6C5AC8138015FF1600A24A5AA24A5A5DEC07E04A5A023FC7FCEB1FFCECFF809038000F -E0EC07F86E7E6E7E6E7E1680ED7FC0A216E0153FA216F0A2120C123F487E487EA316E0A2 -49137F6CC713C01278EDFF807E6C4913006C495A3907C007FC3903F80FF0C6B55A013F13 -80D907F8C7FC243F7CBC2D>I<150E151E153EA2157EA215FE1401A21403EC077E140614 -0E141CA214381470A214E0EB01C0A2EB0380EB0700A2130E5BA25B5BA25B5B1201485A90 -C7FC5A120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<0006 -1403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB3FE090C9FCACEB01FE9038 -0FFF8090383E03E090387001F8496C7E49137E497F90C713800006141FC813C0A216E015 -0FA316F0A3120C127F7F12FFA416E090C7121F12FC007015C012780038EC3F80123C6CEC -7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D> -I<EC1FE0ECFFF8903803F03E90380FC00F90391F000780133E017EEB1FC049133F484813 -7F12035B12074848EB3F80ED1F00001F91C7FC5BA2123FA3485AA214FE903887FF8039FF -8F07E090389C01F09038B800FC01B0137E13F0497F16804914C0A2ED1FE0A34914F0A512 -7FA6123F6D14E0A2121FED3FC0A26C6C1480A20007EC7F006C6C137E6C6C5B6C6C485A90 -387E07F06DB45A010F1380D903FCC7FC243F7CBC2D>I<1238123C123F90B612FCA316F8 -5A16F016E00078C712010070EC03C0ED078016005D48141E151C153C5DC8127015F04A5A -5D14034A5A92C7FC5C141EA25CA2147C147814F8A213015C1303A31307A3130F5CA2131F -A6133FAA6D5A0107C8FC26407BBD2D>I<EB03FC90381FFF8090387C07E09038F001F839 -01E0007C48487F48487F48C7FCED0F80121E16C0003E1407A4123FA26DEB0F807F6C6C13 -1F6D140001FC133E6C6C5B9038FF80786C6D5A6CEBF3E06CEBFF806C91C7FC133F6D13C0 -6D7F013F13F801787F48486C7E3903E01FFF48486C1380260F800313C048487E48903800 -7FE0003E143F007E141F007CEC0FF01507481403A31501A46C15E0007C1403A2007E15C0 -6C14076CEC0F806DEB1F006C6C133ED807F05B3901FC03F86CB512E0011F1380D903FCC7 -FC243F7CBC2D>I<EB03FCEB1FFF90387E07C09038FC03F048486C7E48486C7E4848137C -000F147E4848137F81003F15805B007F15C0A2151F12FF16E0A516F0A5127F153FA36C7E -A2001F147F120F6C6C13FF6D13DF000313013900F8039F90387E0F1FD91FFE13E0EB07F0 -90C7FCA2ED3FC0A41680157FD80F801400487E486C13FEA24A5A5D49485AEB8007391E00 -0FE0001F495A260FC07FC7FC3803FFFE6C13F838003FC0243F7CBC2D>I<121EEA7F80A2 -EAFFC0A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619 ->I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E127FEAFF80A213C0A4127F12 -1E1200A412011380A3120313005A1206120E120C121C5A1230A20A3979A619>I<EB1FF8 -90B5FC3903E01FC0390F0007F0001EEB03F848EB01FC4814FE140000FE14FF7E7FA46CC7 -FC123EC7EA01FEA2EC03FCEC07F815F0EC0FC0EC1F80EC3F00143E5C147814F85C13015C -A2495AA25CAB91C7FC90C8FCA8EB0780EB1FE0A2497EA46D5AA2EB078020407BBF2B>63 -D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC15C3A291380381FEA34AC6 -7EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA349486D7E91B6FCA24981913880 -0001A249C87EA24982010E157FA2011E82011C153FA2013C820138151FA2017882170F13 -FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044>65 D<B712FCEEFF8017F000 -01903980000FF86C6CC7EA03FE707E701380EF7FC0EF3FE0A2EF1FF0A218F8A3170F171F -A318F0A2EF3FE0177F18C0EFFF804C1300EE03FCEE0FF8EE7FE091B6C7FC17E091C7EA07 -FCEE01FE933800FF80EF7FC0EF3FE0EF1FF018F8170F18FC1707A218FEA718FC170FA2EF -1FF818F0173FEF7FE0EFFFC00403138048486C90380FFE00B85A17E094C7FC373E7DBD40 ->I<DB3FF01306912603FFFE130E020F9038FF801E913A3FF007E03E9139FF8000F8D903 -FEC7EA7C7ED907F8EC1EFE4948140FD93FE0140749481403495A91C81201484815001203 -4848167E5B000F173EA24848161EA2123F5B180E127FA349160012FFAC127F7F180EA212 -3FA27F001F171E181C6C7EA20007173C6D16386C6C1678000117706C6C16F06EEC01E06D -6C15C06D6C1403D90FF0EC07806D6CEC1F00D903FE143E902600FF8013F891393FF007F0 -020FB512C0020391C7FC9138003FF037427BBF42>I<B712FCEEFF8017E000019039C000 -1FF86C6C48EB03FEEE00FF717E717EEF0FE084717E717E170184717EA21980187F19C0A3 -F03FE0A519F0AB19E0A5F07FC0A21980A218FF19004D5AA24D5A6017074D5A4D5AEF7FC0 -4DC7FCEE03FE48486CEB1FF8B85A178004FCC8FC3C3E7DBD45>I<B912E0A300019038C0 -00016C6C48EB001FEF0FF01703A217011700A31870A41838161CA41800A2163CA2167C16 -FC150391B5FCA3EC80031500167C163CA2161CA21807A3180E93C7FCA4181E181CA2183C -A2187CA218F8170117031707171F48486CEB01FFB912F0A3383E7DBD3E>I<B91280A300 -019038C000036C6C48EB007FEF1FC0170F1707A21703A31701A4EF00E0A21638A31800A3 -1678A216F81501150791B5FCA3EC8007150115001678A21638A693C8FCAF3801FFE0B612 -F0A3333E7DBD3B>I<DB3FE0130C912603FFFE131C021F9038FF803C913A7FF00FC07C91 -39FF0001F0D903FC90380078FC4948143DD91FE0141F4948140F4948140701FF15034890 -C8FC491501485A000716005B000F177C5B001F173CA2485AA2181C127FA25B95C7FC12FF -AB041FB512F0127FA26D9139000FFE00EF03FC123FA27F121FA26C7EA212077F12036C7E -7F6C7F6D6C14076D7E6D6C140FD907F8141ED903FEEC3C7C902600FF80EBF83C913A7FF0 -07F01C021FB5EAC00C020391C8FC9138003FF03C427BBF47>I<B6D8C01FB512F8A30001 -01E0C7383FFC0026007F80EC0FF0B3A691B7FCA30280C7120FB3A92601FFE0EC3FFCB6D8 -C01FB512F8A33D3E7DBD44>I<B612F0A3C6EBF000EB3FC0B3B3B2EBFFF0B612F0A31C3E -7EBD21>I<011FB512FCA3D9000713006E5A1401B3B3A6123FEA7F80EAFFC0A44A5A1380 -D87F005B007C130700385C003C495A6C495A6C495A2603E07EC7FC3800FFF8EB3FC02640 -7CBD2F>I<B600C090387FFFFCA3000101E0C7000F138026007F80913807FE0018F818E0 -604D5A4DC7FC173E5F5F4C5A4C5A4C5A4C5A4CC8FC163E5E5E4B5A4B5AED07804B7E151F -4B7E4B7E15FF913881EFF8913883C7FCEC878791388F03FE91389E01FF14BCDAF8007F4A -6D7E5C4A6D7E4A6D7EA2707E707EA2707E707EA2707F717E84173F717E717EA2717E8484 -19802601FFE04A13C0B600C090B6FCA3403E7DBD47>I<B612F8A3000101E0C9FC38007F -80B3B0EF0380A517071800A45FA35FA25F5F5F4C5A160748486C133FB8FCA3313E7DBD39 ->I<B500C093383FFFF0A300016D93387FF800D8007F18E0D977F016EFA3D973F8ED01CF -A2D971FCED038FA3D970FEED070FA26E150E80A26E6C141CA36E6C1438A26E6C1470A36E -6C14E0A26E6CEB01C0A36E6CEB0380A36E6CEB0700A2037F130EA36F6C5AA26F6C5AA36F -6C5AA25FED07F0A2923803F9C0A36FB45AA26F90C7FCA213F8486C147ED807FFEF3FF8B5 -00F8013C011FB512F0A34C3E7DBD53>I<B56C91B512F88080D8007F030713006EEC01FC -6E6E5A1870EB77FCEB73FEA2EB71FF01707FA26E7E6E7EA26E7E6E7EA26E7E6E7EA26E7E -6E7FA26F7E6F7EA26F7E6F7EA26F7E6F7EA26F7E6F1380A2EE7FC0EE3FE0A2EE1FF0EE0F -F8A2EE07FCEE03FEA2EE01FF7013F0A2177F173FA2171F170FA2170701F81503487ED807 -FF1501B500F81400A218703D3E7DBD44>I<ED7FE0913807FFFE91391FC03F8091397E00 -07E04948EB03F8D907F0EB00FE4948147F49486E7E49486E7E49C86C7E01FE6F7E000183 -49150300038348486F7EA248486F7EA2001F188049167F003F18C0A3007F18E049163FA3 -00FF18F0AC007F18E06D167FA4003F18C0A26C6CEEFF80A36C6C4B1300A26C6C4B5A0003 -5F6D150700015F6C6C4B5A6D5E6D6C4A5A6D6C4A5A6D6C4AC7FC6D6C14FED901FCEB03F8 -D9007FEB0FE091391FC03F80912607FFFEC8FC9138007FE03C427BBF47>I<B712F8EEFF -8017E000019039C0003FF86C6C48EB07FCEE01FE707EEF7F80EF3FC018E0A2EF1FF0A218 -F8A818F0A2EF3FE0A218C0EF7F80EFFF004C5AEE07FCEE3FF091B612C04CC7FC0280C9FC -B3A73801FFE0B612C0A3353E7DBD3E>I<B712C016FCEEFF800001D9C00013E06C6C48EB -1FF0EE07FCEE01FE707E84717EA2717EA284A760177F606017FF95C7FCEE01FCEE07F8EE -1FE0EEFF8091B500FCC8FC16F091388001FCED003FEE1FC0707E707E83160383160183A3 -83A484A4F0C004190EA28218E0057F131E2601FFE0161CB600C0EB3FF094381FF8380507 -1370CA3801FFE09438003F803F407DBD43>82 D<D907FC130C90391FFF801C017FEBF03C -3901FC03F83A03F0007E7CD807C0EB1FFC4848130F001F140748C71203003E1401007E14 -00A2007C157C12FCA2163CA36C151CA27EA26C6C14007F7FEA3FF8EBFF806C13F86CEBFF -806C14F06C14FC6C14FF6C15C0013F14E0010714F0EB007F020713F89138007FFC150FED -07FE15031501ED00FFA200E0157FA3163FA27EA3163E7E167E6C157C6C15FC6C15F86D13 -016DEB03F06DEB07E0D8F9FCEB0FC03AF07F803F8090391FFFFE00D8E00713F839C0007F -C028427BBF33>I<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E -1707127C00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D -7DBC42>I<B600C090B512F8A3000101E0C70007130026007F80EC01FC715A1870B3B3A4 -013F16F06E5DA21701011F5E80010F15036E4A5A010793C7FC6D6C5C6D6C141E6D6C5C02 -7F14F86E6C485A91390FF00FE00203B51280020049C8FCED1FF03D407DBD44>I<B69138 -0FFFFEA3000301E0020113E06C01809138007F806CEF3F00017F163E181C6E153C013F16 -38A26E1578011F1670A26D6C5DA26E140101075EA26E140301035EA26D6C4AC7FCA2806D -150EA26F131E027F141CA26F133C023F1438A26E6C5BA26F13F0020F5CA2EDF80102075C -A26E6C485AA2EDFE07020191C8FCA26F5A6E130EA2ED7F9CA216DCED3FF8A36F5AA36F5A -A26F5AA36F5A3F407EBD44>I<B500FE017FB5D88007B5FCA3000301C0010101E0C713F8 -6C90C849EC3FE07148EC0F807E7215006E143F017F190E84A26D6C60A24D7E6D6C60A2EF -E7F86D6C60A2933801C3FC6E18F001076104037F6E0281140101036104077F17006D6C4D -5AA2040EEB7F806D6C4DC7FCA24CEB3FC0DA7F80160EA24CEB1FE003C0161E023F171C04 -7814F0DBE070010F133C021F173804F014F84C1307DA0FF05EA2DBF1C0EB03FCDA07F95E -A2DBFB80EB01FEDA03FF6F5AA293C8FCA26E5FA24B157F020094C8FCA24B81037C153EA2 -0378151E0338151C58407EBD5D>I<B66C0103B51280A3000101F0C8EBF8006C6C48ED3F -C0725A013F041EC7FC6D7E606D6C15386D6C1578606D6C5D6E14016D5E6D6D1303606E6C -49C8FC6E6C5B170E6E6C131E171C6E6C5B6E6C137817706E6C13F06F5B6E13016EEB83C0 -5FED7FC7DB3FE7C9FC16EFED1FFE5E150F6F5AB3A4ED1FFC020FB512FCA3413E7FBD44> -89 D<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EEDFF80A200 -3C4A1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FCA24A5A4A -5AA24A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA2495A495A -173C495AA24890C8FC485A1778485A484815F8A24848140116034848140F4848143FED01 -FFB8FCA32E3E7BBD38>I<EAFFFCA4EAF000B3B3B3B3ABEAFFFCA40E5B77C319>I<486C13 -C00003130101001380481303000EEB070048130E0018130C0038131C0030131800701338 -00601330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2003F13 -1F01C013E0390F0007801C1C73BE2D>I<EAFFFCA4EA003CB3B3B3B3ABEAFFFCA40E5B7F -C319>I<EA0180120313005A120E5A12181238123012701260A312E05AA412CFEAFFC013 -E0A3127FA2123F13C0EA0F000B1C7ABE19>96 D<EB0FF8EBFFFE3903F01F8039078007E0 -000F6D7E9038E001F8D81FF07F6E7EA3157F6C5AEA0380C8FCA4EC1FFF0103B5FC90381F -F87FEB7F803801FC00EA07F8EA0FE0485A485AA248C7FCEE038012FEA315FFA3007F5BEC -03BF3B3F80071F8700261FC00E13CF3A07F03C0FFE3A01FFF807FC3A003FC001F0292A7D -A82D>I<EA01FC12FFA3120712031201B1EC03FC91381FFF8091387C07E09039FDE001F0 -9039FFC000FC4A137E91C77E49158049141F17C0EE0FE0A217F0A2160717F8AA17F0A216 -0FA217E0161F17C06D1580EE3F006D5C6E13FE9039F3C001F89039F1E003F09039E0780F -C09026C03FFFC7FCC7EA07F82D407EBE33>I<49B4FC010F13E090383F00F8017C131E48 -48131F4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB -6C7EA3003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890 -383F01F090380FFFC0D901FEC7FC222A7DA828>I<ED01FC15FFA3150715031501B114FF -010713E190381F80F990387E003D49131FD803F81307485A49130348481301121F123F5B -127FA290C7FCA25AAA7E7FA2123FA26C7E000F14037F000714076C6C497E6C6C497ED800 -7C017913F890383F01F190380FFFC1903A01FE01FC002D407DBE33>I<EB01FE90380FFF -C090383F03F09038FC01F848486C7E4848137E48487F000F158049131F001F15C0484813 -0FA2127F16E090C7FCA25AA290B6FCA290C9FCA67EA27F123F16E06C7E1501000F15C06C -6C13036DEB07806C6C1400C66C131E017E5B90381F80F8903807FFE0010090C7FC232A7E -A828>I<EC1FC0EC7FF8903801F83C903807E07E90380FC0FFEB1FC1EB3F811401137FEC -00FE01FE137C1500AEB6FCA3C648C7FCB3AE487E007F13FFA320407EBF1C>I<167C9039 -03F801FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F -6EC7FC49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC0 -26071FFFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C8100 -03813A0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D -6C6C495A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D> -I<EA01FC12FFA3120712031201B1EC01FE913807FFC091381E07E091387803F09138E001 -F8D9FDC07F148001FF6D7E91C7FCA25BA25BB3A6486C497EB5D8F87F13FCA32E3F7DBE33 ->I<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCACEA01FC127FA3120712031201B3AC48 -7EB512F0A3143E7DBD1A>I<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7F -FFA313017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07 -C0380FFF803801FC00185185BD1C>I<EA01FC12FFA3120712031201B292B51280A39238 -3FFC0016E0168093C7FC153C5D5D4A5AEC07C04A5A4AC8FC143E147F4A7E13FD9038FFDF -C0EC9FE0140F496C7E01FC7F496C7E1401816E7E81826F7E151F826F7EA282486C14FEB5 -39F07FFFE0A32B3F7EBE30>I<EA01FC12FFA3120712031201B3B3B1487EB512F8A3153F -7DBE1A>I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C -01F80007903BE001F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF -4992C7FCA2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F8 -01FE00FF903807FFC091381E07E091387803F000079038E001F82603F9C07F0001138001 -FB6D7E91C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713 -E090381F81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848 -EB01F8A2003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03 -F0A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090 -C7FC282A7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC0 -01FC6C496C7E6C90C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1F -E0A2EE3FC06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7 -FCEC07F891C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090 -397F00387C01FC131CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7 -FCAA6C7EA36C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F1 -90380FFFC1903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB -1FF8EC787CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A548 -7EB512FEA31F287EA724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C -1303127C0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480 -000114C0D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E1401 -6C14E06CEB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA613 -3CA4137CA213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038 -FE01C0A2EB7F03013F138090381F8700EB07FEEB01F81B397EB723>I<D801FC14FE00FF -147FA3000714030003140100011400B3A51501A31503120015076DEB06FF017E010E1380 -6D4913FC90381FC078903807FFE00100903880FE002E297DA733>I<B539E00FFFE0A327 -07FE000313006C48EB00FC5E00015D7F00005DA26D13016D5CA26D6C485AA2ECC007011F -91C7FCA290380FE00EA2ECF01E0107131CA26D6C5AA2ECFC7801011370A2ECFEF001005B -A2EC7FC0A36E5AA26EC8FCA3140E2B287EA630>I<B53BC3FFFE03FFF8A3290FFE003FE0 -0013C06C486D48EB3F806C4817006D010F141E00016F131C15076D163C00004A6C1338A2 -017F5E4B7E151DD93F805DED3DFC1538D91FC04A5AED78FE9238707E03D90FE0017F5BED -E03F02F0140701070387C7FC9138F1C01F02F9148F010315CE9138FB800F02FF14DE6D15 -FCED00076D5DA24A1303027E5CA2027C1301023C5C023813003D287EA642>I<B539F01F -FFE0A30003D9C00F1300C690388007F8D97F0013E002805BD93FC05B011F49C7FC90380F -E00EECF01E6D6C5A01035B6D6C5A6E5AEB00FF6E5A6E5A81141F814A7E81147BECF1FC90 -3801E1FEECC0FF01037F49486C7ED90F007F011E6D7E013E130F496D7E01FC80486C8000 -0F4A7EB539803FFFF8A32D277FA630>I<B539E00FFFE0A32707FE000313006C48EB01FC -6F5A00015D7F00005DA2017F495AA2EC8003013F5CA26D6C48C7FCA26E5A010F130EA26D -6C5AA2ECF83C01031338A26D6C5AA2ECFEF001005BA2EC7FC0A36E5AA36EC8FCA2140EA2 -141E141C143C1438A2147800181370127EB45BA2495AA248485AD87E07C9FCEA780EEA3C -3CEA1FF8EA07E02B3A7EA630>I<001FB61280A2EBE0000180140049485A001E495A121C -4A5A003C495A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC0 -0380A2EB7F80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF49 -5A90B6FCA221277EA628>I<B812F0A22C0280982D>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fm cmbx12 20.736 11 -/Fm 11 115 df<137F3801FFC0000713F0487F487F487F487FA2B61280A96C1400A26C5B -6C5B6C5B6C5B000113C06C6CC7FC1919729836>46 D<EE3FFF0307B512F8033F14FF4AB7 -12E0020716F8021F16FE4AD9F8077F91B5D8C00014C04991C7003F7F4901FC020F7F4949 -6E7F49496E7F49496E7F49496E7F4B81498590B5C96C7FA24849707FA24886A248864A82 -4886A34886A448864A82A4481B80A8B51AC0B3AA6C1B80A86C1B006E5EA46C62A36C62A3 -6C6D4C5BA36C62A26C6D4C5BA26C6E4B5B6D616F92B5FC6D96C7FC6D6D4A5B6D6D4A5B6D -6D4A5B6D6D4A5B6D01FF023F5B6D02C090B55A6ED9F8075C021F90B648C8FC020716F802 -0116E06E6C1580030702F8C9FCDB003F90CAFC527379F061>48 D<93B57E031F14FC92B7 -7E020316F0020F16FC023F16FF4A8349B5D8800314E04901F8C7003F7F4901C0020F7F49 -90C800037FD91FFC6F7F49486F6C7E137F4A7013804948827313C05A4A821BE05AA28548 -7FA38080806E5E8003C017C08103F85D03FE17806F6C5C6C6F160004F05C04FC4A5A6C6F -5D706C13FFDDE0015B6CDCF8035BDDFC0F13C06DDBFF1F5B6D93B5C7FC19FC6D17F06D5F -6D17806D17E06D836D6C16FC6E16FF020F836E17E06E83020F83023F8391B97E49840107 -01F0178049D9C07F16C0013FD9801F16E049EB00074948010116F048497F4849023F15F8 -4849140F4A6E15FC48160148496E6C14FE4A151F488391C9120348050014FF193F498385 -00FF84854983A28586A3861BFEA27FA2007F1AFC7F1A7F1BF86C7FF2FFF06C7F6E4C13E0 -6C6D4C13C06C6D5E6E4C13806C6D4C13006C6D6CED7FFE6C02E04A485A013F01FC020F13 -F06D9026FFC001B55A010791B712806D95C7FC010017FC021F16F002071680DA007F02FC -C8FC030191C9FC507378F061>56 D<93B5FC031F14F092B612FE02076F7E021F16E04A16 -F891B87E49DAF00713FF0107DA0001804901FC6D6C7F49496E7F49496E7F49496E7F90B5 -486E7F484A8048854891C86C7FA2487114805C481AC0A2487213E0A2484918F0A31BF8A2 -B5FCA27313FCA51BFEA71BFF61A27EA396B6FC7EA2806C5FA27E606C7F607E6C6E5C6CEF -1FBF6D6DEC3F3F6D6D147F6D6D14FE6D6DEB01FC6D01FE130701019039FFC01FF86D91B5 -00F014FE023F15C06E15800203ECFE00DA007F13F8030713C092C9FC4F13FCA41BF8A31B -F0D91FF093B5FCEB7FFC496C18E0487F486E17C06048801B804E1400A26260624E5B4B5C -626C91C8485B4A4B5B4A92B55A6C01F04A91C7FC02804A5B6C01E0020F5B6D6C023F13F0 -02FE91B55A90273FFFE00F5C6D90B7C8FC010716FC6D16F0010016C0023F92C9FC020714 -F09126007FFECAFC507378F061>I<92383FFFF80207B612E0027F15FC49B87E010717E0 -011F83499026F0007F13FC4948C7000F7F90B502036D7E486E6D806F6D80727F486E6E7F -8486727FA28684A26C5C72806C5C6D90C8FC6D5AEB0FF8EB03E090CAFCA70507B6FC041F -B7FC0303B8FC157F0203B9FC021FECFE0391B612800103ECF800010F14C04991C7FC017F -13FC90B512F04814C0485C4891C8FC485B5A485B5C5A5CA2B5FC5CA360A36E5DA26C5F6E -5D187E6C6D846E4A48806C6D4A4814FC6C6ED90FF0ECFFFC6C02E090263FE07F14FE0001 -9139FC03FFC06C91B6487E013F4B487E010F4B1307010303F01301D9003F0280D9003F13 -FC020101F8CBFC57507ACE5E>97 D<903801FFFCB6FCA8C67E131F7FB3ADF0FFFC050FEB -FFE0057F14FE0403B77E040F16E0043F16F84CD9007F13FE9226FDFFF001077F92B500C0 -01018094C86C13E004FC6F7F4C6F7F04E06F7F4C6F7F5E747F93C915804B7014C0A27414 -E0A21DF087A21DF8A31DFC87A41DFEAF1DFCA4631DF8A31DF098B5FC1DE0A25014C0A26F -1980501400705D705F704B5B505B704B5B04FC4B5BDBE7FE92B55A9226C3FF8001035C03 -8101E0011F49C7FC9226807FFC90B55A4B6CB712F04A010F16C04A010393C8FC4A010015 -F84A023F14C090C9000301F0C9FC5F797AF76C>I<93383FFFF00307B612C0033F15F84A -B712FE0207707E021F17E0027F8391B526FC001F7F010302C001037F4991C7487F49495C -495B4901F04A7F5B90B55A485CA2485C4891C8FCA248715B5C48715B725B4A6F5B489438 -007FC0071FC7FC96C8FC5AA25CA3B5FCAF7E80A47E80A27E806CF11F80F23FC06C6E167F -A26C6EEEFF80816C606C6E17006D6D4B5A6D6D15076D6D4B5A6D6D6C4A5A6D02E0EC7FF0 -6D02F849485A01009126FF801F5B6E91B6C7FC021F5E020716F8020116E06E6C15800307 -02FCC8FCDB003F13804A507ACE56>I<97380FFFE00607B6FCA8F00003190086B3AD9338 -3FFF800307B512F8033F14FF4AB712C0020716F0021F16FC027F9039FE007FFE91B500F0 -EB0FFF01030280010190B5FC4949C87E49498149498149498149498190B548814884484A -8192CAFC5AA2485BA25A5C5AA35A5CA4B5FCAF7EA4807EA37EA2807EA26C7F616C6E5D6C -606C80616D6D5D6D6D5D6D6D92B67E6D6D4A15FC010301FF0207EDFFFE6D02C0EB3FFE6D -6C9039FC01FFF86E90B65A020F16C002031600DA007F14FC030F14E09226007FFEC749C7 -FC5F797AF76C>I<93387FFF80030FB512FC037FECFF804AB712E0020716F8021F16FE02 -7FD9F8077F49B5D8C000804991C7003F13E04901FC020F7F49496E7F49498049496E7F49 -496E7F90B55A48727E92C914804884485B1BC048841BE0485BA27313F05AA25C5AA21BF8 -85A2B5FCA391BAFCA41BF002F8CCFCA67EA3807EA47E806CF103F0F207F86C7F1A0F6C6E -17F06C191F6F17E06C6E163F6D6DEE7FC06D6D16FF6D6D4B13806D6D4B13006D6D6CEC0F -FE6D02E0EC3FFC6D02F8ECFFF86D9126FFC00F5B023F91B65A020F178002034CC7FC0200 -16F8031F15E0030392C8FCDB000F13E04D507BCE58>I<93381FFFE00303B6FC031F15E0 -92B712FC020316FF020F17C0023FD9FC0014F091B500C0010F13FC4991C700037F4901FC -02007F010F496F13C049496F7F49496F7F4B8149496F7F90B5C96C7F4886A24849707F48 -1B80A248497014C0A2481BE0A348497113F0A3481BF8A5B51AFCAE6C1BF8A46C1BF06E94 -B5FCA36C1BE0A26C6D4C14C0A26C1B806E5E6C1B006C6E4B5BA26C6E4B5B6D6D4B5B6D6D -4B5B6D6D4B5B6D6D92B55A6D01FF02035C6D02C0010F91C7FC010002FC90B512FC6E90B7 -5A021F17E00207178002014CC8FCDA003F15F0030392C9FCDB001F13E056507BCE61> -111 D<902601FFF8EB07FEB691383FFFC094B512F00403804C14FE4C8093261FFC3F1380 -93263FE07F13C0DC7F80B5FCC66C5D011FDAFE0114E06DEBF9FC16F815FB16F016E015FF -16C07114C05E72138095381FFE0093C76C5AF001E095C8FCA25DA65DB3B3A2B812F8A843 -4E7ACD4F>114 D E -%EndDVIPSBitmapFont -end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin -%%PaperSize: A4 - -%%EndSetup -%%Page: 1 1 -1 0 bop 94 1385 a Fm(barco)5 b(de)65 b(0.98)p 94 1451 -3780 34 v 2617 1548 a Fl(A)31 b(library)d(for)i(dra)m(wing)f(bar)h(co)s -(des)3409 1656 y(Marc)m(h)h(2002)94 5367 y Fk(b)l(y)45 -b(Alessandro)h(Rubini)f(\()p Fj(rubini@gnu.org)p Fk(\))p -94 5446 3780 17 v eop -%%Page: 1 2 -1 1 bop 94 -116 a Fl(Chapter)30 b(2:)41 b(The)30 b(Underlying)e(Data)k -(Structure)2012 b(1)94 365 y Fi(Barco)t(de)54 b(to)t(ols)219 -549 y Fl(This)29 b(\014le)g(do)s(cumen)m(ts)h(v)m(ersion)g(0.98)i(of)e -(the)h(barco)s(de)f(library)e(and)i(sample)f(programs)h(\(Marc)m(h)i -(2002\).)94 815 y Fi(1)81 b(Ov)l(erview)219 999 y Fl(The)26 -b Fh(barco)s(de)32 b Fl(pac)m(k)-5 b(age)29 b(is)d(mainly)f(a)i(C)f -(library)f(for)h(creating)i(bar-co)s(de)f(output)f(\014les.)39 -b(It)27 b(also)f(includes)94 1099 y(a)31 b(command)f(line)f(fron)m -(t-end)h(and)g(\(in)f(a)i(foreseeable)g(future\))f(a)h(graphic)e(fron)m -(tend.)219 1215 y(The)k(pac)m(k)-5 b(age)35 b(is)d(designed)g(as)i(a)f -(library)e(b)s(ecause)i(w)m(e)h(think)e(the)h(main)g(use)f(for)h(barco) -s(de-generation)94 1315 y(to)s(ols)23 b(is)f(inside)f(more)i(featured)g -(applications.)37 b(The)22 b(library)f(addresses)h(bar)h(co)s(de)g -(prin)m(ting)e(as)i(t)m(w)m(o)i(distinct)94 1415 y(problems:)43 -b(creation)33 b(of)f(bar)g(information)e(and)i(actual)h(con)m(v)m -(ersion)f(to)h(an)f(output)g(format.)47 b(T)-8 b(o)32 -b(this)g(aim)94 1514 y(w)m(e)25 b(use)f(an)g(in)m(termediate)g -(represen)m(tation)g(for)g(bar)f(co)s(des,)j(whic)m(h)d(is)g(curren)m -(tly)g(do)s(cumen)m(ted)h(in)e(the)j(`)p Fj(ps.c)p Fl(')94 -1614 y(source)31 b(\014le)e(\(not)i(in)f(this)f(do)s(cumen)m(t\).)219 -1730 y(Note)24 b(that)e(the)h(library)d(and)h(the)i(accompan)m(ying)g -(material)e(is)h(released)g(according)g(to)h(the)f(GPL)h(license,)94 -1830 y(not)31 b(the)g(LGPL)f(one.)41 b(A)30 b(cop)m(y)h(of)g(the)g(GPL) -f(is)f(included)f(in)h(the)i(distribution)26 b(tarball.)94 -2096 y Fi(2)81 b(The)53 b(Underlying)h(Data)g(Structure)219 -2280 y Fl(Ev)m(ery)33 b(barco)s(de-related)g(function)f(acts)i(on)f(a)h -(data)f(structure)g(de\014ned)f(in)g(the)h(`)p Fj(barcode.h)p -Fl(')e(header,)94 2380 y(whic)m(h)j(m)m(ust)h(b)s(e)f(included)e(b)m(y) -j(an)m(y)g(C)g(source)g(\014le)f(that)h(uses)g(the)g(library)-8 -b(.)52 b(The)35 b(header)f(is)g(installed)f(b)m(y)94 -2480 y Fj(make)47 b(install)p Fl(.)219 2596 y(The)30 -b(de\014nition)e(of)i(the)h(data)g(structure)f(is)f(included)f(here)i -(for)g(reference:)334 2717 y Fj(struct)47 b(Barcode_Item)d({)525 -2820 y(int)j(flags;)428 b(/*)47 b(type)g(of)g(encoding)f(and)h(other)f -(flags)g(*/)525 2924 y(char)h(*ascii;)332 b(/*)47 b(malloced)f(*/)525 -3028 y(char)h(*partial;)236 b(/*)47 b(malloced)f(too)h(*/)525 -3132 y(char)g(*textinfo;)188 b(/*)47 b(information)e(about)h(text)h -(placement)e(*/)525 3236 y(char)i(*encoding;)188 b(/*)47 -b(code)g(name,)f(filled)g(by)i(encoding)d(engine)h(*/)525 -3339 y(int)h(width,)f(height;)g(/*)h(output)f(units)h(*/)525 -3443 y(int)g(xoff,)g(yoff;)189 b(/*)47 b(output)f(units)h(*/)525 -3547 y(int)g(margin;)380 b(/*)47 b(output)f(units)h(*/)525 -3651 y(double)f(scalef;)237 b(/*)47 b(requested)f(scaling)f(for)i -(barcode)f(*/)525 3754 y(int)h(error;)428 b(/*)47 b(an)h(errno-like)d -(value,)h(in)h(case)f(of)i(failure)d(*/)334 3858 y(};)219 -3975 y Fl(The)e(exact)i(meaning)e(of)g(eac)m(h)i(\014eld)d(and)h(the)g -(v)-5 b(arious)43 b(\015ags)g(implemen)m(ted)f(are)i(describ)s(ed)e(in) -g(the)94 4074 y(follo)m(wing)29 b(sections.)219 4191 -y(Ev)m(en)38 b(though)f(y)m(ou)h(w)m(on't)g(usually)d(need)i(to)h(act)h -(on)e(the)h(con)m(ten)m(ts)h(of)f(this)e(structure,)j(some)f(of)g(the) -94 4290 y(functions)25 b(in)f(the)i(library)d(receiv)m(e)k(argumen)m -(ts)e(that)i(are)f(directly)e(related)i(to)g(one)g(or)g(more)f(of)h -(these)g(\014elds.)94 4524 y Fk(2.1)69 b(The)44 b(Fields)94 -4715 y Fj(int)30 b(flags;)574 4815 y Fl(The)42 b(\015ags)g(are,)j(as)d -(y)m(ou)g(ma)m(y)g(susp)s(ect,)j(mean)m(t)d(to)h(sp)s(ecify)d(the)i -(exact)h(b)s(eha)m(viour)e(of)h(the)574 4914 y(library)-8 -b(.)37 b(They)22 b(are)h(often)h(passed)e(as)h(an)g(argumen)m(t)g(to)h -Fg(b)-5 b(ar)g(c)g(o)g(de)32 b Fl(functions)21 b(and)i(are)g(discussed) -574 5014 y(in)30 b(the)g(next)h(section.)94 5147 y Fj(char)f(*ascii;)94 -5247 y(char)g(*partial;)94 5347 y(char)g(*textinfo;)94 -5446 y(char)g(*encoding;)574 5546 y Fl(These)41 b(\014elds)f(are)h(in)m -(ternally)e(managed)i(b)m(y)g(the)h(library)-8 b(,)41 -b(and)g(y)m(ou)g(are)h(not)f(exp)s(ected)g(to)574 5645 -y(touc)m(h)31 b(them)g(if)e(y)m(ou)i(use)f(the)h(pro)m(vided)d(API.)j -(All)e(of)h(them)h(are)g(allo)s(cated)f(with)f Fg(mal)5 -b(lo)-5 b(c)p Fl(.)p eop -%%Page: 2 3 -2 2 bop 94 -116 a Fl(Chapter)30 b(2:)41 b(The)30 b(Underlying)e(Data)k -(Structure)2012 b(2)94 365 y Fj(int)30 b(width;)94 465 -y(int)g(height;)574 565 y Fl(They)i(sp)s(ecify)e(the)i(width)d(and)i -(heigh)m(t)h(of)g(the)f Fg(active)39 b Fl(barco)s(de)31 -b(region)g(\(i.e.,)i(excluding)d(the)574 664 y(white)21 -b(margin\),)i(in)d(the)i(units)e(used)h(to)h(create)i(output)d(data)h -(\(for)g(p)s(ostscript)e(they)i(are)g(p)s(oin)m(ts,)574 -764 y(1/72th)33 b(of)d(an)g(inc)m(h,)g(0.352)j(mm\).)40 -b(The)30 b(\014elds)f(can)i(b)s(e)f(either)g(assigned)f(to)j(in)d(the)h -(structure)574 863 y(or)37 b(via)e Fg(Bar)-5 b(c)g(o)g(de)p -1161 863 28 4 v 36 w(Position\(\))p Fl(,)39 b(at)e(y)m(our)f(c)m -(hoice.)59 b(If)35 b(either)h(v)-5 b(alue)35 b(or)h(b)s(oth)g(are)g -(left)g(to)h(their)574 963 y(default)c(v)-5 b(alue)33 -b(of)g(zero,)i(the)e(output)g(engine)g(will)d(assign)j(default)f(v)-5 -b(alues)33 b(according)g(to)h(the)574 1063 y(sp)s(eci\014ed)g(scaling)f -(factor.)55 b(If)35 b(the)g(sp)s(eci\014ed)e(width)g(is)h(bigger)g -(than)h(needed)f(\(according)h(to)574 1162 y(the)g(scaling)f(factor\),) -j(the)d(output)g(barco)s(de)h(will)c(b)s(e)j(cen)m(tered)i(in)d(its)h -(requested)g(region.)52 b(If)574 1262 y(either)27 b(the)h(width)d(of)i -(the)h(heigh)m(t)f(are)h(to)s(o)g(small)d(for)i(the)h(sp)s(eci\014ed)d -(scale)j(factor,)h(the)e(output)574 1362 y(bar)j(co)s(de)h(will)d -(expand)h(symmetrically)g(around)g(the)i(requested)f(region.)94 -1513 y Fj(int)g(xoff;)94 1612 y(int)g(yoff;)574 1738 -y Fl(The)53 b(\014elds)f(sp)s(ecify)g(o\013set)j(from)e(the)g(co)s -(ordinate)h(origin)e(of)h(the)h(output)f(engine)g(\(for)574 -1838 y(p)s(ostscript,)46 b(p)s(osition)c(0,0)i(is)f(the)g(lo)m(w)m(er)h -(left)f(corner)h(of)f(the)h(page\).)81 b(The)43 b(\014elds)f(can)i(b)s -(e)574 1937 y(either)36 b(assigned)e(to)j(in)d(the)i(structure)f(or)g -(via)g Fg(Bar)-5 b(c)g(o)g(de)p 2572 1937 V 36 w(Position\(\))p -Fl(,)39 b(at)d(y)m(our)f(c)m(hoice.)57 b(The)574 2037 -y(o\013set)24 b(sp)s(eci\014es)d(where)h(the)g(white)g(margin)f(b)s -(egins,)h(not)h(where)f(the)g(\014rst)g(bar)g(will)d(b)s(e)j(prin)m -(ted.)574 2136 y(T)-8 b(o)31 b(prin)m(t)e(real)h(ink)f(to)j(the)e(sp)s -(eci\014ed)f(p)s(osition)f(y)m(ou)j(should)d(set)j Fg(mar)-5 -b(gin)39 b Fl(to)31 b(0.)94 2288 y Fj(int)f(margin;)574 -2387 y Fl(The)36 b(white)g(margin)f(that)j(will)33 b(b)s(e)j(left)g -(around)g(the)h(prin)m(ted)e(area)i(of)g(the)f(bar)g(co)s(de.)59 -b(The)574 2487 y(same)37 b(margin)e(is)g(applied)f(to)j(all)e(sides)g -(of)h(the)g(prin)m(ted)f(area.)59 b(The)35 b(default)g(v)-5 -b(alue)36 b(for)g(the)574 2587 y(margin)30 b(is)f(de\014ned)g(in)g(`)p -Fj(barcode.h)p Fl(')g(as)h Fj(BARCODE_DEFAULT_MARGIN)25 -b Fl(\(10\).)94 2738 y Fj(double)k(scalef;)574 2837 y -Fl(The)j(enlarge)f(or)h(shrink)d(v)-5 b(alue)31 b(for)g(the)h(bar)f(co) -s(de)h(o)m(v)m(er)h(its)e(default)g(dimension.)42 b(The)31 -b Fg(width)574 2937 y Fl(and)j Fg(sc)-5 b(alef)54 b Fl(\014elds)33 -b(in)m(teract)h(deeply)f(in)g(the)h(creation)h(of)f(the)g(output,)h -(and)f(a)g(complete)h(de-)574 3037 y(scription)29 b(of)i(the)f(issues)f -(app)s(ears)h(later)g(in)f(this)g(section.)94 3188 y -Fj(int)h(error;)574 3288 y Fl(The)g(\014eld)f(is)h(used)f(when)h(a)g -Fg(b)-5 b(ar)g(c)g(o)g(de)40 b Fl(function)29 b(fails)g(to)i(host)g(an) -f Fj(errno)p Fl(-lik)m(e)f(in)m(teger)h(v)-5 b(alue.)94 -3515 y Ff(Use)42 b(of)f(the)g Fe(width)50 b Ff(and)41 -b Fe(sc)-6 b(alef)64 b Ff(\014elds.)219 3700 y Fl(A)29 -b(width)f(unit)f(is)h(the)i(width)d(of)i(the)h(thinnest)d(bar)i(and/or) -g(space)h(in)d(the)j(c)m(hosen)f(co)s(de;)h(it)f(defaults)f(to)94 -3800 y(1)j(p)s(oin)m(t)f(if)f(the)i(output)e(is)h(p)s(ostscript)f(or)h -(encapsulated)g(p)s(ostscript.)219 3926 y(Either)j(or)h(b)s(oth)g(the)g -(co)s(de)h(width)d(and)i(the)g(scale)h(factor)g(can)g(b)s(e)e(left)h -(unsp)s(eci\014ed)e(\(i.e.,)k(zero\).)53 b(The)94 4026 -y(library)28 b(deals)i(with)f(defaults)h(in)f(the)h(follo)m(wing)f(w)m -(a)m(y:)94 4178 y Fg(Both)34 b(unsp)-5 b(e)g(ci\014e)g(d)574 -4277 y Fl(If)26 b(b)s(oth)f(the)h(width)e(and)h(the)h(scale)g(factor)g -(are)g(unsp)s(eci\014ed,)f(the)h(scale)g(factor)g(will)d(default)i(to) -574 4377 y(1.0)31 b(and)e(the)h(width)e(is)g(calculated)i(according)f -(to)i(the)e(actual)h(width)e(of)i(the)g(bar)f(co)s(de)g(b)s(eing)574 -4477 y(prin)m(ted.)94 4628 y Fg(Width)34 b(unsp)-5 b(e)g(ci\014e)g(d) -574 4728 y Fl(If)30 b(the)h(width)e(is)g(not)i(sp)s(eci\014ed,)d(it)i -(is)g(calculated)g(according)g(to)i(the)e(v)-5 b(alues)30 -b(of)g Fg(sc)-5 b(alef)p Fl(.)94 4879 y Fg(Sc)g(ale)34 -b(factor)f(unsp)-5 b(e)g(ci\014e)g(d)574 4978 y Fl(If)32 -b(the)h(scale)f(factor)i(is)d(not)i(sp)s(eci\014ed,)e(it)h(will)d(b)s -(e)j(c)m(hosen)h(so)f(that)h(the)g(generated)g(bar)f(co)s(de)574 -5078 y(exactly)g(\014ts)e(the)g(sp)s(eci\014ed)f(width.)94 -5229 y Fg(Both)34 b(sp)-5 b(e)g(ci\014e)g(d)574 5329 -y Fl(The)31 b(co)s(de)g(will)d(b)s(e)i(prin)m(ted)g(inside)e(the)j(sp)s -(eci\014ed)f(region)g(according)h(to)g(the)g(sp)s(eci\014ed)f(scale)574 -5429 y(factor.)48 b(It)33 b(will)d(b)s(e)h(aligned)h(to)h(the)f(left.) -47 b(If,)33 b(ho)m(w)m(ev)m(er,)h(the)f(c)m(hosen)g(width)e(is)g(to)s -(o)i(small)e(for)574 5528 y(the)f(sp)s(eci\014c)e(bar)h(co)s(de)h(and)e -(scaling)h(factor,)h(then)f(the)h(co)s(de)g(will)c(extend)k -(symmetrically)d(to)574 5628 y(the)k(left)f(and)g(to)h(the)g(righ)m(t)f -(of)g(the)h(c)m(hosen)g(region.)p eop -%%Page: 3 4 -3 3 bop 94 -116 a Fl(Chapter)30 b(3:)41 b(The)30 b(Flags)2872 -b(3)94 365 y Fk(2.2)69 b(The)44 b(In)l(termediate)j(Represen)l(tation) -219 565 y Fl(The)23 b(enco)s(ding)g(functions)f(prin)m(t)g(their)g -(output)h(in)m(to)h(the)g Fj(partial)d Fl(and)i Fj(texinfo)f -Fl(\014elds)g(of)h(the)h(barco)s(de)94 664 y(data)g(structure.)37 -b(Those)23 b(\014elds,)g(together)h(with)d(p)s(osition)g(information,)h -(are)h(then)f(used)g(to)i(generate)g(actual)94 764 y(output.)41 -b(This)28 b(is)i(an)g(informal)e(description)h(of)h(the)h(in)m -(termediate)f(format.)219 905 y(The)38 b(\014rst)g(c)m(har)h(in)f -Fj(partial)f Fl(tells)g(ho)m(w)i(m)m(uc)m(h)g(extra)g(space)h(to)f(add) -f(to)i(the)f(left)f(of)h(the)g(bars.)65 b(F)-8 b(or)94 -1005 y(EAN-13,)33 b(it)d(is)f(used)h(to)h(lea)m(v)m(e)h(space)f(to)g -(prin)m(t)e(the)i(\014rst)f(digit,)f(other)i(co)s(des)f(ma)m(y)h(ha)m -(v)m(e)h('0')f(for)g(no-extra-)94 1104 y(space-needed.)219 -1245 y(The)23 b(next)h(c)m(haracters)i(are)e(alternating)f(bars)g(and)h -(spaces,)h(as)g(m)m(ultiples)c(of)j(the)g(base)g(dimension)d(whic)m(h) -94 1345 y(is)35 b(1)g(unless)f(the)i(co)s(de)f(is)f(rescaled.)56 -b(Rescaling)34 b(is)h(calculated)g(as)g(the)h(ratio)f(from)g(the)h -(requested)f(width)94 1445 y(and)e(the)h(calculated)f(width.)48 -b(Digits)33 b(represen)m(t)g(bar/space)h(dimensions.)47 -b(Lo)m(w)m(er-case)35 b(letters)f(represen)m(t)94 1544 -y(those)d(bars)f(that)h(should)e(extend)i(lo)m(w)m(er)f(than)h(the)f -(others:)41 b('a')32 b(is)d(equiv)-5 b(alen)m(t)30 b(to)h('1',)h('b')f -(is)e('2')i(and)f(so)h(on)94 1644 y(up)e(to)h('i')g(whic)m(h)e(is)g -(equiv)-5 b(alen)m(t)29 b(to)i('9'.)41 b(Other)29 b(letters)h(will)d(b) -s(e)i(used)g(for)g(enco)s(ding-sp)s(eci\014c)f(meanings,)h(as)94 -1743 y(so)s(on)i(as)f(I)g(implemen)m(t)f(them.)219 1885 -y(The)35 b Fj(textinfo)e Fl(string)h(is)h(made)g(up)f(of)i(\014elds)e -Fj(\045lf:\045lf:\045c)e Fl(separated)k(b)m(y)g(blank)e(space.)56 -b(The)35 b(\014rst)94 1984 y(in)m(teger)f(is)e(the)h(x)g(p)s(osition)e -(of)i(the)h(c)m(haracter,)h(the)e(second)g(is)f(the)i(fon)m(t)f(size)g -(\(b)s(efore)g(rescaling\))f(and)h(the)94 2084 y(c)m(har)e(item)f(is)g -(the)g(c)m(haracter)i(to)f(b)s(e)f(prin)m(ted.)219 2225 -y(Both)39 b(the)g Fj(partial)d Fl(and)i Fj(textinfo)f -Fl(strings)g(ma)m(y)i(include)d(\\)p Fj(-)p Fl(")j(or)g(\\)p -Fj(+)p Fl(")g(as)g(sp)s(ecial)e(c)m(haracters)j(\(in)94 -2325 y Fj(textinfo)25 b Fl(the)j(c)m(har)f(should)e(b)s(e)i(a)g -(stand-alone)g(w)m(ord\).)40 b(They)26 b(state)j(where)d(the)i(text)g -(should)d(b)s(e)h(prin)m(ted:)94 2424 y(b)s(elo)m(w)34 -b(the)g(bars)f(\(\\)p Fj(-)p Fl(",)j(default\))e(or)g(ab)s(o)m(v)m(e)h -(the)f(bars.)51 b(This)32 b(is)h(used,)i(for)e(example,)i(to)g(prin)m -(t)e(the)h(add-5)94 2524 y(and)27 b(add-2)g(co)s(des)g(to)h(the)f(righ) -m(t)f(of)i(UPC)e(or)h(EAN)g(co)s(des)g(\(the)h(add-5)f(extension)g(is)f -(mostly)g(used)g(in)g(ISBN)94 2623 y(co)s(des\).)94 2939 -y Fi(3)81 b(The)53 b(Flags)219 3213 y Fl(The)30 b(follo)m(wing)f -(\015ags)h(are)h(supp)s(orted)e(b)m(y)h(v)m(ersion)g(0.98)i(of)e(the)h -(library:)94 3387 y Fj(BARCODE_ENCODING_MASK)574 3487 -y Fl(The)f(mask)h(is)e(used)h(to)h(extract)h(the)e(enco)s(ding-t)m(yp)s -(e)g(iden)m(ti\014er)f(from)h(the)g Fg(\015ags)39 b Fl(\014eld.)94 -3653 y Fj(BARCODE_EAN)94 3753 y(BARCODE_UPC)94 3852 y(BARCODE_ISBN)94 -3952 y(BARCODE_128B)94 4051 y(BARCODE_128C)94 4151 y(BARCODE_128)94 -4251 y(BARCODE_128RAW)94 4350 y(BARCODE_39)94 4450 y(BARCODE_I25)94 -4550 y(BARCODE_CBR)94 4649 y(BARCODE_MSI)94 4749 y(BARCODE_PLS)94 -4848 y(BARCODE_93)574 4948 y Fl(The)d(curren)m(tly)f(supp)s(orted)g -(enco)s(ding)g(t)m(yp)s(es:)52 b(EAN)36 b(\(13)i(digits,)e(8)h(digits,) -f(13)h Fj(+)f Fl(2)g(add-on)574 5048 y(and)26 b(13)i -Fj(+)e Fl(5)h(add-on\),)g(UPC)f(\(UPC-A,)i(UPC-E,)e(UPC-A)h(with)e(2)i -(or)f(5)h(digit)f(add-on\),)h(ISBN)574 5147 y(\(with)e(or)f(without)g -(the)i(5-digit)e(add-on\),)i(CODE128-B)h(\(the)e(whole)g(set)g(of)g -(prin)m(table)e(ASCI)s(I)574 5247 y(c)m(haracters\),)36 -b(CODE128-C)d(\(t)m(w)m(o)i(digits)c(enco)s(ded)h(b)m(y)h(eac)m(h)h -(barco)s(de)e(sym)m(b)s(ol\),)h(CODE128)574 5347 y(\(all)41 -b(ASCI)s(I)f(v)-5 b(alues\),)44 b(a)e(\\ra)m(w-input")f(pseudo-co)s(de) -h(that)g(generates)h(CODE128)f(output,)574 5446 y(CODE39)32 -b(\(alphan)m(umeric\),)e Fj(")p Fl(in)m(terlea)m(v)m(ed)i(2)f(of)h(5)p -Fj(")f Fl(\(n)m(umeric\),)g(Co)s(dabar)f(\(n)m(umeric)g(plus)g(a)574 -5546 y(few)36 b(sym)m(b)s(ols\),)g(MSI)f(\(n)m(umeric\))g(and)g -(Plessey)g(\(hex)g(digits\).)55 b(See)36 b(Chapter)f(6)h([Supp)s(orted) -574 5645 y(Enco)s(dings],)30 b(page)h(7.)p eop -%%Page: 4 5 -4 4 bop 94 -116 a Fl(Chapter)30 b(4:)41 b(F)-8 b(unctions)30 -b(Exp)s(orted)g(b)m(y)g(the)h(Library)1871 b(4)94 365 -y Fj(BARCODE_ANY)574 465 y Fl(This)27 b(sp)s(ecial)g(enco)s(ding)g(t)m -(yp)s(e)h(\(represen)m(ted)h(b)m(y)f(a)h(v)-5 b(alue)27 -b(of)i(zero,)h(so)e(it)g(will)d(b)s(e)j(the)g(default\))574 -565 y(tells)33 b(the)g(enco)s(ding)f(pro)s(cedure)g(to)h(lo)s(ok)g(for) -g(the)g(\014rst)f(enco)s(ding)g(t)m(yp)s(e)i(that)f(can)h(deal)e(with) -574 664 y(a)44 b(textual)f(string.)77 b(Therefore,)46 -b(a)d(11-digit)f(co)s(de)h(will)e(b)s(e)h(prin)m(ted)f(as)i(UPC)g(\(as) -g(w)m(ell)f(as)574 764 y(6-digit,)48 b(11)p Fj(+)p Fl(2)e(and)e(11)p -Fj(+)p Fl(5\),)49 b(a)c(12-digit)g(\(or)g(7-digit,)i(or)e(12)p -Fj(+)p Fl(2)h(or)e(12)p Fj(+)p Fl(5\))i(as)f(EAN13,)k(an)574 -863 y(ISBN)39 b(co)s(de)f(\(with)g(or)g(without)f(h)m(yphens,)i(with)e -(or)i(without)e(add-5\))i(will)d(b)s(e)h(enco)s(ded)h(in)574 -963 y(its)e(EAN13)i(represen)m(tation,)g(an)e(ev)m(en)h(n)m(um)m(b)s -(er)e(of)i(digits)e(is)g(enco)s(ded)h(using)f(CODE128C)574 -1063 y(and)45 b(a)h(generic)f(string)f(is)h(enco)s(ded)g(using)f -(CODE128B.)j(Since)d(co)s(de-39)j(o\013ers)e(a)h(m)m(uc)m(h)574 -1162 y(larger)38 b(represen)m(tation)f(for)h(the)f(same)h(text)h -(string,)f(co)s(de128-b)h(is)e(preferred)f(o)m(v)m(er)j(co)s(de39)574 -1262 y(for)31 b(alphan)m(umeric)d(strings.)94 1411 y -Fj(BARCODE_NO_ASCII)574 1510 y Fl(Instructs)f(the)h(engine)e(not)i(to)g -(prin)m(t)e(the)i(ascii)e(string)h(on)g(output.)39 b(By)28 -b(default)e(the)i(bar)f(co)s(de)574 1610 y(is)j(accompanied)g(with)f -(an)i(ascii)e(v)m(ersion)h(of)h(the)f(text)i(it)d(enco)s(des.)94 -1759 y Fj(BARCODE_NO_CHECKSUM)574 1858 y Fl(Instructs)j(the)h(engine)f -(not)h(to)g(add)f(the)h(c)m(hec)m(ksum)g(c)m(haracter)h(to)f(the)g -(output.)47 b(Not)33 b(all)f(the)574 1958 y(enco)s(ding)23 -b(t)m(yp)s(es)g(can)h(drop)f(the)h(c)m(hec)m(ksum;)i(those)e(where)f -(the)h(c)m(hec)m(ksum)g(is)f(mandatory)g(\(lik)m(e)574 -2058 y(EAN)31 b(and)f(UPC\))g(just)g(ignore)g(the)h(\015ag.)94 -2206 y Fj(BARCODE_OUTPUT_MASK)574 2306 y Fl(The)f(mask)h(is)e(used)h -(to)h(extract)h(the)e(output-t)m(yp)s(e)h(iden)m(ti\014er)d(from)i(the) -h Fg(\015ags)38 b Fl(\014eld.)94 2455 y Fj(BARCODE_OUT_PS)94 -2554 y(BARCODE_OUT_EPS)94 2654 y(BARCODE_OUT_PCL)94 2753 -y(BARCODE_OUT_PCL_III)574 2853 y Fl(The)48 b(curren)m(tly)f(supp)s -(orted)f(enco)s(ding)g(t)m(yp)s(es:)76 b(full-page)47 -b(p)s(ostscript)f(and)h(encapsulated)574 2953 y(p)s(ostscript;)h(PCL)41 -b(\(prin)m(t)g(command)i(language,)j(for)c(HP)g(prin)m(ters\))f(and)h -(PCL-I)s(I)s(I)e(\(same)574 3052 y(as)31 b(PCL,)f(but)g(uses)g(a)g(fon) -m(t)h(not)g(a)m(v)-5 b(ailable)30 b(on)g(older)f(prin)m(ters\).)94 -3201 y Fj(BARCODE_OUT_NOHEADERS)574 3301 y Fl(The)f(\015ag)h(instructs) -d(the)j(prin)m(ting)d(engine)h(not)i(to)f(prin)m(t)f(the)h(header)g -(and)g(fo)s(oter)h(part)e(of)i(the)574 3400 y(\014le.)40 -b(This)29 b(mak)m(es)i(sense)f(for)f(the)i(p)s(ostscript)d(engine)i -(but)f(migh)m(t)h(not)h(mak)m(e)g(sense)f(for)g(other)574 -3500 y(engines;)k(suc)m(h)f(other)h(engines)e(will)e(silen)m(tly)i -(ignore)g(the)i(\015ag)f(just)g(lik)m(e)f(the)h(PCL)f(bac)m(k-end)574 -3600 y(do)s(es.)94 3881 y Fi(4)81 b(F)-13 b(unctions)52 -b(Exp)t(orted)h(b)l(y)g(the)g(Library)219 4103 y Fl(The)41 -b(functions)f(included)f(in)h(the)i(barco)s(de)f(library)e(are)j -(declared)f(in)g(the)g(header)h(\014le)e Fj(barcode.h)p -Fl(.)94 4203 y(They)30 b(p)s(erform)f(the)i(follo)m(wing)e(tasks:)94 -4352 y Fj(struct)g(Barcode_Item)e(*Barcode_Create\(char)e(*text\);)574 -4451 y Fl(The)35 b(function)e(creates)j(a)f(new)g(barco)s(de)f(ob)5 -b(ject)36 b(to)f(deal)g(with)e(a)i(sp)s(eci\014ed)e(text)j(string.)53 -b(It)574 4551 y(returns)27 b(NULL)h(in)e(case)j(of)f(failure)e(and)i(a) -g(p)s(oin)m(ter)f(to)h(a)h(barco)s(de)e(data)i(structure)e(in)g(case)i -(of)574 4651 y(success.)94 4799 y Fj(int)h(Barcode_Delete\(struct)25 -b(Barcode_Item)i(*bc\);)574 4899 y Fl(Destro)m(y)32 b(a)f(barco)s(de)f -(ob)5 b(ject.)42 b(Alw)m(a)m(ys)31 b(returns)e(0)h(\(success\))94 -5048 y Fj(int)g(Barcode_Encode\(struct)25 b(Barcode_Item)i(*bc,)i(int)g -(flags\);)574 5147 y Fl(Enco)s(de)h(the)h(text)g(included)d(in)h(the)h -Fg(b)-5 b(c)35 b Fl(ob)5 b(ject.)42 b(V)-8 b(alid)29 -b(\015ags)i(are)f(the)h(enco)s(ding)e(t)m(yp)s(e)h(\(other)574 -5247 y(\015ags)45 b(are)f(ignored\))g(and)g(BAR)m(CODE)p -1994 5247 28 4 v 33 w(NO)p 2166 5247 V 33 w(CHECKSUM)f(\(other)i -(\015ags)f(are)h(silen)m(tly)d(ig-)574 5347 y(nored\);)35 -b(if)e(the)g(\015ag)h(argumen)m(t)g(is)e(zero,)j Fj(bc->flags)c -Fl(will)g(apply)-8 b(.)49 b(The)32 b(function)g(returns)h(0)574 -5446 y(on)h(success)g(and)f(-1)i(in)d(case)j(of)f(error.)51 -b(After)34 b(successful)e(termination)h(the)h(data)g(structure)574 -5546 y(will)21 b(host)i(the)h(description)d(of)j(the)f(bar)g(co)s(de)g -(and)g(its)g(textual)g(represen)m(tation,)i(after)f(a)g(failure)574 -5645 y(the)31 b Fj(error)e Fl(\014eld)g(will)f(include)g(the)i(reason)h -(of)f(the)h(failure.)p eop -%%Page: 5 6 -5 5 bop 94 -116 a Fl(Chapter)30 b(5:)41 b(The)30 b Fg(b)-5 -b(ar)g(c)g(o)g(de)40 b Fl(fron)m(tend)30 b(program)2063 -b(5)94 365 y Fj(int)30 b(Barcode_Print\(struct)25 b(Barcode_Item)i -(*bc,)i(FILE)g(*f,)h(int)f(flags\);)574 465 y Fl(Prin)m(t)39 -b(the)g(bar)g(co)s(de)g(describ)s(ed)e(b)m(y)i Fj(bc)g -Fl(to)h(the)f(sp)s(eci\014ed)f(\014le.)66 b(V)-8 b(alid)38 -b(\015ags)h(are)h(the)f(out-)574 565 y(put)25 b(t)m(yp)s(e,)h -Fj(BARCODE_NO_ASCII)21 b Fl(and)j Fj(BARCODE_OUT_NOHEADERS)p -Fl(,)d(other)k(\015ags)g(are)h(ignored.)574 664 y(If)39 -b(an)m(y)h(of)f(these)h(\015ags)g(is)e(zero,)43 b(it)c(will)d(b)s(e)j -(inherited)e(from)i Fj(bc->flags)d Fl(whic)m(h)i(therefore)574 -764 y(tak)m(es)f(precedence.)57 b(The)35 b(function)g(returns)f(0)i(on) -f(success)h(and)f(-1)h(in)e(case)j(of)f(error)f(\(with)574 -863 y Fj(bc->error)28 b Fl(set)j(accordingly\).)40 b(In)29 -b(case)j(of)e(success,)h(the)f(bar)g(co)s(de)g(is)f(prin)m(ted)g(to)i -(the)f(sp)s(ec-)574 963 y(i\014ed)f(\014le,)h(whic)m(h)f(w)m(on't)i(b)s -(e)f(closed)g(after)h(use.)94 1115 y Fj(int)f(Barcode_Position\(struct) -24 b(Barcode_Item)j(*bc,)i(int)h(wid,)f(int)g(hei,)h(int)f(xoff,)g(int) -h(yoff,)94 1215 y(double)f(scalef\);)574 1315 y Fl(The)h(function)f(is) -h(a)h(shortcut)f(to)h(assign)f(v)-5 b(alues)29 b(to)j(the)e(data)h -(structure.)94 1467 y Fj(int)f(Barcode_Encode_and_Print)o(\(cha)o(r)24 -b(*text,)29 b(FILE)g(*f,)h(int)f(wid,)g(int)h(hei,)f(int)h(xoff,)f(int) -94 1567 y(yoff,)g(int)h(flags\);)574 1666 y Fl(The)38 -b(function)e(deals)h(with)g(the)h(whole)f(life)f(of)i(the)g(barco)s(de) -g(ob)5 b(ject)39 b(b)m(y)e(calling)g(the)h(other)574 -1766 y(functions;)30 b(it)g(uses)g(all)f(the)h(sp)s(eci\014ed)f -(\015ags.)94 1918 y Fj(int)h(Barcode_Version\(char)25 -b(*versionname\);)574 2018 y Fl(Returns)g(the)g(curren)m(t)f(v)m -(ersion)h(as)g(an)g(in)m(teger)g(n)m(um)m(b)s(er)f(of)h(the)g(form)f -(ma)5 b(jor)25 b(*)h(10000)h Fj(+)d Fl(minor)574 2118 -y(*)k(100)h Fj(+)e Fl(release.)40 b(Therefore,)28 b(v)m(ersion)f -(1.03.5)i(will)c(b)s(e)i(returned)f(as)h(10305)j(and)d(v)m(ersion)f -(0.53)574 2217 y(as)i(5300.)41 b(If)27 b(the)h(argumen)m(t)f(is)f -(non-n)m(ull,)g(it)h(will)e(b)s(e)h(used)h(to)h(return)e(the)h(v)m -(ersion)g(n)m(um)m(b)s(er)f(as)574 2317 y(a)h(string.)39 -b(Note)28 b(that)f(the)f(same)h(information)e(is)h(a)m(v)-5 -b(ailable)26 b(from)g(t)m(w)m(o)i(prepro)s(cessor)d(macros:)574 -2416 y Fj(BARCODE_VERSION)i Fl(\(the)k(string\))e(and)h -Fj(BARCODE_VERSION_INT)25 b Fl(\(the)31 b(in)m(teger)g(n)m(um)m(b)s -(er\).)94 2705 y Fi(5)81 b(The)53 b Fd(b)-8 b(ar)g(c)g(o)g(de)65 -b Fi(fron)l(tend)51 b(program)219 2938 y Fl(The)26 b -Fc(barco)s(de)g Fl(program)g(is)f(a)h(fron)m(t-end)g(to)h(access)h -(some)e(features)h(of)f(the)g(library)e(from)i(the)g(command)94 -3037 y(line.)63 b(It)38 b(is)g(able)f(to)i(read)f(user)g(supplied)d -(strings)i(from)h(the)g(command)g(line)e(or)j(a)f(data)h(\014le)e -(\(standard)94 3137 y(input)29 b(b)m(y)h(default\))g(and)g(enco)s(de)g -(all)g(of)g(them.)94 3401 y Fk(5.1)69 b(The)44 b(Command)h(Line)219 -3587 y Fc(barco)s(de)30 b Fl(accepts)i(the)e(follo)m(wing)f(options:)94 -3741 y Fj(--help)g(or)h(-h)574 3840 y Fl(Prin)m(t)g(a)h(usage)g -(summary)e(and)h(exit.)94 3993 y Fj(-i)g(filename)574 -4092 y Fl(Iden)m(tify)35 b(a)h(\014le)f(where)g(strings)f(to)j(b)s(e)e -(enco)s(ded)g(are)h(read)f(from.)56 b(If)36 b(missing)d(\(and)i(if)g -Fj(-b)g Fl(is)574 4192 y(not)29 b(used\))f(it)g(defaults)f(to)i -(standard)e(input.)38 b(Eac)m(h)29 b(data)g(line)e(of)h(the)h(input)d -(\014le)i(will)d(b)s(e)j(used)574 4292 y(to)k(create)g(one)e(barco)s -(de)g(output.)94 4444 y Fj(-o)g(filename)574 4544 y Fl(Output)g -(\014le.)40 b(It)30 b(defaults)f(to)j(standard)d(output.)94 -4696 y Fj(-b)h(string)66 b Fl(Sp)s(ecify)32 b(a)j(single)d(\\barco)s -(de")i(string)f(to)h(b)s(e)g(enco)s(ded.)50 b(The)33 -b(option)g(can)h(b)s(e)f(used)g(m)m(ultiple)574 4796 -y(times)j(in)e(order)h(to)h(enco)s(de)g(m)m(ultiple)d(strings)i(\(this) -f(will)f(result)i(in)f(m)m(ulti-page)h(p)s(ostscript)574 -4895 y(output)22 b(or)g(a)g(table)g(of)g(barco)s(des)g(if)f -Fj(-t)g Fl(is)g(sp)s(eci\014ed\).)37 b(The)21 b(strings)g(m)m(ust)h -(matc)m(h)h(the)f(enco)s(ding)574 4995 y(c)m(hosen;)29 -b(if)c(it)g(do)s(esn't)h(matc)m(h)h(the)f(program)g(will)d(prin)m(t)i -(a)h(w)m(arning)f(to)i Fj(stderr)d Fl(and)h(generate)574 -5095 y(\\blank")44 b(output)g(\(although)h(not)f(zero-length\).)84 -b(Please)44 b(note)h(that)g(a)g(string)e(including)574 -5194 y(spaces)31 b(or)g(other)f(sp)s(ecial)f(c)m(haracters)j(m)m(ust)e -(b)s(e)g(prop)s(erly)e(quoted.)94 5347 y Fj(-e)i(encoding)574 -5446 y Fc(enco)s(ding)j Fl(is)e(the)i(name)f(of)h(the)g(c)m(hosen)g -(enco)s(ding)e(format)i(b)s(eing)e(used.)46 b(It)32 b(defaults)g(to)h -(the)574 5546 y(v)-5 b(alue)41 b(of)f(the)h(en)m(vironmen)m(t)g(v)-5 -b(ariable)39 b Fj(BARCODE_ENCODING)d Fl(or)41 b(to)g(auto)h(detection)f -(if)f(the)574 5645 y(en)m(vironmen)m(t)30 b(is)g(also)g(unset.)p -eop -%%Page: 6 7 -6 6 bop 94 -116 a Fl(Chapter)30 b(6:)41 b(Supp)s(orted)29 -b(Enco)s(dings)2417 b(6)94 365 y Fj(-g)30 b(geometry)574 -465 y Fl(The)e(geometry)g(argumen)m(t)g(is)f(of)h(the)f(form)g(\\[)p -Fj(<)p Fg(width)p Fj(>)i(x)f(<)p Fg(height)p Fj(>)p Fl(])f([)p -Fj(+)h(<)p Fg(xmar)-5 b(gin)p Fj(>)28 b(+)f(<)p Fg(ymar-)574 -565 y(gin)p Fj(>)p Fl(]")42 b(\(with)f(no)h(in)m(terv)m(ening)f -(spaces\).)75 b(Unsp)s(eci\014ed)40 b(margin)h(v)-5 b(alues)41 -b(will)e(result)i(in)f(no)574 664 y(margin;)31 b(unsp)s(eci\014ed)d -(size)j(results)e(in)h(default)g(size.)42 b(The)30 b(sp)s(eci\014ed)f -(v)-5 b(alues)30 b(represen)m(t)h(prin)m(t)574 764 y(p)s(oin)m(ts)e(b)m -(y)g(default,)g(and)g(can)g(b)s(e)g(inc)m(hes,)g(millimeters)e(or)i -(other)h(units)e(according)h(to)h(the)g Fj(-u)574 863 -y Fl(option)j(or)h(the)g Fj(BARCODE_UNIT)c Fl(en)m(vironmen)m(t)j(v)-5 -b(ariable.)49 b(The)33 b(argumen)m(t)h(is)e(used)h(to)h(place)574 -963 y(the)g(prin)m(tout)f(co)s(de)h(on)f(the)h(page.)51 -b(Note)35 b(that)f(an)f(additional)f(white)g(margin)h(of)h(10)g(p)s -(oin)m(ts)574 1063 y(is)e(added)f(to)i(the)g(prin)m(tout.)45 -b(If)31 b(the)i(option)f(is)f(unsp)s(eci\014ed,)f Fj(BARCODE_GEOMETRY)e -Fl(is)j(lo)s(ok)m(ed)574 1162 y(up)h(in)f(the)h(en)m(vironmen)m(t,)h -(if)e(missing)f(a)j(default)f(size)g(and)g(no)g(margin)f(\(but)h(the)h -(default)e(10)574 1262 y(p)s(oin)m(ts\))f(are)h(used.)94 -1409 y Fj(-t)f(table-geometry)574 1508 y Fl(Used)j(to)g(prin)m(t)e(sev) -m(eral)i(barco)s(des)f(to)i(a)f(single)e(page,)j(this)d(option)h(is)g -(mean)m(t)h(to)h(b)s(e)d(used)h(to)574 1608 y(prin)m(t)e(stic)m(k)m -(ers.)43 b(The)30 b(argumen)m(t)h(is)f(of)h(the)g(form)g(\\)p -Fj(<)p Fg(c)-5 b(olumns)p Fj(>)32 b(x)e(<)p Fg(lines)p -Fj(>)h Fl([)p Fj(+)g(<)p Fg(leftmar)-5 b(gin)p Fj(>)31 -b(+)574 1707 y(<)p Fg(b)-5 b(ottommar)g(gin)p Fj(>)39 -b Fl([)p Fj(-)d(<)p Fg(rightmar)-5 b(gin)p Fj(>)38 b -Fl([)p Fj(-)e(<)p Fg(topmar)-5 b(gin)p Fj(>)p Fl(]]]")39 -b(\(with)c(no)h(in)m(terv)m(ening)f(spaces\);)574 1807 -y(if)42 b(missing,)i(the)f(top)g(and)f(righ)m(t)g(margin)g(will)e -(default)i(to)i(b)s(e)e(the)h(same)g(as)g(the)g(b)s(ottom)574 -1907 y(and)c(left)g(margin.)66 b(The)38 b(margins)g(are)i(sp)s -(eci\014ed)d(in)h(prin)m(t)g(p)s(oin)m(ts)g(or)h(in)e(the)j(c)m(hosen)f -(unit)574 2006 y(\(see)f Fj(-u)d Fl(b)s(elo)m(w\).)59 -b(If)35 b(the)i(option)f(is)f(not)i(sp)s(eci\014ed,)f -Fj(BARCODE_TABLE)d Fl(is)i(lo)s(ok)m(ed)h(up)g(in)f(the)574 -2106 y(en)m(vironmen)m(t,)d(otherwise)f(no)h(table)f(is)g(prin)m(ted)f -(and)h(eac)m(h)i(barco)s(de)f(will)c(get)33 b(its)e(o)m(wn)h(page.)574 -2206 y(The)27 b(size)g(\(but)f(not)h(the)g(p)s(osition\))e(of)j(a)f -(barco)s(de)f(item)h(within)d(a)k(table)e(can)h(also)g(b)s(e)f -(selected)574 2305 y(using)43 b Fj(-g)g Fl(\(see)i Fj(")p -Fl(geometry)p Fj(")g Fl(ab)s(o)m(v)m(e\),)k(without)43 -b(struggling)f(with)h(external)h(and)f(in)m(ternal)574 -2405 y(margins.)71 b(I)40 b(still)e(think)h(managemen)m(t)j(of)f -(geometries)g(in)f(a)h(table)f(is)g(sub)s(optimal,)g(but)g(I)574 -2504 y(can't)32 b(mak)m(e)f(it)f(b)s(etter)h(without)e(in)m(tro)s -(ducing)f(incompatibilities.)94 2651 y Fj(-m)i(margin\(s\))574 -2751 y Fl(Sp)s(eci\014es)21 b(an)g(in)m(ternal)g(margin)g(for)g(eac)m -(h)i(stic)m(k)m(er)g(in)d(the)i(table.)38 b(The)21 b(argumen)m(t)i(is)d -(of)i(the)g(form)574 2850 y(\\)p Fj(<)p Fg(xmar)-5 b(gin)p -Fj(>,<)p Fg(ymar)g(gin)p Fj(>)p Fl(")35 b(and)c(the)g(margin)g(is)g -(applied)e(symmetrically)h(to)i(the)g(stic)m(k)m(er.)45 -b(If)574 2950 y(unsp)s(eci\014ed,)28 b(the)h(en)m(vironmen)m(t)g(v)-5 -b(ariable)28 b Fj(BARCODE_MARGIN)e Fl(is)i(used)h(or)g(a)h(default)e -(in)m(ternal)574 3050 y(margin)i(of)g(10)i(p)s(oin)m(ts)d(is)g(used.)94 -3196 y Fj(-n)384 b Fl(\\Numeric")31 b(output:)40 b(don't)31 -b(prin)m(t)e(the)h(ASCI)s(I)f(form)h(of)g(the)h(co)s(de,)g(only)e(the)i -(bars.)94 3343 y Fj(-c)384 b Fl(No)35 b(c)m(hec)m(ksum)f(c)m(haracter)h -(\(for)f(enco)s(dings)e(that)j(allo)m(w)e(it,)h(lik)m(e)f(co)s(de)h -(39,)h(other)f(co)s(des,)h(lik)m(e)574 3442 y(UPC)c(or)f(EAN,)h(ignore) -f(this)f(option\).)94 3589 y Fj(-E)384 b Fl(Encapsulated)32 -b(p)s(ostscript)f(\(default)h(is)g(normal)f(p)s(ostscript\).)47 -b(When)32 b(the)h(output)f(is)f(gener-)574 3689 y(ated)h(as)e(EPS)g -(only)f(one)i(barco)s(de)f(is)f(enco)s(ded.)94 3835 y -Fj(-P)384 b Fl(PCL)35 b(output.)56 b(Please)36 b(note)g(that)g(the)f(Y) -h(direction)e(go)s(es)i(from)f(top)h(to)g(b)s(ottom)g(for)f(PCL,)574 -3935 y(and)30 b(the)h(origin)e(for)h(an)g(image)h(is)e(the)i(top-left)f -(corner)h(instead)e(of)i(the)f(b)s(ottom-left)94 4081 -y Fj(-p)g(pagesize)574 4181 y Fl(Sp)s(ecify)44 b(a)h(non-default)f -(page)i(size.)85 b(The)45 b(page)h(size)f(can)g(b)s(e)f(sp)s(eci\014ed) -g(in)g(millimeters,)574 4281 y(inc)m(hes)34 b(or)g(plain)e(n)m(um)m(b)s -(ers)g(\(for)i(example:)48 b Fj("210x297mm")p Fl(,)32 -b Fj("8.5x11in")p Fl(,)g Fj("595x842")p Fl(\).)50 b(A)574 -4380 y(page)27 b(sp)s(eci\014cation)d(as)i(n)m(um)m(b)s(ers)e(will)f(b) -s(e)i(in)m(terpreted)g(according)g(to)i(the)f(curren)m(t)f(unit)f(sp)s -(ec-)574 4480 y(i\014cation)33 b(\(see)h Fj(-u)e Fl(b)s(elo)m(w\).)49 -b(If)33 b(libpap)s(er)d(is)i(a)m(v)-5 b(ailable,)33 b(y)m(ou)h(can)f -(also)g(sp)s(ecify)f(the)h(page)h(size)574 4580 y(with)40 -b(its)g(name,)k(lik)m(e)d Fj("A3")e Fl(or)i Fj("letter")e -Fl(\(libpap)s(er)f(is)i(a)h(standard)g(comp)s(onen)m(t)g(of)g(De-)574 -4679 y(bian)d(GNU/Lin)m(ux,)k(but)d(ma)m(y)h(b)s(e)e(missing)f -(elsewhere\).)68 b(The)39 b(default)f(page)i(size)g(is)e(y)m(our)574 -4779 y(system-wide)30 b(default)g(if)f(libpap)s(er)e(is)j(there,)h(A4)g -(otherwise.)94 4925 y Fj(-u)f(unit)162 b Fl(Cho)s(ose)32 -b(the)f(unit)f(used)g(in)g(size)i(sp)s(eci\014cations.)42 -b(Accepted)32 b(v)-5 b(alues)31 b(are)g(\\mm",)i(\\cm",)f(\\in")574 -5025 y(and)37 b(\\pt".)61 b(By)37 b(default,)h(the)f(program)f(will)f -(c)m(hec)m(k)j Fj(BARCODE_UNIT)33 b Fl(in)j(the)h(en)m(vironmen)m(t,) -574 5125 y(and)c(assume)g(p)s(oin)m(ts)g(otherwise)f(\(this)h(b)s(eha)m -(viour)f(is)g(compatible)h(with)f(0.92)j(and)d(previous)574 -5224 y(v)m(ersions.)50 b(If)33 b Fj(-u)g Fl(app)s(ears)g(more)g(than)g -(once,)j(eac)m(h)e(instance)f(will)e(mo)s(di\014ed)h(the)h(b)s(eha)m -(viour)574 5324 y(for)h(the)g(argumen)m(ts)g(at)g(its)f(righ)m(t,)i(as) -f(the)g(command)f(line)f(is)h(pro)s(cesses)g(left)h(to)g(righ)m(t.)50 -b(The)574 5424 y(program)32 b(in)m(ternally)f(w)m(orks)h(with)f(p)s -(oin)m(ts,)h(and)f(an)m(y)i(size)f(is)f(appro)m(ximated)h(to)h(the)f -(nearest)574 5523 y(m)m(ultiple)c(of)j(one)f(p)s(oin)m(t.)40 -b(The)30 b Fj(-u)f Fl(option)h(a\013ect)i Fj(-g)e Fl(\(geometry\),)i -Fj(-t)e Fl(\(table\))h(and)e Fj(-p)h Fl(\(page)574 5623 -y(size\).)p eop -%%Page: 7 8 -7 7 bop 94 -116 a Fl(Chapter)30 b(6:)41 b(Supp)s(orted)29 -b(Enco)s(dings)2417 b(7)94 365 y Fi(6)81 b(Supp)t(orted)51 -b(Enco)t(dings)219 558 y Fl(The)31 b(program)h(enco)s(des)g(text)g -(strings)f(passed)g(either)g(on)h(the)g(command)g(line)e(\(with)g(-b\)) -i(or)g(retriev)m(ed)94 658 y(from)38 b(standard)f(input.)61 -b(The)37 b(text)i(represen)m(tation)f(is)f(in)m(terpreted)g(according)g -(to)i(the)f(follo)m(wing)e(rules.)94 758 y(When)42 b(auto-detection)g -(of)g(the)f(enco)s(ding)f(is)h(enabled)f(\(i.e,)k(no)e(explicit)d(enco) -s(ding)h(t)m(yp)s(e)i(is)e(sp)s(eci\014ed\),)94 857 y(the)c(enco)s -(ding)e(t)m(yp)s(es)h(are)h(scanned)f(to)h(\014nd)d(one)j(that)g(can)f -(digest)g(the)g(text)i(string.)54 b(The)35 b(follo)m(wing)e(list)94 -957 y(of)h(supp)s(orted)e(t)m(yp)s(es)h(is)g(sorted)g(in)g(the)g(same)h -(order)f(the)h(library)d(uses)i(when)f(auto-detecting)k(a)d(suitable)94 -1056 y(enco)s(ding)d(for)g(a)h(string.)94 1193 y Fh(EAN)282 -b Fl(The)36 b(EAN)h(fron)m(tend)f(is)g(similar)d(to)38 -b(UPC;)e(it)g(accepts)i(strings)d(of)i(digits,)g(12)g(or)g(7)f(c)m -(harac-)574 1293 y(ters)c(long.)41 b(Strings)30 b(of)h(13)g(or)g(8)g(c) -m(haracters)i(are)e(accepted)h(if)e(the)h(pro)m(vided)f(c)m(hec)m(ksum) -h(digit)574 1393 y(is)40 b(correct.)73 b(I)40 b(exp)s(ect)i(most)f -(users)e(to)j(feed)e(input)f(without)h(a)h(c)m(hec)m(ksum,)j(though.)71 -b(The)574 1492 y(add-2)36 b(and)g(add-5)g(extension)f(are)h(accepted)i -(for)d(b)s(oth)g(the)i(EAN-13)g(and)e(the)h(EAN-8)h(en-)574 -1592 y(co)s(dings.)42 b(The)30 b(follo)m(wing)f(are)j(example)e(of)h(v) --5 b(alid)29 b(input)g(strings:)41 b(\\)p Fj(123456789012)p -Fl(")28 b(\(EAN-)574 1692 y(13\),)43 b(\\)p Fj(1234567890128)p -Fl(")37 b(\(EAN-13)k(wih)c(c)m(hec)m(ksum\),)43 b(\\)p -Fj(1234567)p Fl(")38 b(\(EAN-8\),)44 b(\\)p Fj(12345670)574 -1791 y(12345)p Fl(")23 b(\(EAN-8)h(with)e(c)m(hec)m(ksum)h(and)g -(add-5\),)i(\\)p Fj(123456789012)45 b(12)p Fl(")23 b(\(EAN-13)i(with)c -(add-)574 1891 y(2\),)32 b(\\)p Fj(123456789012)45 b(12345)p -Fl(")29 b(\(EAN-13)j(with)d(add-5\).)94 2028 y Fh(UPC)284 -b Fl(The)35 b(UPC)g(fron)m(tend)g(accepts)i(only)d(strings)g(made)i(up) -e(of)h(digits)f(\(and,)j(if)d(a)i(supplemen)m(tal)574 -2127 y(enco)s(ding)27 b(is)g(used,)g(a)h(blank)f(to)h(separate)g(it\).) -40 b(It)28 b(accepts)h(strings)d(of)i(11)g(or)g(12)g(digits)f(\(UPC-) -574 2227 y(A\))k(and)f(6)h(or)f(7)h(or)f(8)h(digits)e(\(UPC-E\).)574 -2345 y(The)c(12th)h(digit)e(of)h(UPC-A)g(is)f(the)h(c)m(hec)m(ksum)h -(and)e(is)g(added)h(b)m(y)g(the)g(library)d(if)i(not)i(sp)s(eci\014ed) -574 2445 y(in)k(the)h(input;)e(if)h(it)h(is)f(sp)s(eci\014ed,)f(it)h(m) -m(ust)h(b)s(e)f(the)h(righ)m(t)g(c)m(hec)m(ksum)g(or)g(the)g(co)s(de)g -(is)f(rejected)574 2545 y(as)38 b(in)m(v)-5 b(alid.)59 -b(F)-8 b(or)38 b(UPC-E,)f(6)h(digit)e(are)i(considered)e(to)i(b)s(e)e -(the)i(middle)d(part)i(of)g(the)g(co)s(de,)574 2644 y(a)i(leading)d(0)i -(is)f(assumed)g(and)g(the)h(c)m(hec)m(ksum)g(is)f(added;)k(7)d(digits)e -(are)i(either)f(considered)574 2744 y(the)30 b(initial)d(part)i -(\(leading)g(digit)f(0)i(or)g(1,)g(c)m(hec)m(ksum)g(missing\))e(or)i -(the)f(\014nal)g(part)g(\(c)m(hec)m(ksum)574 2844 y(sp)s(eci\014ed,)f -(leading)g(0)i(assumed\);)g(8)f(digits)f(are)i(considered)e(to)i(b)s(e) -e(the)i(complete)f(co)s(de,)h(with)574 2943 y(leading)k(0)i(or)f(1)g -(and)g(c)m(hec)m(ksum.)55 b(F)-8 b(or)36 b(b)s(oth)f(UPC-A)g(and)f -(UPC-E,)i(a)f(trailing)e(string)h(of)i(2)574 3043 y(digits)30 -b(or)h(5)g(digits)e(is)h(accepted)i(as)f(w)m(ell.)40 -b(Therefore,)31 b(the)g(follo)m(wing)e(are)i(examples)g(of)g(v)-5 -b(alid)574 3142 y(strings)41 b(that)h(can)f(b)s(e)g(enco)s(ded)g(as)h -(UPC:)f(\\)p Fj(01234567890)p Fl(")e(\(UPC-A\))j(\\)p -Fj(012345678905)p Fl(")574 3242 y(\(UPC-A)33 b(with)d(c)m(hec)m -(ksum\),)k(\\)p Fj(012345)p Fl(")d(\(UPC-E\),)i(\\)p -Fj(01234567890)45 b(12)p Fl(")32 b(\(UPC-A,)g(add-2\))574 -3342 y(and)21 b(\\)p Fj(01234567890)45 b(12345)p Fl(")20 -b(\(UPC-A,)i(add-5\),)h(\\)p Fj(0123456)47 b(12)p Fl(")20 -b(\(UPC-E,)i(add-2\).)38 b(Please)574 3441 y(note)24 -b(that)f(when)f(setting)h Fj(BARCODE_ANY)c Fl(to)24 b(auto-detect)h -(the)e(enco)s(ding)f(to)h(b)s(e)f(used,)i(12-digit)574 -3541 y(strings)32 b(and)h(7-digit)f(strings)g(will)e(alw)m(a)m(ys)k(b)s -(e)e(iden)m(ti\014ed)f(as)i(EAN.)h(This)d(b)s(ecause)i(I)f(exp)s(ect) -574 3641 y(most)h(user)f(to)h(pro)m(vide)f(input)e(without)i(a)g(c)m -(hec)m(ksum.)48 b(If)32 b(y)m(ou)h(need)f(to)h(sp)s(ecify)e(UPC-with-) -574 3740 y(c)m(hec)m(ksum)h(as)g(input)d(y)m(ou)i(m)m(ust)g(explicitly) -e(set)j Fj(BARCODE_UPC)c Fl(as)j(a)g(\015ag)h(or)f(use)g -Fj(-e)47 b(upc)30 b Fl(on)574 3840 y(the)h(command)f(line.)94 -3977 y Fh(ISBN)264 b Fl(ISBN)26 b(n)m(um)m(b)s(ers)e(are)i(enco)s(ded)f -(as)h(EAN-13)g(sym)m(b)s(ols,)g(with)e(an)h(optional)g(add-5)g -(trailer.)38 b(The)574 4076 y(ISBN)27 b(fron)m(tend)f(of)h(the)g -(library)e(accepts)j(real)e(ISBN)h(n)m(um)m(b)s(ers)e(and)h(deals)h -(with)e(an)m(y)i(h)m(yphen)574 4176 y(and,)h(if)f(presen)m(t,)h(the)g -(ISBN)f(c)m(hec)m(ksum)i(c)m(haracter)g(b)s(efore)e(enco)s(ding)f -(data.)41 b(V)-8 b(alid)26 b(represen-)574 4276 y(tations)j(for)e(ISBN) -h(strings)e(are)j(for)e(example:)40 b(\\)p Fj(1-56592-292-1)p -Fl(",)25 b(\\)p Fj(3-89721-122-X)p Fl(")h(and)574 4375 -y(\\)p Fj(3-89721-122-X)45 b(06900)p Fl(".)94 4512 y -Fh(co)s(de)31 b(128-B)574 4612 y Fl(This)37 b(enco)s(ding)g(can)h -(represen)m(t)g(all)f(of)h(the)h(prin)m(ting)c(ASCI)s(I)i(c)m -(haracters,)42 b(from)37 b(the)h(space)574 4711 y(\(32\))32 -b(to)g(DEL)e(\(127\).)43 b(The)30 b(c)m(hec)m(ksum)h(digit)e(is)g -(mandatory)i(in)e(this)g(enco)s(ding.)94 4848 y Fh(co)s(de)i(128-C)574 -4948 y Fl(The)h(\\C")g(v)-5 b(ariation)31 b(of)h(Co)s(de-128)h(uses)e -(Co)s(de-128)i(sym)m(b)s(ols)d(to)j(represen)m(t)f(t)m(w)m(o)h(digits)d -(at)j(a)574 5048 y(time)28 b(\(Co)s(de-128)g(is)f(made)g(up)f(of)i(104) -g(sym)m(b)s(ols)e(whose)i(in)m(terpretation)e(is)h(con)m(trolled)g(b)m -(y)g(the)574 5147 y(start)35 b(sym)m(b)s(ol)e(b)s(eing)g(used\).)52 -b(Co)s(de)34 b(128-C)h(is)e(th)m(us)h(the)h(most)f(compact)i(w)m(a)m(y) -f(to)g(represen)m(t)574 5247 y(an)m(y)41 b(ev)m(en)h(n)m(um)m(b)s(er)d -(of)i(digits.)70 b(The)40 b(enco)s(der)g(refuses)g(to)h(deal)f(with)g -(an)g(o)s(dd)g(n)m(um)m(b)s(er)f(of)574 5347 y(digits)24 -b(b)s(ecause)h(the)g(caller)f(is)g(exp)s(ected)h(to)h(pro)m(vide)e -(prop)s(er)f(padding)g(to)j(an)f(ev)m(en)g(n)m(um)m(b)s(er)f(of)574 -5446 y(digits.)38 b(\(Since)23 b(Co)s(de-128)i(includes)d(con)m(trol)j -(sym)m(b)s(ols)d(to)j(switc)m(h)f(c)m(harset,)j(it)c(is)g -(theoretically)574 5546 y(p)s(ossible)29 b(to)j(represen)m(t)f(the)h(o) -s(dd)e(digit)g(as)h(a)g(Co)s(de)g(128-A)i(or)e(128-B)i(sym)m(b)s(ol,)e -(but)f(this)g(to)s(ol)574 5645 y(do)s(esn't)h(curren)m(tly)e(implemen)m -(t)g(this)g(option\).)p eop -%%Page: 8 9 -8 8 bop 94 -116 a Fl(Chapter)30 b(6:)41 b(Supp)s(orted)29 -b(Enco)s(dings)2417 b(8)94 365 y Fh(co)s(de)31 b(128)h(ra)m(w)574 -465 y Fl(Co)s(de-128)24 b(output)d(represen)m(ted)h(sym)m(b)s(ol-b)m -(y-sym)m(b)s(ol)e(in)h(the)h(input)f(string.)36 b(T)-8 -b(o)23 b(o)m(v)m(erride)f(part)574 565 y(of)27 b(the)g(problems)d -(outlined)h(b)s(elo)m(w)g(in)g(sp)s(ecifying)f(co)s(de128)k(sym)m(b)s -(ols,)e(this)f(pseudo-enco)s(ding)574 664 y(allo)m(ws)42 -b(the)h(used)f(to)h(sp)s(ecify)e(a)i(list)e(of)i(co)s(de128)h(sym)m(b)s -(ols)d(separated)i(b)m(y)g(spaces.)77 b(Eac)m(h)574 764 -y(sym)m(b)s(ol)31 b(is)g(represen)m(ted)h(b)m(y)g(a)g(n)m(um)m(b)s(er)f -(in)g(the)h(range)g(0-105.)48 b(The)31 b(list)g(should)f(include)g(the) -574 863 y(leading)e(c)m(haracter.The)i(c)m(hec)m(ksum)g(and)e(the)h -(stop)g(c)m(haracter)h(are)f(automatically)g(added)f(b)m(y)574 -963 y(the)k(library)-8 b(.)42 b(Most)33 b(lik)m(ely)d(this)g -(pseudo-enco)s(ding)g(will)f(b)s(e)i(used)f(with)g Fj(BARCODE_NO_ASCII) -574 1063 y Fl(and)g(some)h(external)f(program)g(to)i(supply)27 -b(the)k(prin)m(ted)e(text.)94 1245 y Fh(co)s(de)37 b(39)180 -b Fl(The)36 b(co)s(de-39)h(standard)f(can)g(enco)s(de)g(upp)s(ercase)g -(letters,)i(digits,)e(the)g(blank)f(space,)k(plus,)574 -1345 y(min)m(us,)d(dot,)i(star,)f(dollar,)f(slash,)g(p)s(ercen)m(t.)57 -b(An)m(y)36 b(string)f(that)h(is)f(only)g(comp)s(osed)g(of)h(suc)m(h) -574 1445 y(c)m(haracters)j(is)e(accepted)h(b)m(y)g(the)f(co)s(de-39)i -(enco)s(der.)61 b(T)-8 b(o)38 b(a)m(v)m(oid)g(lo)s(osing)e -(information,)i(the)574 1544 y(enco)s(der)c(refuses)g(to)h(enco)s(de)f -(mixed-case)g(strings)f(\(a)i(lo)m(w)m(ercase)g(string)e(is)g -(nonetheless)h(ac-)574 1644 y(cepted)d(as)g(a)g(shortcut,)f(but)g(is)f -(enco)s(ded)h(as)h(upp)s(ercase\).)94 1826 y Fh(in)m(terlea)m(v)m(ed)g -(2)g(of)g(5)574 1926 y Fl(This)36 b(enco)s(ding)g(can)i(only)e -(represen)m(t)h(an)g(ev)m(en)h(n)m(um)m(b)s(er)e(of)h(digits)f(\(o)s -(dd)h(digits)f(are)h(repre-)574 2026 y(sen)m(ted)c(b)m(y)g(bars,)f(and) -g(ev)m(en)h(digits)e(b)m(y)i(the)f(in)m(terlea)m(ving)g(spaces\).)48 -b(The)32 b(name)g(stresses)h(the)574 2125 y(fact)i(that)g(t)m(w)m(o)g -(of)f(the)g(\014v)m(e)g(items)f(\(bars)h(or)f(spaces\))i(allo)s(cated)f -(to)g(eac)m(h)h(sym)m(b)s(ol)e(are)h(wide,)574 2225 y(while)41 -b(the)i(rest)g(are)g(narro)m(w.)78 b(The)42 b(c)m(hec)m(ksum)h(digit)f -(is)g(optional)f(\(can)j(b)s(e)e(disabled)e(via)574 2325 -y Fj(BARCODE_NO_CHECKSUM)p Fl(\).)f(Since)31 b(the)h(n)m(um)m(b)s(er)e -(of)h(digits,)g(including)d(the)j(c)m(hec)m(ksum,)i(m)m(ust)574 -2424 y(b)s(e)40 b(ev)m(en,)k(a)c(leading)f(zero)i(is)e(inserted)g(in)g -(the)i(string)e(b)s(eing)g(enco)s(ded)g(if)h(needed)f(\(this)h(is)574 -2524 y(sp)s(eci\014cally)29 b(stated)i(in)e(the)h(sp)s(ecs)g(I)g(ha)m -(v)m(e)i(access)g(to\).)94 2707 y Fh(co)s(de)f(128)136 -b Fl(Automatic)31 b(selection)g(b)s(et)m(w)m(een)g(alphab)s(et)f(A,)h -(B)g(and)f(C)h(of)g(the)g(Co)s(de-128)h(standard.)41 -b(This)574 2806 y(enco)s(ding)31 b(can)i(represen)m(t)f(all)f(ASCI)s(I) -f(sym)m(b)s(ols,)i(from)f(0)h(\(NUL\))h(to)g(127)g(\(DEL\),)g(as)g(w)m -(ell)e(as)574 2906 y(four)36 b(sp)s(ecial)e(sym)m(b)s(ols,)i(named)f -(F1,)j(F2,)g(F3,)g(F4.)58 b(The)35 b(set)h(of)g(sym)m(b)s(ols)f(a)m(v) --5 b(ailable)35 b(in)f(this)574 3005 y(enco)s(ding)g(is)f(not)i(easily) -e(represen)m(ted)i(as)f(input)e(to)k(the)e Fg(b)-5 b(ar)g(c)g(o)g(de)44 -b Fl(library)-8 b(,)33 b(so)i(the)f(follo)m(wing)574 -3105 y(con)m(v)m(en)m(tion)24 b(is)e(used.)38 b(In)22 -b(the)g(input)f(string,)j(whic)m(h)d(is)h(a)h(C-language)g(n)m -(ull-terminated)e(string,)574 3205 y(the)26 b(NUL)g(c)m(har)f(is)g -(represen)m(ted)g(b)m(y)h(the)f(v)-5 b(alue)25 b(128)i(\(0x80,)h -(0200\))g(and)d(the)g(F1-F4)i(c)m(haracters)574 3304 -y(are)f(represen)m(ted)g(b)m(y)f(the)h(v)-5 b(alues)25 -b(193-196)k(\(0xc1-0xc4,)h(0301-0304\).)43 b(The)25 b(v)-5 -b(alues)25 b(ha)m(v)m(e)i(b)s(een)574 3404 y(c)m(hosen)k(to)h(ease)f -(their)e(represen)m(tation)i(as)f(escap)s(e)h(sequences.)574 -3545 y(Since)39 b(the)h(shell)d(do)s(esn't)j(seem)f(to)i(in)m(terpret)d -(escap)s(e)i(sequences)g(on)f(the)h(command)f(line,)574 -3645 y(the)e Fj(")p Fl(-b)p Fj(")e Fl(option)g(cannot)h(b)s(e)f(easily) -g(used)g(to)i(designate)f(the)g(strings)f(to)h(b)s(e)f(enco)s(ded.)57 -b(As)574 3744 y(a)44 b(w)m(ork)-5 b(around)42 b(y)m(ou)i(can)f(resort)h -(to)f(the)h(command)f Fj(echo)p Fl(,)i(either)e(within)d(bac)m(k-tic)m -(ks)45 b(or)574 3844 y(used)34 b(separately)g(to)g(create)i(a)e(\014le) -f(that)i(is)e(then)g(fed)h(to)h(the)f(standard-input)d(of)j -Fg(b)-5 b(ar)g(c)g(o)g(de)44 b Fl({)574 3944 y(assuming)34 -b(y)m(our)h Fj(echo)f Fl(command)h(pro)s(cesses)g(escap)s(e)h -(sequences.)56 b(The)34 b(newline)f(c)m(haracter)574 -4043 y(is)d(esp)s(ecially)f(though)h(to)h(enco)s(de)f(\(but)g(not)h -(imp)s(ossible)c(unless)h(y)m(ou)j(use)f(a)h Fj(csh)e -Fl(v)-5 b(arian)m(t.)574 4184 y(These)35 b(problems)f(only)g(apply)g -(to)i(the)f(command-line)f(to)s(ol;)j(the)f(use)e(of)i(library)c -(functions)574 4284 y(do)s(esn't)44 b(giv)m(e)f(an)m(y)h(problem.)78 -b(In)42 b(needed,)47 b(y)m(ou)c(can)h(use)f(the)h(\\)p -Fg(c)-5 b(o)g(de)46 b(128)f(r)-5 b(aw)10 b Fl(")45 b(pseudo-)574 -4384 y(enco)s(ding)33 b(to)h(represen)m(t)g(co)s(de128)h(sym)m(b)s(ols) -d(b)m(y)h(their)g(n)m(umerical)f(v)-5 b(alue.)50 b(This)31 -b(enco)s(ding)i(is)574 4483 y(used)28 b(late)h(in)e(the)h -(auto-selection)i(mec)m(hanism)d(b)s(ecause)h(\(almost\))i(an)m(y)e -(input)f(string)g(can)i(b)s(e)574 4583 y(represen)m(ted)i(using)e(co)s -(de128.)94 4765 y Fh(Co)s(dabar)138 b Fl(Co)s(dabar)33 -b(can)h(enco)s(de)g(the)g(ten)f(digits)g(and)g(a)h(few)f(sp)s(ecial)f -(sym)m(b)s(ols)g(\(min)m(us,)i(plus,)e(dollar,)574 4865 -y(colon,)k(bar,)g(dot\).)54 b(The)34 b(c)m(haracters)i(\\)p -Fj(A)p Fl(",)h(\\)p Fj(B)p Fl(",)f(\\)p Fj(C)p Fl(")f(and)g(\\)p -Fj(D)p Fl(")g(are)g(used)f(to)h(represen)m(t)g(four)574 -4965 y(di\013eren)m(t)30 b(start/stop)i(c)m(haracters.)42 -b(The)30 b(input)e(string)i(to)h(the)f(barco)s(de)h(library)d(can)i -(include)574 5064 y(the)d(start)g(and)f(stop)h(c)m(haracters)h(or)e -(not)h(include)d(them)j(\(in)e(whic)m(h)h(case)h(\\)p -Fj(A)p Fl(")g(is)f(used)g(as)g(start)574 5164 y(and)38 -b(\\)p Fj(B)p Fl(")g(as)g(stop\).)64 b(Start)38 b(and)f(stop)h(c)m -(haracters)h(in)e(the)h(input)e(string)g(can)j(b)s(e)e(either)g(all)574 -5264 y(lo)m(w)m(ercase)32 b(or)f(all)e(upp)s(ercase)g(and)h(are)h(alw)m -(a)m(ys)g(prin)m(ted)e(as)h(upp)s(ercase.)94 5446 y Fh(Plessey)192 -b Fl(Plessey)39 b(barco)s(des)f(can)h(enco)s(de)g(all)f(the)h -(hexadecimal)f(digits.)64 b(Alphab)s(etic)37 b(digits)g(in)h(the)574 -5546 y(input)25 b(string)g(m)m(ust)h(either)g(b)s(e)f(all)g(lo)m(w)m -(ercase)j(or)e(all)f(upp)s(ercase.)38 b(The)26 b(output)g(text)h(is)e -(alw)m(a)m(ys)574 5645 y(upp)s(ercase.)p eop -%%Page: 9 10 -9 9 bop 94 -116 a Fl(Chapter)30 b(7:)41 b(PCL)30 b(Output)2761 -b(9)94 365 y Fh(MSI)313 b Fl(MSI)39 b(can)g(only)e(enco)s(de)i(the)g -(decimal)e(digits.)64 b(While)38 b(the)h(standard)e(sp)s(eci\014es)h -(either)g(one)574 465 y(or)e(t)m(w)m(o)h(c)m(hec)m(k)g(digits,)e(the)h -(curren)m(t)f(implemen)m(tation)f(in)g(this)g(library)f(only)i -(generates)i(one)574 565 y(c)m(hec)m(k)32 b(digit.)94 -701 y Fh(co)s(de)f(93)180 b Fl(The)30 b(co)s(de-93)h(standard)f(can)g -(nativ)m(ely)g(enco)s(de)g(48)h(di\013eren)m(t)e(c)m(haracters,)j -(including)27 b(upp)s(er-)574 801 y(case)39 b(letters,)h(digits,)e(the) -g(blank)e(space,)k(plus,)e(min)m(us,)g(dot,)h(star,)h(dollar,)e(slash,) -h(p)s(ercen)m(t,)574 901 y(as)31 b(w)m(ell)f(as)g(\014v)m(e)h(sp)s -(ecial)e(c)m(haracters:)43 b(a)30 b(start/stop)i(delimiter)c(and)i -(four)g Fj(")p Fl(shift)f(c)m(haracters)p Fj(")574 1000 -y Fl(used)f(for)f(extended)h(enco)s(ding.)39 b(Using)27 -b(this)g Fj(")p Fl(extended)g(enco)s(ding)p Fj(")g Fl(metho)s(d,)h(an)m -(y)g(standard)574 1100 y(7-bit)34 b(ASCI)s(I)e(c)m(haracter)k(can)e(b)s -(e)f(enco)s(ded,)i(but)e(it)h(tak)m(es)h(up)e(t)m(w)m(o)i(sym)m(b)s(ol) -d(lengths)i(in)e(bar-)574 1200 y(co)s(de)k(if)f(the)g(c)m(haracter)j -(is)c(not)i(nativ)m(ely)f(supp)s(orted)f(\(one)i(of)g(the)f(48\).)58 -b(The)35 b(enco)s(der)g(here)574 1299 y(fully)24 b(implemen)m(ts)g(the) -i(co)s(de)g(93)g(enco)s(ding)f(standard.)38 b(An)m(y)26 -b(c)m(haracters)h(nativ)m(ely)e(supp)s(orted)574 1399 -y(\(A-Z,)35 b(0-9,)h Fj(")p Fl(.)p Fj(+)p Fl(-/$&\045)p -Fj(")p Fl(\))e(will)d(b)s(e)j(enco)s(ded)f(as)h(suc)m(h)g(-)g(for)f(an) -m(y)h(other)h(c)m(haracters)g(\(suc)m(h)f(as)574 1498 -y(lo)m(w)m(er)h(case)g(letters,)g(brac)m(k)m(ets,)h(paren)m(theses,)g -(etc.\),)h(the)d(enco)s(der)f(will)f(rev)m(ert)i(to)h(extended)574 -1598 y(enco)s(ding.)68 b(As)40 b(a)g(note,)j(the)d(option)f(to)h -(exclude)f(the)h(c)m(hec)m(ksum)g(will)d(eliminate)i(the)h(t)m(w)m(o) -574 1698 y(mo)s(dulo-47)f(c)m(hec)m(ksums)g(\(called)g(C)f(and)g(K\))h -(from)f(the)h(barco)s(de,)i(but)d(this)g(probably)f(will)574 -1797 y(mak)m(e)c(it)e(unreadable)e(b)m(y)i(99\045)h(of)g(all)e -(scanning)g(systems.)43 b(These)31 b(c)m(hec)m(ksums)h(are)g(sp)s -(eci\014ed)574 1897 y(to)f(b)s(e)e(used)g(at)i(the)f(\014rm)m(w)m(are)f -(lev)m(el,)h(and)f(their)g(absence)h(will)d(b)s(e)j(in)m(terpreted)f -(as)h(an)f(in)m(v)-5 b(alid)574 1997 y(barco)s(de.)94 -2266 y Fi(7)81 b(PCL)53 b(Output)219 2459 y Fl(While)28 -b(the)h(default)g(output)f(is)g(P)m(ostscript)i(\(p)s(ossibly)c(EPS\),) -j(and)g(P)m(ostscript)g(can)g(b)s(e)f(p)s(ost-pro)s(cessed)94 -2558 y(to)40 b(almost)e(an)m(ything,)i(it)e(is)f(sometimes)i(desirable) -d(to)j(create)h(output)e(directly)f(usable)g(b)m(y)i(the)f(sp)s -(eci\014c)94 2658 y(prin)m(ter)33 b(at)h(hand.)50 b(PCL)33 -b(is)g(curren)m(tly)f(supp)s(orted)g(as)i(an)g(output)f(format)h(for)g -(this)e(reason.)51 b(Please)34 b(note)94 2758 y(that)25 -b(the)f(Y)g(co)s(ordinate)g(for)f(PCL)h(go)s(es)g(from)f(top)i(to)f(b)s -(ottom,)i(while)c(for)h(P)m(ostscript)h(it)g(go)s(es)g(from)g(b)s -(ottom)94 2857 y(to)35 b(top.)51 b(Consisten)m(tly)-8 -b(,)34 b(while)d(in)i(P)m(ostscript)g(y)m(ou)h(sp)s(ecify)f(the)g(b)s -(ottom-left)i(corner)e(as)h(origin,)f(for)h(PCL)94 2957 -y(y)m(ou)d(sp)s(ecify)e(the)i(top-left)f(corner.)219 -3075 y(Barco)s(de)c(output)e(for)h(PCL)f(Prin)m(ters)g(\(HP)h(LaserJet) -g(and)g(compatibles\),)g(w)m(as)h(dev)m(elop)s(ed)e(using)f(PCL5)94 -3175 y(Reference)32 b(man)m(uals)d(from)h(HP)-8 b(.)31 -b(that)g(really)e(refers)h(to)h(these)g(prin)m(ters:)169 -3293 y Fb(\017)60 b Fl(LaserJet)31 b(I)s(I)s(I,)f(I)s(I)s(I)e(P)-8 -b(,)31 b(I)s(I)s(I)e(D,)i(I)s(I)s(I)e(Si,)169 3411 y -Fb(\017)60 b Fl(LaserJet)31 b(4)g(family)169 3529 y Fb(\017)60 -b Fl(LaserJet)31 b(5)g(family)169 3648 y Fb(\017)60 b -Fl(LaserJet)31 b(6)g(family)169 3766 y Fb(\017)60 b Fl(Color)30 -b(LaserJet)169 3884 y Fb(\017)60 b Fl(DeskJet)32 b(1200)g(and)e(1600.) -219 4021 y(Ho)m(w)m(ev)m(er,)g(barco)s(de)e(prin)m(ting)d(uses)i(a)h(v) -m(ery)g(small)e(subset)h(of)g(PCL,)g(probably)f(also)h(LaserJet)h(I)s -(I)f(should)94 4121 y(prin)m(t)i(it)h(without)g(problem,)f(but)g(the)i -(resulting)e(text)i(ma)m(y)g(b)s(e)f(horrible.)219 4239 -y(The)22 b(only)g(real)h(di\013erence)f(from)h(one)g(prin)m(ter)e(to)j -(another)f(really)f(dep)s(ends)f(on)h(whic)m(h)g(fon)m(t)h(are)h(a)m(v) --5 b(ailable)94 4338 y(in)30 b(the)g(prin)m(ter,)f(used)h(in)f(prin)m -(ting)f(the)j(lab)s(el)d(asso)s(ciated)j(to)g(the)g(bars)f(\(if)f -(requested\).)219 4457 y(Earlier)j(LaserJet)j(supp)s(orts)d(only)h -(bitmaps)f(fon)m(ts,)k(so)e(these)g(are)h(not)f Fj(")p -Fl(scalable)p Fj(")p Fl(.)50 b(\(Ljet)35 b(I)s(I)e(?\),)i(Also)94 -4556 y(these)c(fon)m(ts,)f(when)f(a)m(v)-5 b(ailable,)29 -b(ha)m(v)m(e)i(a)f(sp)s(eci\014ed)e(direction,)h(and)g(not)h(all)f(of)g -(them)h(are)g(a)m(v)-5 b(ailable)29 b(in)g(b)s(oth)94 -4656 y(P)m(ortrait)i(and)f(Landscap)s(e)g(mo)s(de.)219 -4774 y(F)-8 b(rom)23 b(LaserJet)g(4)f(series,)i(\(except)g(4L/5L)f -(that)g(are)g(en)m(try-lev)m(el)f(prin)m(ters\),)h(Arial)e(scalable)h -(fon)m(t)h(should)94 4874 y(b)s(e)30 b(a)m(v)-5 b(ailable,)30 -b(so)h(it's)f(the)g Fj(")p Fl(default)g(fon)m(t)p Fj(")g -Fl(used)g(b)m(y)g(this)f(program.)219 4992 y(LaserJet)41 -b(I)s(I)s(I)d(series)i(prin)m(ters)e(\(and)i(4L,)g(5L\),)h(don't)f -(feature)h Fj(")p Fl(Arial)p Fj(")d Fl(as)i(a)h(residen)m(t)e(fon)m(t,) -k(so)e(y)m(ou)94 5092 y(should)27 b(use)i Fj(BARCODE_OUT_PCL_III)23 -b Fl(instead)28 b(of)h Fj(BARCODE_OUT_PCL.)p Fl(,)c(and)j(fon)m(t)h -(the)g(fon)m(t)h(used)d(will)g(b)s(e)94 5191 y Fj(")p -Fl(Univ)m(ers)p Fj(")j Fl(instead)f(of)i Fj(")p Fl(Arial)p -Fj(")p Fl(.)219 5309 y(Results)26 b(on)i(compatible)e(prin)m(ters,)h -(ma)m(y)h(dep)s(end)d(on)i(consistency)g(of)h(PCL5)f(compatibilit)m(y) --8 b(,)26 b(in)g(doubt,)94 5409 y(try)31 b(BAR)m(CODE)p -713 5409 28 4 v 33 w(OUT)p 951 5409 V 32 w(PCL)p 1168 -5409 V 32 w(I)s(I)s(I)219 5527 y(PJL)f(commands)g(are)g(not)h(used)f -(here,)g(as)h(it's)f(not)g(v)m(ery)h(compatible.)219 -5645 y(T)-8 b(ested)31 b(Prin)m(ters:)p eop -%%Page: 10 11 -10 10 bop 94 -116 a Fl(Chapter)30 b(8:)41 b(Bugs)31 b(and)f(P)m(ending) -f(Issues.)2211 b(10)169 365 y Fb(\017)60 b Fl(Hp)30 b(LaserJet)h(4050) -169 490 y Fb(\017)60 b Fl(Hp)30 b(LaserJet)h(2100)169 -614 y Fb(\017)60 b Fl(Epson)30 b(N-1200)j(em)m(ul)c(PCL)169 -739 y Fb(\017)60 b Fl(T)-8 b(oshiba)30 b(DP2570)i(\(copier\))f -Fj(+)f Fl(PCL)g(option)169 863 y Fb(\017)60 b Fl(Epson)30 -b(EPL-7100)i(em)m(ul.)40 b(HP)30 b(LaserJet)h(I)s(I:)f(bars)g(prin)m(t) -f(\014ne)g(but)h(text)i(is)d(bad.)94 1146 y Fi(8)81 b(Bugs)52 -b(and)i(P)l(ending)f(Issues.)219 1370 y Fl(The)42 b(curren)m(t)g -(managemen)m(t)h(of)g(b)s(orders/margins)d(is)h(far)h(from)g(optimal.) -75 b(The)42 b(\\default")g(margin)94 1469 y(applied)d(b)m(y)h(the)h -(library)d(in)m(terferes)i(with)f(the)i(external)g(represen)m(tation,)i -(but)d(I)g(feel)g(it)g(is)g(mandatory)94 1569 y(to)f(a)m(v)m(oid)f -(creating)g(barco)s(de)f(output)h(with)e(no)i(surrounding)c(white)j -(space)h(\(the)g(problem)e(is)h(esp)s(ecially)94 1669 -y(relev)-5 b(an)m(t)31 b(for)f(EPS)g(output\).)219 1793 -y(EAN-128)44 b(is)d(not)h(\(y)m(et\))i(supp)s(orted.)73 -b(I)42 b(plan)e(to)j(implemen)m(t)e(it)g(prett)m(y)h(so)s(on)g(and)f -(then)h(bless)f(the)94 1893 y(pac)m(k)-5 b(age)33 b(as)d(v)m(ersion)g -(1.0.)p eop -%%Page: -1 12 --1 11 bop 3849 -116 a Fl(i)94 365 y Fi(T)-13 b(able)55 -b(of)e(Con)l(ten)l(ts)94 697 y Fk(Barco)t(de)45 b(to)t(ols)16 -b Fa(.)k(.)g(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) -f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g -(.)h(.)60 b Fk(1)94 955 y(1)135 b(Ov)l(erview)12 b Fa(.)21 -b(.)f(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h -(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.) -f(.)57 b Fk(1)94 1212 y(2)135 b(The)45 b(Underlying)g(Data)h(Structure) -41 b Fa(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)86 -b Fk(1)393 1337 y Fl(2.1)92 b(The)30 b(Fields)19 b Fg(.)14 -b(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) -g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)49 -b Fl(1)692 1436 y(Use)31 b(of)g(the)f Fg(width)39 b Fl(and)30 -b Fg(sc)-5 b(alef)50 b Fl(\014elds.)25 b Fg(.)15 b(.)g(.)g(.)g(.)g(.)g -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) -g(.)g(.)56 b Fl(2)393 1536 y(2.2)92 b(The)30 b(In)m(termediate)h -(Represen)m(tation)24 b Fg(.)15 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) -g(.)54 b Fl(3)94 1768 y Fk(3)135 b(The)45 b(Flags)28 -b Fa(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f -(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) -f(.)g(.)73 b Fk(3)94 2026 y(4)135 b(F)-11 b(unctions)44 -b(Exp)t(orted)h(b)l(y)g(the)g(Library)37 b Fa(.)19 b(.)h(.)f(.)g(.)h(.) -f(.)h(.)f(.)h(.)f(.)g(.)81 b Fk(4)94 2283 y(5)135 b(The)45 -b Fa(b)-7 b(ar)g(c)g(o)g(de)52 b Fk(fron)l(tend)46 b(program)11 -b Fa(.)19 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h -(.)55 b Fk(5)393 2408 y Fl(5.1)92 b(The)30 b(Command)g(Line)24 -b Fg(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g -(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) -g(.)g(.)g(.)g(.)g(.)g(.)g(.)55 b Fl(5)94 2640 y Fk(6)135 -b(Supp)t(orted)44 b(Enco)t(dings)33 b Fa(.)20 b(.)f(.)g(.)h(.)f(.)h(.)f -(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.) -78 b Fk(7)94 2897 y(7)135 b(PCL)45 b(Output)40 b Fa(.)20 -b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f -(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)85 -b Fk(9)94 3155 y(8)135 b(Bugs)45 b(and)f(P)l(ending)h(Issues.)36 -b Fa(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h -(.)f(.)g(.)h(.)79 b Fk(10)p eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/glabels1/barcode-0.98/doc/barcodedoc.txt b/glabels1/barcode-0.98/doc/barcodedoc.txt deleted file mode 100644 index 08eadee..0000000 --- a/glabels1/barcode-0.98/doc/barcodedoc.txt +++ /dev/null @@ -1,734 +0,0 @@ - - -This is barcode.info, produced by makeinfo version 4.0 from -barcode.texinfo. - - This file is the User's Manual for the barcode library (version -0.98). - - - - -*Node: Overview - Overview - ******** - - The "barcode" package is mainly a C library for creating bar-code -output files. It also includes a command line front-end and (in a -foreseeable future) a graphic frontend. - - The package is designed as a library because we think the main use -for barcode-generation tools is inside more featured applications. The -library addresses bar code printing as two distinct problems: creation -of bar information and actual conversion to an output format. To this -aim we use an intermediate representation for bar codes, which is -currently documented in the `ps.c' source file (not in this document). - - Note that the library and the accompanying material is released -according to the GPL license, not the LGPL one. A copy of the GPL is -included in the distribution tarball. - - - - -*Node: The Barcode Object - The Underlying Data Structure - ***************************** - - Every barcode-related function acts on a data structure defined in -the `barcode.h' header, which must be included by any C source file -that uses the library. The header is installed by make install. - - The definition of the data structure is included here for reference: - - struct Barcode_Item { - int flags; /* type of encoding and other flags */ - char *ascii; /* malloced */ - char *partial; /* malloced too */ - char *textinfo; /* information about text placement */ - char *encoding; /* code name, filled by encoding engine */ - int width, height; /* output units */ - int xoff, yoff; /* output units */ - int margin; /* output units */ - double scalef; /* requested scaling for barcode */ - int error; /* an errno-like value, in case of failure */ - }; - - The exact meaning of each field and the various flags implemented are -described in the following sections. - - Even though you won't usually need to act on the contents of this -structure, some of the functions in the library receive arguments that -are directly related to one or more of these fields. - - - - -*Node: The Field List - The Fields - ========== - -`int flags;' - The flags are, as you may suspect, meant to specify the exact - behaviour of the library. They are often passed as an argument to - barcode functions and are discussed in the next section. - -`char *ascii;' -`char *partial;' -`char *textinfo;' -`char *encoding;' - These fields are internally managed by the library, and you are - not expected to touch them if you use the provided API. All of - them are allocated with malloc. - -`int width;' -`int height;' - They specify the width and height of the active barcode region - (i.e., excluding the white margin), in the units used to create - output data (for postscript they are points, 1/72th of an inch, - 0.352 mm). The fields can be either assigned to in the structure - or via Barcode_Position(), at your choice. If either value or - both are left to their default value of zero, the output engine - will assign default values according to the specified scaling - factor. If the specified width is bigger than needed (according to - the scaling factor), the output barcode will be centered in its - requested region. If either the width of the height are too small - for the specified scale factor, the output bar code will expand - symmetrically around the requested region. - -`int xoff;' -`int yoff;' - The fields specify offset from the coordinate origin of the output - engine (for postscript, position 0,0 is the lower left corner of - the page). The fields can be either assigned to in the structure - or via Barcode_Position(), at your choice. The offset specifies - where the white margin begins, not where the first bar will be - printed. To print real ink to the specified position you should - set margin to 0. - -`int margin;' - The white margin that will be left around the printed area of the - bar code. The same margin is applied to all sides of the printed - area. The default value for the margin is defined in `barcode.h' - as BARCODE_DEFAULT_MARGIN (10). - -`double scalef;' - The enlarge or shrink value for the bar code over its default - dimension. The width and scalef fields interact deeply in the - creation of the output, and a complete description of the issues - appears later in this section. - -`int error;' - The field is used when a barcode function fails to host an - errno-like integer value. - -Use of the width and scalef fields. ------------------------------------ - - A width unit is the width of the thinnest bar and/or space in the -chosen code; it defaults to 1 point if the output is postscript or -encapsulated postscript. - - Either or both the code width and the scale factor can be left -unspecified (i.e., zero). The library deals with defaults in the -following way: - -Both unspecified - If both the width and the scale factor are unspecified, the scale - factor will default to 1.0 and the width is calculated according - to the actual width of the bar code being printed. - -Width unspecified - If the width is not specified, it is calculated according to the - values of scalef. - -Scale factor unspecified - If the scale factor is not specified, it will be chosen so that - the generated bar code exactly fits the specified width. - -Both specified - The code will be printed inside the specified region according to - the specified scale factor. It will be aligned to the left. If, - however, the chosen width is too small for the specific bar code - and scaling factor, then the code will extend symmetrically to the - left and to the right of the chosen region. - - - - -*Node: The Intermediate Representation - The Intermediate Representation - =============================== - - The encoding functions print their output into the partial and -texinfo fields of the barcode data structure. Those fields, together -with position information, are then used to generate actual output. -This is an informal description of the intermediate format. - - The first char in partial tells how much extra space to add to the -left of the bars. For EAN-13, it is used to leave space to print the -first digit, other codes may have '0' for no-extra-space-needed. - - The next characters are alternating bars and spaces, as multiples of -the base dimension which is 1 unless the code is rescaled. Rescaling is -calculated as the ratio from the requested width and the calculated -width. Digits represent bar/space dimensions. Lower-case letters -represent those bars that should extend lower than the others: 'a' is -equivalent to '1', 'b' is '2' and so on up to 'i' which is equivalent to -'9'. Other letters will be used for encoding-specific meanings, as soon -as I implement them. - - The textinfo string is made up of fields %lf:%lf:%c separated by -blank space. The first integer is the x position of the character, the -second is the font size (before rescaling) and the char item is the -character to be printed. - - Both the partial and textinfo strings may include "-" or "+" as -special characters (in textinfo the char should be a stand-alone word). -They state where the text should be printed: below the bars ("-", -default) or above the bars. This is used, for example, to print the -add-5 and add-2 codes to the right of UPC or EAN codes (the add-5 -extension is mostly used in ISBN codes). - - - - -*Node: Supported Flags - The Flags - ********* - - The following flags are supported by version 0.98 of the library: - -`BARCODE_ENCODING_MASK' - The mask is used to extract the encoding-type identifier from the - flags field. - -`BARCODE_EAN' -`BARCODE_UPC' -`BARCODE_ISBN' -`BARCODE_128B' -`BARCODE_128C' -`BARCODE_128' -`BARCODE_128RAW' -`BARCODE_39' -`BARCODE_I25' -`BARCODE_CBR' -`BARCODE_MSI' -`BARCODE_PLS' -`BARCODE_93' - The currently supported encoding types: EAN (13 digits, 8 digits, - 13 + 2 add-on and 13 + 5 add-on), UPC (UPC-A, UPC-E, UPC-A with 2 - or 5 digit add-on), ISBN (with or without the 5-digit add-on), - CODE128-B (the whole set of printable ASCII characters), CODE128-C - (two digits encoded by each barcode symbol), CODE128 (all ASCII - values), a "raw-input" pseudo-code that generates CODE128 output, - CODE39 (alphanumeric), "interleaved 2 of 5" (numeric), Codabar - (numeric plus a few symbols), MSI (numeric) and Plessey (hex - digits). *Note Supported Encodings::. - -`BARCODE_ANY' - This special encoding type (represented by a value of zero, so it - will be the default) tells the encoding procedure to look for the - first encoding type that can deal with a textual string. - Therefore, a 11-digit code will be printed as UPC (as well as - 6-digit, 11+2 and 11+5), a 12-digit (or 7-digit, or 12+2 or 12+5) - as EAN13, an ISBN code (with or without hyphens, with or without - add-5) will be encoded in its EAN13 representation, an even number - of digits is encoded using CODE128C and a generic string is - encoded using CODE128B. Since code-39 offers a much larger - representation for the same text string, code128-b is preferred - over code39 for alphanumeric strings. - -`BARCODE_NO_ASCII' - Instructs the engine not to print the ascii string on output. By - default the bar code is accompanied with an ascii version of the - text it encodes. - -`BARCODE_NO_CHECKSUM' - Instructs the engine not to add the checksum character to the - output. Not all the encoding types can drop the checksum; those - where the checksum is mandatory (like EAN and UPC) just ignore the - flag. - -`BARCODE_OUTPUT_MASK' - The mask is used to extract the output-type identifier from the - flags field. - -`BARCODE_OUT_PS' -`BARCODE_OUT_EPS' -`BARCODE_OUT_PCL' -`BARCODE_OUT_PCL_III' - The currently supported encoding types: full-page postscript and - encapsulated postscript; PCL (print command language, for HP - printers) and PCL-III (same as PCL, but uses a font not available - on older printers). - -`BARCODE_OUT_NOHEADERS' - The flag instructs the printing engine not to print the header and - footer part of the file. This makes sense for the postscript - engine but might not make sense for other engines; such other - engines will silently ignore the flag just like the PCL back-end - does. - - - - -*Node: The API - Functions Exported by the Library - ********************************* - - The functions included in the barcode library are declared in the -header file barcode.h. They perform the following tasks: - -`struct Barcode_Item *Barcode_Create(char *text);' - The function creates a new barcode object to deal with a specified - text string. It returns NULL in case of failure and a pointer to - a barcode data structure in case of success. - -`int Barcode_Delete(struct Barcode_Item *bc);' - Destroy a barcode object. Always returns 0 (success) - -`int Barcode_Encode(struct Barcode_Item *bc, int flags);' - Encode the text included in the bc object. Valid flags are the - encoding type (other flags are ignored) and BARCODE_NO_CHECKSUM - (other flags are silently ignored); if the flag argument is zero, - bc->flags will apply. The function returns 0 on success and -1 in - case of error. After successful termination the data structure - will host the description of the bar code and its textual - representation, after a failure the error field will include the - reason of the failure. - -`int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);' - Print the bar code described by bc to the specified file. Valid - flags are the output type, BARCODE_NO_ASCII and - BARCODE_OUT_NOHEADERS, other flags are ignored. If any of these - flags is zero, it will be inherited from bc->flags which therefore - takes precedence. The function returns 0 on success and -1 in case - of error (with bc->error set accordingly). In case of success, the - bar code is printed to the specified file, which won't be closed - after use. - -`int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff, double scalef);' - The function is a shortcut to assign values to the data structure. - -`int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags);' - The function deals with the whole life of the barcode object by - calling the other functions; it uses all the specified flags. - -`int Barcode_Version(char *versionname);' - Returns the current version as an integer number of the form major - * 10000 + minor * 100 + release. Therefore, version 1.03.5 will be - returned as 10305 and version 0.53 as 5300. If the argument is - non-null, it will be used to return the version number as a - string. Note that the same information is available from two - preprocessor macros: BARCODE_VERSION (the string) and - BARCODE_VERSION_INT (the integer number). - - - - -*Node: The barcode Executable - The barcode frontend program - **************************** - - The barcode program is a front-end to access some features of the -library from the command line. It is able to read user supplied -strings from the command line or a data file (standard input by default) -and encode all of them. - - - - -*Node: The Command Line - The Command Line - ================ - - barcode accepts the following options: - -`--help or -h' - Print a usage summary and exit. - -`-i filename' - Identify a file where strings to be encoded are read from. If - missing (and if -b is not used) it defaults to standard input. - Each data line of the input file will be used to create one - barcode output. - -`-o filename' - Output file. It defaults to standard output. - -`-b string' - Specify a single "barcode" string to be encoded. The option can - be used multiple times in order to encode multiple strings (this - will result in multi-page postscript output or a table of barcodes - if -t is specified). The strings must match the encoding chosen; - if it doesn't match the program will print a warning to stderr and - generate "blank" output (although not zero-length). Please note - that a string including spaces or other special characters must be - properly quoted. - -`-e encoding' - encoding is the name of the chosen encoding format being used. It - defaults to the value of the environment variable BARCODE_ENCODING - or to auto detection if the environment is also unset. - -`-g geometry' - The geometry argument is of the form "[<width> x <height>] [+ - <xmargin> + <ymargin>]" (with no intervening spaces). Unspecified - margin values will result in no margin; unspecified size results - in default size. The specified values represent print points by - default, and can be inches, millimeters or other units according - to the -u option or the BARCODE_UNIT environment variable. The - argument is used to place the printout code on the page. Note that - an additional white margin of 10 points is added to the printout. - If the option is unspecified, BARCODE_GEOMETRY is looked up in the - environment, if missing a default size and no margin (but the - default 10 points) are used. - -`-t table-geometry' - Used to print several barcodes to a single page, this option is - meant to be used to print stickers. The argument is of the form - "<columns> x <lines> [+ <leftmargin> + <bottommargin> [- - <rightmargin> [- <topmargin>]]]" (with no intervening spaces); if - missing, the top and right margin will default to be the same as - the bottom and left margin. The margins are specified in print - points or in the chosen unit (see -u below). If the option is not - specified, BARCODE_TABLE is looked up in the environment, - otherwise no table is printed and each barcode will get its own - page. The size (but not the position) of a barcode item within a - table can also be selected using -g (see "geometry" above), - without struggling with external and internal margins. I still - think management of geometries in a table is suboptimal, but I - can't make it better without introducing incompatibilities. - -`-m margin(s)' - Specifies an internal margin for each sticker in the table. The - argument is of the form "<xmargin>,<ymargin>" and the margin is - applied symmetrically to the sticker. If unspecified, the - environment variable BARCODE_MARGIN is used or a default internal - margin of 10 points is used. - -`-n' - "Numeric" output: don't print the ASCII form of the code, only the - bars. - -`-c' - No checksum character (for encodings that allow it, like code 39, - other codes, like UPC or EAN, ignore this option). - -`-E' - Encapsulated postscript (default is normal postscript). When the - output is generated as EPS only one barcode is encoded. - -`-P' - PCL output. Please note that the Y direction goes from top to - bottom for PCL, and the origin for an image is the top-left corner - instead of the bottom-left - -`-p pagesize' - Specify a non-default page size. The page size can be specified in - millimeters, inches or plain numbers (for example: "210x297mm", - "8.5x11in", "595x842"). A page specification as numbers will be - interpreted according to the current unit specification (see -u - below). If libpaper is available, you can also specify the page - size with its name, like "A3" or "letter" (libpaper is a standard - component of Debian GNU/Linux, but may be missing elsewhere). The - default page size is your system-wide default if libpaper is - there, A4 otherwise. - -`-u unit' - Choose the unit used in size specifications. Accepted values are - "mm", "cm", "in" and "pt". By default, the program will check - BARCODE_UNIT in the environment, and assume points otherwise (this - behaviour is compatible with 0.92 and previous versions. If -u - appears more than once, each instance will modified the behaviour - for the arguments at its right, as the command line is processes - left to right. The program internally works with points, and any - size is approximated to the nearest multiple of one point. The -u - option affect -g (geometry), -t (table) and -p (page size). - - - - -*Node: Supported Encodings - Supported Encodings - ******************* - - The program encodes text strings passed either on the command line -(with -b) or retrieved from standard input. The text representation is -interpreted according to the following rules. When auto-detection of -the encoding is enabled (i.e, no explicit encoding type is specified), -the encoding types are scanned to find one that can digest the text -string. The following list of supported types is sorted in the same -order the library uses when auto-detecting a suitable encoding for a -string. - -EAN - The EAN frontend is similar to UPC; it accepts strings of digits, - 12 or 7 characters long. Strings of 13 or 8 characters are - accepted if the provided checksum digit is correct. I expect most - users to feed input without a checksum, though. The add-2 and - add-5 extension are accepted for both the EAN-13 and the EAN-8 - encodings. The following are example of valid input strings: - "123456789012" (EAN-13), "1234567890128" (EAN-13 wih checksum), - "1234567" (EAN-8), "12345670 12345" (EAN-8 with checksum and - add-5), "123456789012 12" (EAN-13 with add-2), "123456789012 - 12345" (EAN-13 with add-5). - -UPC - The UPC frontend accepts only strings made up of digits (and, if a - supplemental encoding is used, a blank to separate it). It - accepts strings of 11 or 12 digits (UPC-A) and 6 or 7 or 8 digits - (UPC-E). - - The 12th digit of UPC-A is the checksum and is added by the - library if not specified in the input; if it is specified, it must - be the right checksum or the code is rejected as invalid. For - UPC-E, 6 digit are considered to be the middle part of the code, a - leading 0 is assumed and the checksum is added; 7 digits are - either considered the initial part (leading digit 0 or 1, checksum - missing) or the final part (checksum specified, leading 0 - assumed); 8 digits are considered to be the complete code, with - leading 0 or 1 and checksum. For both UPC-A and UPC-E, a trailing - string of 2 digits or 5 digits is accepted as well. Therefore, the - following are examples of valid strings that can be encoded as UPC: - "01234567890" (UPC-A) "012345678905" (UPC-A with checksum), - "012345" (UPC-E), "01234567890 12" (UPC-A, add-2) and "01234567890 - 12345" (UPC-A, add-5), "0123456 12" (UPC-E, add-2). Please note - that when setting BARCODE_ANY to auto-detect the encoding to be - used, 12-digit strings and 7-digit strings will always be - identified as EAN. This because I expect most user to provide - input without a checksum. If you need to specify UPC-with-checksum - as input you must explicitly set BARCODE_UPC as a flag or use -e - upc on the command line. - -ISBN - ISBN numbers are encoded as EAN-13 symbols, with an optional add-5 - trailer. The ISBN frontend of the library accepts real ISBN - numbers and deals with any hyphen and, if present, the ISBN - checksum character before encoding data. Valid representations for - ISBN strings are for example: "1-56592-292-1", "3-89721-122-X" and - "3-89721-122-X 06900". - -CODE 128-B - This encoding can represent all of the printing ASCII characters, - from the space (32) to DEL (127). The checksum digit is mandatory - in this encoding. - -CODE 128-C - The "C" variation of Code-128 uses Code-128 symbols to represent - two digits at a time (Code-128 is made up of 104 symbols whose - interpretation is controlled by the start symbol being used). Code - 128-C is thus the most compact way to represent any even number of - digits. The encoder refuses to deal with an odd number of digits - because the caller is expected to provide proper padding to an - even number of digits. (Since Code-128 includes control symbols to - switch charset, it is theoretically possible to represent the odd - digit as a Code 128-A or 128-B symbol, but this tool doesn't - currently implement this option). - -CODE 128 RAW - Code-128 output represented symbol-by-symbol in the input string. - To override part of the problems outlined below in specifying - code128 symbols, this pseudo-encoding allows the used to specify a - list of code128 symbols separated by spaces. Each symbol is - represented by a number in the range 0-105. The list should - include the leading character.The checksum and the stop character - are automatically added by the library. Most likely this - pseudo-encoding will be used with BARCODE_NO_ASCII and some - external program to supply the printed text. - -CODE 39 - The code-39 standard can encode uppercase letters, digits, the - blank space, plus, minus, dot, star, dollar, slash, percent. Any - string that is only composed of such characters is accepted by the - code-39 encoder. To avoid loosing information, the encoder refuses - to encode mixed-case strings (a lowercase string is nonetheless - accepted as a shortcut, but is encoded as uppercase). - -INTERLEAVED 2 OF 5 - This encoding can only represent an even number of digits (odd - digits are represented by bars, and even digits by the - interleaving spaces). The name stresses the fact that two of the - five items (bars or spaces) allocated to each symbol are wide, - while the rest are narrow. The checksum digit is optional (can be - disabled via BARCODE_NO_CHECKSUM). Since the number of digits, - including the checksum, must be even, a leading zero is inserted - in the string being encoded if needed (this is specifically stated - in the specs I have access to). - -CODE 128 - Automatic selection between alphabet A, B and C of the Code-128 - standard. This encoding can represent all ASCII symbols, from 0 - (NUL) to 127 (DEL), as well as four special symbols, named F1, F2, - F3, F4. The set of symbols available in this encoding is not - easily represented as input to the barcode library, so the - following convention is used. In the input string, which is a - C-language null-terminated string, the NUL char is represented by - the value 128 (0x80, 0200) and the F1-F4 characters are - represented by the values 193-196 (0xc1-0xc4, 0301-0304). The - values have been chosen to ease their representation as escape - sequences. - - Since the shell doesn't seem to interpret escape sequences on the - command line, the "-b" option cannot be easily used to designate - the strings to be encoded. As a workaround you can resort to the - command echo, either within back-ticks or used separately to - create a file that is then fed to the standard-input of barcode - - assuming your echo command processes escape sequences. The - newline character is especially though to encode (but not - impossible unless you use a csh variant. - - These problems only apply to the command-line tool; the use of - library functions doesn't give any problem. In needed, you can use - the "code 128 raw" pseudo-encoding to represent code128 symbols by - their numerical value. This encoding is used late in the - auto-selection mechanism because (almost) any input string can be - represented using code128. - -CODABAR - Codabar can encode the ten digits and a few special symbols - (minus, plus, dollar, colon, bar, dot). The characters "A", "B", - "C" and "D" are used to represent four different start/stop - characters. The input string to the barcode library can include - the start and stop characters or not include them (in which case - "A" is used as start and "B" as stop). Start and stop characters - in the input string can be either all lowercase or all uppercase - and are always printed as uppercase. - -PLESSEY - Plessey barcodes can encode all the hexadecimal digits. Alphabetic - digits in the input string must either be all lowercase or all - uppercase. The output text is always uppercase. - -MSI - MSI can only encode the decimal digits. While the standard - specifies either one or two check digits, the current - implementation in this library only generates one check digit. - -CODE 93 - The code-93 standard can natively encode 48 different characters, - including uppercase letters, digits, the blank space, plus, minus, - dot, star, dollar, slash, percent, as well as five special - characters: a start/stop delimiter and four "shift characters" - used for extended encoding. Using this "extended encoding" - method, any standard 7-bit ASCII character can be encoded, but it - takes up two symbol lengths in barcode if the character is not - natively supported (one of the 48). The encoder here fully - implements the code 93 encoding standard. Any characters natively - supported (A-Z, 0-9, ".+-/$&%") will be encoded as such - for any - other characters (such as lower case letters, brackets, - parentheses, etc.), the encoder will revert to extended encoding. - As a note, the option to exclude the checksum will eliminate the - two modulo-47 checksums (called C and K) from the barcode, but this - probably will make it unreadable by 99% of all scanning systems. - These checksums are specified to be used at the firmware level, - and their absence will be interpreted as an invalid barcode. - - - - -*Node: PCL Output - PCL Output - ********** - - While the default output is Postscript (possibly EPS), and Postscript -can be post-processed to almost anything, it is sometimes desirable to -create output directly usable by the specific printer at hand. PCL is -currently supported as an output format for this reason. Please note -that the Y coordinate for PCL goes from top to bottom, while for -Postscript it goes from bottom to top. Consistently, while in -Postscript you specify the bottom-left corner as origin, for PCL you -specify the top-left corner. - - Barcode output for PCL Printers (HP LaserJet and compatibles), was -developed using PCL5 Reference manuals from HP. that really refers to -these printers: - * LaserJet III, III P, III D, III Si, - - * LaserJet 4 family - - * LaserJet 5 family - - * LaserJet 6 family - - * Color LaserJet - - * DeskJet 1200 and 1600. - - - However, barcode printing uses a very small subset of PCL, probably -also LaserJet II should print it without problem, but the resulting -text may be horrible. - - The only real difference from one printer to another really depends -on which font are available in the printer, used in printing the label -associated to the bars (if requested). - - Earlier LaserJet supports only bitmaps fonts, so these are not -"scalable". (Ljet II ?), Also these fonts, when available, have a -specified direction, and not all of them are available in both Portrait -and Landscape mode. - - From LaserJet 4 series, (except 4L/5L that are entry-level printers), -Arial scalable font should be available, so it's the "default font" -used by this program. - - LaserJet III series printers (and 4L, 5L), don't feature "Arial" as a -resident font, so you should use BARCODE_OUT_PCL_III instead of -BARCODE_OUT_PCL., and font the font used will be "Univers" instead of -"Arial". - - Results on compatible printers, may depend on consistency of PCL5 -compatibility, in doubt, try BARCODE_OUT_PCL_III - - PJL commands are not used here, as it's not very compatible. - - Tested Printers: - * Hp LaserJet 4050 - - * Hp LaserJet 2100 - - * Epson N-1200 emul PCL - - * Toshiba DP2570 (copier) + PCL option - - * Epson EPL-7100 emul. HP LaserJet II: bars print fine but text is - bad. - - - - -*Node: Bugs and Pending Issues - Bugs and Pending Issues. - ************************ - - The current management of borders/margins is far from optimal. The -"default" margin applied by the library interferes with the external -representation, but I feel it is mandatory to avoid creating barcode -output with no surrounding white space (the problem is especially -relevant for EPS output). - - EAN-128 is not (yet) supported. I plan to implement it pretty soon -and then bless the package as version 1.0. - - - - - -Tag Table:Node: Top153 - Node: Overview525 - Node: The Barcode Object1403 -Node: The Field List2820 -Node: The Intermediate Representation6585 -Node: Supported Flags8358 -Node: The API11342 -Node: The barcode Executable14028 -Node: The Command Line14457 -Node: Supported Encodings19556 -Node: PCL Output28996 -Node: Bugs and Pending Issues31315 - - - -End Tag Table
\ No newline at end of file diff --git a/glabels1/barcode-0.98/doc/doc.barcode b/glabels1/barcode-0.98/doc/doc.barcode deleted file mode 100644 index 7b46055..0000000 --- a/glabels1/barcode-0.98/doc/doc.barcode +++ /dev/null @@ -1,939 +0,0 @@ -\input texinfo @c -*-texinfo-*- -% -% doc.barcode - main file for the documentation -% -%%%% - -%------------------------------------------------------------------------------ -% -% NOTE FOR THE UNAWARE USER -% ========================= -% -% This file is a texinfo source. It isn't the binary file of some strange -% editor of mine. If you want ascii, you should "make barcodedoc.txt". -% -%------------------------------------------------------------------------------ - -% -% This is not a conventional info file... -% I use two extra features: -% - The '%' as a comment marker, if at beg. of line ("\%" -> "%") -% - leading blanks are allowed -% - -@comment %**start of header -@setfilename barcode.info -@settitle Barcode @value{version} -@iftex -@afourpaper -@end iftex -@comment %**end of header - -@setchapternewpage off - -@set version 0.98 -@set update-month March 2002 - -@finalout - -@ifinfo - -This file is the User's Manual for the barcode library (version -@value{version}). - -@end ifinfo - -@setchapternewpage odd -@titlepage -@c use the new format for titles -@title barcode @value{version} -@subtitle A library for drawing bar codes -@subtitle @value{update-month} - -@author by Alessandro Rubini (@code{rubini@@gnu.org}) - -@end titlepage -@setchapternewpage off -@headings single - - -@node Top, Overview, (dir), (dir) -@top Barcode tools - -This file documents version @value{version} of the barcode -library and sample programs (@value{update-month}). - -@menu -* Overview:: -* The Barcode Object:: -* Supported Flags:: -* The API:: -* The barcode Executable:: -* Supported Encodings:: -* PCL Output:: -* Bugs and Pending Issues:: -@end menu - - -%########################################################################## -%########################################################################## - -@node Overview, The Barcode Object, Top, Top -@chapter Overview - -The @dfn{barcode} package is mainly a C library for creating bar-code -output files. It also includes a command line front-end and (in a -foreseeable future) a graphic frontend. - -The package is designed as a library because we think the main use for -barcode-generation tools is inside more featured applications. The -library addresses bar code printing as two distinct problems: creation -of bar information and actual conversion to an output format. To this -aim we use an intermediate representation for bar codes, which is -currently documented in the @file{ps.c} source file (not in this -document). - -Note that the library and the accompanying material is released -according to the GPL license, not the LGPL one. A copy of the GPL is -included in the distribution tarball. - -%########################################################################## - -@node The Barcode Object, Supported Flags, Overview, Top -@chapter The Underlying Data Structure - -Every barcode-related function acts on a data structure defined in the -@file{barcode.h} header, which must be included by any C source file -that uses the library. The header is installed by @t{make install}. - -The definition of the data structure is included here for reference: - -@lisp -struct Barcode_Item @{ - int flags; /* type of encoding and other flags */ - char *ascii; /* malloced */ - char *partial; /* malloced too */ - char *textinfo; /* information about text placement */ - char *encoding; /* code name, filled by encoding engine */ - int width, height; /* output units */ - int xoff, yoff; /* output units */ - int margin; /* output units */ - double scalef; /* requested scaling for barcode */ - int error; /* an errno-like value, in case of failure */ -@}; -@end lisp - -The exact meaning of each field and the various flags implemented are -described in the following sections. - -Even though you won't usually need to act on the contents of this -structure, some of the functions in the library receive arguments that -are directly related to one or more of these fields. - -%========================================================================== - -@menu -* The Field List:: -* The Intermediate Representation:: -@end menu - -%-------------------------------------------------------------------------- -@node The Field List, The Intermediate Representation, The Barcode Object, The Barcode Object -@section The Fields - -@table @code - -@item int flags; - - The flags are, as you may suspect, meant to specify the exact - behaviour of the library. They are often passed as an argument - to @i{barcode} functions and are discussed in the next section. - -@item char *ascii; -@itemx char *partial; -@itemx char *textinfo; -@itemx char *encoding; - - These fields are internally managed by the library, and you are - not expected to touch them if you use the provided API. All - of them are allocated with @i{malloc}. - -@item int width; -@itemx int height; - - They specify the width and height of the @i{active} barcode - region (i.e., excluding the white margin), in the units used - to create output data (for postscript they are points, 1/72th - of an inch, 0.352 mm). The fields can be either assigned to - in the structure or via @i{Barcode_Position()}, at your - choice. If either value or both are left to their default - value of zero, the output engine will assign default values - according to the specified scaling factor. If the specified - width is bigger than needed (according to the scaling factor), - the output barcode will be centered in its requested - region. If either the width of the height are too small for - the specified scale factor, the output bar code will expand - symmetrically around the requested region. - -@item int xoff; -@itemx int yoff; - - The fields specify offset from the coordinate origin of the - output engine (for postscript, position 0,0 is the lower left - corner of the page). The fields can be either assigned to in - the structure or via @i{Barcode_Position()}, at your choice. - The offset specifies where the white margin begins, not where - the first bar will be printed. To print real ink to the - specified position you should set @i{margin} to 0. - -@item int margin; - - The white margin that will be left around the printed area of - the bar code. The same margin is applied to all sides of the - printed area. The default value for the margin is defined in - @file{barcode.h} as @t{BARCODE_DEFAULT_MARGIN} (10). - -@item double scalef; - - The enlarge or shrink value for the bar code over its default - dimension. The @i{width} and @i{scalef} fields interact deeply - in the creation of the output, and a complete description of - the issues appears later in this section. - -@item int error; - - The field is used when a @i{barcode} function fails to host - an @t{errno}-like integer value. - -@end table - - -@unnumberedsubsec Use of the @i{width} and @i{scalef} fields. - -A width unit is the width of the thinnest bar and/or space in the -chosen code; it defaults to 1 point if the output is postscript or -encapsulated postscript. - -Either or both the code width and the scale factor can be left -unspecified (i.e., zero). The library deals with defaults in the -following way: - -@table @i - -@item Both unspecified - - If both the width and the scale factor are unspecified, the - scale factor will default to 1.0 and the width is calculated - according to the actual width of the bar code being printed. - -@item Width unspecified - - If the width is not specified, it is calculated according to - the values of @i{scalef}. - -@item Scale factor unspecified - - If the scale factor is not specified, it will be chosen so - that the generated bar code exactly fits the specified width. - -@item Both specified - - The code will be printed inside the specified region according - to the specified scale factor. It will be aligned to the left. - If, however, the chosen width is too small for the specific - bar code and scaling factor, then the code will extend - symmetrically to the left and to the right of the chosen - region. - -@end table - -%-------------------------------------------------------------------------- -@node The Intermediate Representation, , The Field List, The Barcode Object -@section The Intermediate Representation - -The encoding functions print their output into the @t{partial} and -@t{texinfo} fields of the barcode data structure. Those fields, together -with position information, are then used to generate actual output. -This is an informal description of the intermediate format. - -The first char in @t{partial} tells how much extra space to add to the -left of the bars. For EAN-13, it is used to leave space to print the -first digit, other codes may have '0' for no-extra-space-needed. - -The next characters are alternating bars and spaces, as multiples of the -base dimension which is 1 unless the code is rescaled. Rescaling is -calculated as the ratio from the requested width and the calculated -width. Digits represent bar/space dimensions. Lower-case letters -represent those bars that should extend lower than the others: 'a' is -equivalent to '1', 'b' is '2' and so on up to 'i' which is equivalent to -'9'. Other letters will be used for encoding-specific meanings, as soon -as I implement them. - -The @t{textinfo} string is made up of fields @t{%lf:%lf:%c} separated by -blank space. The first integer is the x position of the character, -the second is the font size (before rescaling) and the char item is -the character to be printed. - -Both the @t{partial} and @t{textinfo} strings may include ``@t{-}'' or -``@t{+}'' as special characters (in @t{textinfo} the char should be a -stand-alone word). They state where the text should be printed: below -the bars (``@t{-}'', default) or above the bars. This is used, for -example, to print the add-5 and add-2 codes to the right of UPC or EAN -codes (the add-5 extension is mostly used in ISBN codes). - - - - -%========================================================================== - -@node Supported Flags, The API, The Barcode Object, Top -@chapter The Flags - -The following flags are supported by version @value{version} of the -library: - -@table @code - -@item BARCODE_ENCODING_MASK - - The mask is used to extract the encoding-type identifier from - the @i{flags} field. - -@item BARCODE_EAN -@itemx BARCODE_UPC -@itemx BARCODE_ISBN -@itemx BARCODE_128B -@itemx BARCODE_128C -@itemx BARCODE_128 -@itemx BARCODE_128RAW -@itemx BARCODE_39 -@itemx BARCODE_I25 -@itemx BARCODE_CBR -@itemx BARCODE_MSI -@itemx BARCODE_PLS -@itemx BARCODE_93 - - The currently supported encoding types: EAN (13 digits, 8 - digits, 13 + 2 add-on and 13 + 5 add-on), UPC (UPC-A, UPC-E, - UPC-A with 2 or 5 digit add-on), ISBN (with or without the - 5-digit add-on), CODE128-B (the whole set of printable - ASCII characters), CODE128-C (two digits encoded by each barcode - symbol), CODE128 (all ASCII values), a ``raw-input'' pseudo-code - that generates CODE128 output, CODE39 (alphanumeric), - "interleaved 2 of 5" (numeric), Codabar (numeric plus a few - symbols), MSI (numeric) and Plessey (hex digits). - @xref{Supported Encodings}. - -@item BARCODE_ANY - - This special encoding type (represented by a value of zero, so - it will be the default) tells the encoding procedure to look - for the first encoding type that can deal with a textual - string. Therefore, a 11-digit code will be printed as UPC (as - well as 6-digit, 11+2 and 11+5), a 12-digit (or 7-digit, or - 12+2 or 12+5) as EAN13, an ISBN code (with or without hyphens, - with or without add-5) will be encoded in its EAN13 - representation, an even number of digits is encoded using - CODE128C and a generic string is encoded using CODE128B. Since - code-39 offers a much larger representation for the same - text string, code128-b is preferred over code39 for - alphanumeric strings. - -@item BARCODE_NO_ASCII - - Instructs the engine not to print the ascii string on - output. By default the bar code is accompanied with an ascii - version of the text it encodes. - -@item BARCODE_NO_CHECKSUM - - Instructs the engine not to add the checksum character to the - output. Not all the encoding types can drop the checksum; - those where the checksum is mandatory (like EAN and UPC) - just ignore the flag. - -@item BARCODE_OUTPUT_MASK - - The mask is used to extract the output-type identifier from - the @i{flags} field. - -@item BARCODE_OUT_PS -@itemx BARCODE_OUT_EPS -@itemx BARCODE_OUT_PCL -@itemx BARCODE_OUT_PCL_III - - The currently supported encoding types: full-page postscript - and encapsulated postscript; PCL (print command language, for - HP printers) and PCL-III (same as PCL, but uses a font not - available on older printers). - -@item BARCODE_OUT_NOHEADERS - - The flag instructs the printing engine not to print the header - and footer part of the file. This makes sense for the - postscript engine but might not make sense for other engines; - such other engines will silently ignore the flag just like - the PCL back-end does. - -@end table - -%########################################################################## - -@node The API, The barcode Executable, Supported Flags, Top -@chapter Functions Exported by the Library - -%MANPAGE barcode.3 -%M .TH BARCODE 3 "October 1999" "GNU" "GNU barcode" -%M .UC 4 -%M .SH NAME -%M barcode \- a library to create and print bar codes -%M .SH SYNOPSIS -%M .B #include <barcode.h> -%M .sp -%M .BI "struct Barcode_Item *Barcode_Create(char *" text ");" -%M .br -%M .BI "int Barcode_Delete(struct Barcode_Item *" bc ");" -%M .br -%M .BI "int Barcode_Encode(struct Barcode_Item *" bc ", int " flags ");" -%M .br -%M .BI "int Barcode_Print(struct Barcode_Item *" bc ", FILE *" f ", int " flags ");" -%M .br -%M .BI "int Barcode_Position(struct Barcode_Item *" bc ", int " wid ", int " hei ", int " xoff ", int " yoff " , double " scalef ");" -%M .br -%M .BI "int Barcode_Encode_and_Print(char *" text ", FILE *" f ", int " wid ", int " hei ", int " xoff ", int " yoff ", int " flags ");" -%M .br -%M .BI "int Barcode_Version(char *" versionname ");" -%M -%M .SH DESCRIPTION -%M -%M The barcode family of library functions is meant to ease -%M creation of bar-code printouts. -%M -%M The information below is extracted from the texinfo file, which is the -%M preferred source of information. - -The functions included in the barcode library are declared in the -header file @t{barcode.h}. They perform the following tasks: - -@table @code - -@item struct Barcode_Item *Barcode_Create(char *text); - The function creates a new barcode object to deal with a - specified text string. It returns NULL in case of failure and - a pointer to a barcode data structure in case of success. - -@item int Barcode_Delete(struct Barcode_Item *bc); - Destroy a barcode object. Always returns 0 (success) - -@item int Barcode_Encode(struct Barcode_Item *bc, int flags); - Encode the text included in the @i{bc} object. Valid flags are - the encoding type (other flags are ignored) and - BARCODE_NO_CHECKSUM (other flags are silently ignored); if the - flag argument is zero, @t{bc->flags} will apply. The function - returns 0 on success and -1 in case of error. After - successful termination the data structure will host the - description of the bar code and its textual representation, - after a failure the @t{error} field will include the reason of - the failure. - -@item int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags); - Print the bar code described by @t{bc} to the specified file. - Valid flags are the output type, @t{BARCODE_NO_ASCII} and - @t{BARCODE_OUT_NOHEADERS}, other flags are ignored. If any of - these flags is zero, it will be inherited from @t{bc->flags} - which therefore takes precedence. The function returns 0 on - success and -1 in case of error (with @t{bc->error} set - accordingly). In case of success, the bar code is printed to - the specified file, which won't be closed after use. - -@item int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff, double scalef); - The function is a shortcut to assign values to the data - structure. - -@item int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags); - The function deals with the whole life of the barcode - object by calling the other functions; it uses all the specified - flags. - -@item int Barcode_Version(char *versionname); - Returns the current version as an integer number of the form - major * 10000 + minor * 100 + release. Therefore, version - 1.03.5 will be returned as 10305 and version 0.53 as 5300. If - the argument is non-null, it will be used to return the version - number as a string. Note that the same information is available from - two preprocessor macros: @t{BARCODE_VERSION} (the string) and - @t{BARCODE_VERSION_INT} (the integer number). - -@end table - -%MANPAGE END - -%########################################################################## - -@node The barcode Executable, Supported Encodings, The API, Top -@chapter The @i{barcode} frontend program - -%MANPAGE barcode.1 -%M .TH BARCODE 1 "October 2001" "GNU" "GNU barcode" -%M .UC 4 -%M .SH NAME -%M barcode \- a stand alone program to run the barcode library -%M .SH SYNOPSIS -%M .B barcode -%M [\-b - | string] [\-e encoding] [\-o - | outfile] [ -%M .I other-flags -%M ] -%M .SH DESCRIPTION -%M -%M The information below is extracted from the texinfo file, which is the -%M preferred source of information. -%M .PP -The @b{barcode} program is a front-end to access some features of the -library from the command line. It is able to read user supplied -strings from the command line or a data file (standard input by default) -and encode all of them. - -%M .SH OPTIONS -%M .PP - -@menu -* The Command Line:: -@end menu - -%-------------------------------------------------------------------------- -@node The Command Line, , The barcode Executable, The barcode Executable -@section The Command Line - - -@b{barcode} accepts the following options: - -@table @code - -@item --help or -h - Print a usage summary and exit. - -@item -i filename - Identify a file where strings to be encoded are read from. If - missing (and if @t{-b} is not used) it defaults to standard - input. Each data line of the input file will be used to create - one barcode output. - -@item -o filename - Output file. It defaults to standard output. - -@item -b string - Specify a single ``barcode'' string to be encoded. - The option can be used multiple times in order to encode - multiple strings (this will result in multi-page postscript - output or a table of barcodes if @t{-t} is specified). The - strings must match the encoding chosen; if it doesn't - match the program will print a warning to @t{stderr} and - generate ``blank'' output (although not zero-length). - Please note that a string including spaces or - other special characters must be properly quoted. - -@item -e encoding - @b{encoding} is the name of the chosen encoding format being - used. It defaults to the value of the environment variable - @t{BARCODE_ENCODING} or to auto detection if the environment is - also unset. - -@item -g geometry - The geometry argument is of the form ``[@i{<width>} @t{x} - @i{<height>}] [@t{+} @i{<xmargin>} @t{+} @i{<ymargin>}]'' (with - no intervening spaces). Unspecified margin values will result in - no margin; unspecified size results in default size. - The specified values represent print points by - default, and can be inches, millimeters or other units - according to the @t{-u} option or the @t{BARCODE_UNIT} - environment variable. The argument is used to place the - printout code on the page. Note that an additional white - margin of 10 points is added to the printout. If the option is - unspecified, @t{BARCODE_GEOMETRY} is looked up in the - environment, if missing a default size and no margin (but the - default 10 points) are used. - -@item -t table-geometry - Used to print several barcodes to a single page, this option - is meant to be used to print stickers. The argument is of the - form ``@i{<columns>} @t{x} @i{<lines>} [@t{+} @i{<leftmargin>} - @t{+} @i{<bottommargin>} [@t{-} @i{<rightmargin>} [@t{-} - @i{<topmargin>}]]]'' (with no intervening spaces); if missing, - the top and right margin will default to be the same as the - bottom and left margin. The margins are specified in print - points or in the chosen unit (see @t{-u} below). If the - option is not specified, @t{BARCODE_TABLE} is looked up in the - environment, otherwise no table is printed and each barcode - will get its own page. The size (but not the position) - of a barcode item within a table can also be selected using - @t{-g} (see "geometry" above), without struggling with - external and internal margins. I still think management of - geometries in a table is suboptimal, but I can't make it - better without introducing incompatibilities. - - -@item -m margin(s) - Specifies an internal margin for each sticker in the - table. The argument is of the form - ``@i{<xmargin>}@t{,}@i{<ymargin>}'' and the margin is applied - symmetrically to the sticker. If unspecified, the environment - variable @t{BARCODE_MARGIN} is used or a default internal - margin of 10 points is used. - -@item -n - ``Numeric'' output: don't print the ASCII form of the code, - only the bars. - -@item -c - No checksum character (for encodings that allow it, like code 39, - other codes, like UPC or EAN, ignore this option). - -@item -E - Encapsulated postscript (default is normal postscript). When - the output is generated as EPS only one barcode is encoded. - -@item -P - PCL output. Please note that the Y direction goes from top - to bottom for PCL, and the origin for an image is the top-left - corner instead of the bottom-left - -@item -p pagesize - Specify a non-default page size. The page size can be specified - in millimeters, inches or plain numbers (for example: "@t{210x297mm}", - "@t{8.5x11in}", "@t{595x842}"). A page specification as numbers - will be interpreted according to the current unit specification - (see @t{-u} below). If libpaper is available, - you can also specify the page size with its name, like "@t{A3}" - or "@t{letter}" (libpaper is a standard component of Debian - GNU/Linux, but may be missing elsewhere). The default page - size is your system-wide default if libpaper is there, A4 otherwise. - -@item -u unit - Choose the unit used in size specifications. Accepted values - are ``mm'', ``cm'', ``in'' and ``pt''. By default, the program - will check @t{BARCODE_UNIT} in the environment, and assume - points otherwise (this behaviour is compatible with 0.92 and - previous versions. If @t{-u} appears more than once, each - instance will modified the behaviour for the arguments at its - right, as the command line is processes left to right. The - program internally works with points, and any size is - approximated to the nearest multiple of one point. The @t{-u} - option affect @t{-g} (geometry), @t{-t} (table) and @t{-p} - (page size). - -@end table - -%M .SH ENCODING TYPES -%M .PP - -%########################################################################## -@node Supported Encodings, PCL Output, The barcode Executable, Top -@chapter Supported Encodings - -The program encodes text strings passed either on the command line -(with -b) or retrieved from standard input. The text representation is -interpreted according to the following rules. When auto-detection -of the encoding is enabled (i.e, no explicit encoding type is specified), -the encoding types are scanned to find one that can digest the text string. -The following list of supported types is sorted in the same order -the library uses when auto-detecting a suitable encoding for a string. - -@table @var - -@item EAN - The EAN frontend is similar to UPC; it accepts strings of - digits, 12 or 7 characters long. Strings of 13 or 8 characters - are accepted if the provided checksum digit is correct. - I expect most users to feed input without a - checksum, though. The add-2 and add-5 extension are accepted for both - the EAN-13 and the EAN-8 encodings. - The following are example of valid input strings: - ``@t{123456789012}'' (EAN-13), ``@t{1234567890128}'' (EAN-13 wih - checksum), ``@t{1234567}'' (EAN-8), ``@t{12345670 12345}'' (EAN-8 - with checksum and add-5), - ``@t{123456789012 12}'' (EAN-13 with add-2), - ``@t{123456789012 12345}'' (EAN-13 with add-5). - -@item UPC - The UPC frontend accepts only strings made up of digits (and, - if a supplemental encoding is used, a blank to separate it). - It accepts strings of 11 or 12 digits (UPC-A) and 6 or 7 or 8 - digits (UPC-E). - - The 12th digit of UPC-A is the checksum and is added by the - library if not specified in the input; if it is specified, it - must be the right checksum or the code is rejected as invalid. - For UPC-E, 6 digit are considered to be the middle part of the - code, a leading 0 is assumed and the checksum is added; - 7 digits are either considered the initial part (leading digit - 0 or 1, checksum missing) or the final part (checksum specified, - leading 0 assumed); 8 digits are considered to be the complete code, - with leading 0 or 1 and checksum. - For both UPC-A and UPC-E, a trailing string of 2 digits or 5 digits - is accepted as well. Therefore, the following are examples - of valid strings that can be encoded as UPC: - ``@t{01234567890}'' (UPC-A) - ``@t{012345678905}'' (UPC-A with checksum), ``@t{012345}'' - (UPC-E), ``@t{01234567890 12}'' (UPC-A, add-2) and - ``@t{01234567890 12345}'' (UPC-A, add-5), ``@t{0123456 12}'' - (UPC-E, add-2). - Please note that when setting @t{BARCODE_ANY} to auto-detect - the encoding to be used, 12-digit strings and 7-digit strings - will always be identified as EAN. This because I expect most - user to provide input without a checksum. If you need to - specify UPC-with-checksum as input you must explicitly set - @t{BARCODE_UPC} as a flag or use @t{-e upc} on the command line. - -@item ISBN - ISBN numbers are encoded as EAN-13 symbols, with an optional - add-5 trailer. The ISBN frontend of the library accepts real - ISBN numbers and deals with any hyphen and, if present, the - ISBN checksum character before encoding data. Valid - representations for ISBN strings are for example: - ``@t{1-56592-292-1}'', ``@t{3-89721-122-X}'' and ``@t{3-89721-122-X - 06900}''. - -@item code 128-B - This encoding can represent all of the printing ASCII - characters, from the space (32) to DEL (127). The checksum - digit is mandatory in this encoding. - -@item code 128-C - The ``C'' variation of Code-128 uses Code-128 symbols to - represent two digits at a time (Code-128 is made up of 104 - symbols whose interpretation is controlled by the start symbol - being used). Code 128-C is thus the most compact way to - represent any even number of digits. The encoder refuses to - deal with an odd number of digits because the caller is - expected to provide proper padding to an even number of - digits. (Since Code-128 includes control symbols to switch - charset, it is theoretically possible to represent the odd - digit as a Code 128-A or 128-B symbol, but this tool doesn't - currently implement this option). - -@item code 128 raw - Code-128 output represented symbol-by-symbol in the input - string. To override part of the problems outlined below in - specifying code128 symbols, this pseudo-encoding allows the - used to specify a list of code128 symbols separated by - spaces. Each symbol is represented by a number in the range - 0-105. The list should include the leading character.The - checksum and the stop character are automatically added by the - library. Most likely this pseudo-encoding will be used with - @t{BARCODE_NO_ASCII} and some external program to supply the - printed text. - -@item code 39 - The code-39 standard can encode uppercase letters, digits, the - blank space, plus, minus, dot, star, dollar, slash, percent. - Any string that is only composed of such characters is - accepted by the code-39 encoder. To avoid loosing information, - the encoder refuses to encode mixed-case strings (a lowercase - string is nonetheless accepted as a shortcut, but is encoded - as uppercase). - -@item interleaved 2 of 5 - This encoding can only represent an even number of digits - (odd digits are represented by bars, and even digits by the - interleaving spaces). The name stresses the fact that two - of the five items (bars or spaces) allocated to each symbol - are wide, while the rest are narrow. The checksum digit is - optional (can be disabled via @t{BARCODE_NO_CHECKSUM}). - Since the number of digits, including the checksum, must be even, - a leading zero is inserted in the string being encoded if needed - (this is specifically stated in the specs I have access to). - -@item code 128 - Automatic selection between alphabet A, B and C of the Code-128 - standard. This encoding can represent all ASCII symbols, from - 0 (NUL) to 127 (DEL), as well as four special symbols, named - F1, F2, F3, F4. The set of symbols available in this encoding - is not easily represented as input to the @i{barcode} library, - so the following convention is used. In the input string, - which is a C-language null-terminated string, the NUL char - is represented by the value 128 (0x80, 0200) and the F1-F4 characters - are represented by the values 193-196 (0xc1-0xc4, 0301-0304). - The values have been chosen to ease their representation as - escape sequences. - - Since the shell doesn't seem to interpret escape sequences on the - command line, the "-b" option cannot be easily used to designate - the strings to be encoded. As a workaround you can resort - to the command @t{echo}, either within back-ticks or used - separately to create a file that is then fed to the standard-input - of @i{barcode} -- assuming your @t{echo} command processes escape - sequences. The newline character is especially though to encode - (but not impossible unless you use a @t{csh} variant. - - These problems only apply to the command-line tool; the use of - library functions doesn't give any problem. In needed, you can - use the ``@i{code 128 raw}'' pseudo-encoding to represent - code128 symbols by their numerical value. This encoding is - used late in the auto-selection mechanism because (almost) any - input string can be represented using code128. - -@item Codabar - Codabar can encode the ten digits and a few special symbols - (minus, plus, dollar, colon, bar, dot). The characters - ``@t{A}'', ``@t{B}'', ``@t{C}'' and ``@t{D}'' are used to - represent four different start/stop characters. The input - string to the barcode library can include the start and stop - characters or not include them (in which case ``@t{A}'' is - used as start and ``@t{B}'' as stop). Start and stop - characters in the input string can be either all lowercase or - all uppercase and are always printed as uppercase. - -@item Plessey - Plessey barcodes can encode all the hexadecimal - digits. Alphabetic digits in the input string must either be - all lowercase or all uppercase. The output text is always - uppercase. - -@item MSI - MSI can only encode the decimal digits. While the standard - specifies either one or two check digits, the current - implementation in this library only generates one check digit. - -@item code 93 - The code-93 standard can natively encode 48 different characters, - including uppercase letters, digits, the blank space, plus, minus, - dot, star, dollar, slash, percent, as well as five special - characters: a start/stop delimiter and four "shift characters" used - for extended encoding. Using this "extended encoding" method, any - standard 7-bit ASCII character can be encoded, but it takes up two - symbol lengths in barcode if the character is not natively supported - (one of the 48). - The encoder here fully implements the code 93 encoding standard. - Any characters natively supported (A-Z, 0-9, ".+-/$&%") will be - encoded as such - for any other characters (such as lower case - letters, brackets, parentheses, etc.), the encoder will revert - to extended encoding. - As a note, the option to exclude the checksum will eliminate the - two modulo-47 checksums (called C and K) from the barcode, but this - probably will make it unreadable by 99% of all scanning systems. - These checksums are specified to be used at the firmware level, - and their absence will be interpreted as an invalid barcode. - - -@end table - -%M .SH PCL OUTPUT - -%########################################################################## -@node PCL Output, Bugs and Pending Issues, Supported Encodings, Top -@chapter PCL Output - -While the default output is Postscript (possibly EPS), and Postscript -can be post-processed to almost anything, it is sometimes desirable to -create output directly usable by the specific printer at hand. -PCL is currently supported as an output format for this reason. -Please note that the Y coordinate for PCL goes from top to bottom, while -for Postscript it goes from bottom to top. Consistently, while in -Postscript you specify the bottom-left corner as origin, for PCL -you specify the top-left corner. - -Barcode output for PCL Printers (HP LaserJet and compatibles), -was developed using PCL5 Reference manuals from HP. -that really refers to these printers: -@itemize @bullet - -@item -LaserJet III, III P, III D, III Si, - -@item -LaserJet 4 family - -@item -LaserJet 5 family - -@item -LaserJet 6 family - -@item -Color LaserJet - -@item -DeskJet 1200 and 1600. - -@end itemize - -However, barcode printing uses a very small subset of PCL, probably also -LaserJet II should print it without problem, but the resulting text may -be horrible. - -The only real difference from one printer to another really depends on -which font are available in the printer, used in printing the label -associated to the bars (if requested). - -Earlier LaserJet supports only bitmaps fonts, so these are not -"scalable". (Ljet II ?), Also these fonts, when available, have a -specified direction, and not all of them are available in -both Portrait and Landscape mode. - -From LaserJet 4 series, (except 4L/5L that are entry-level printers), -Arial scalable font should be available, so it's the "default font" -used by this program. - -LaserJet III series printers (and 4L, 5L), don't feature "Arial" as a -resident font, so you should use @t{BARCODE_OUT_PCL_III} instead of -@t{BARCODE_OUT_PCL.}, and font the font used will be "Univers" instead -of "Arial". - -Results on compatible printers, may depend on consistency of -PCL5 compatibility, in doubt, try BARCODE_OUT_PCL_III - -PJL commands are not used here, as it's not very compatible. - - -Tested Printers: -@itemize @bullet -@item -Hp LaserJet 4050 -@item -Hp LaserJet 2100 -@item -Epson N-1200 emul PCL -@item -Toshiba DP2570 (copier) + PCL option -@item -Epson EPL-7100 emul. HP LaserJet II: bars print fine but text is bad. -@end itemize - - -%M .SH BUGS - -%########################################################################## -@node Bugs and Pending Issues, , PCL Output, Top -@chapter Bugs and Pending Issues. - -The current management of borders/margins is far from optimal. The -``default'' margin applied by the library interferes with the external -representation, but I feel it is mandatory to avoid creating barcode -output with no surrounding white space (the problem is especially -relevant for EPS output). - -EAN-128 is not (yet) supported. I plan to implement it pretty soon and -then bless the package as version 1.0. - -%M .SH "SEE ALSO" -%M \fBbarcode(3)\fP -%M -%M .SH AUTHORS -%M Alessandro Rubini <rubini@gnu.org> (maintainer) -%M .PP -%M Leonid A. Broukhis <leob@mailcom.com> (several encodings) -%M .PP -%M Andrea Scopece <a.scopece@tin.it> (PCL output) -%MANPAGE END - -@iftex -@contents -@end iftex - -@bye -@c LocalWords: barcode ifinfo titlepage iftex texinfo ascii frontend LGPL -@c LocalWords: tarball malloced textinfo scalef isbn Plessey codabar GPL Ljet -@c LocalWords: LocalWords LaserJet Univers Arial Debian libpaper pagesize -@c LocalWords: Epson MANPAGE stderr barcodes emul DeskJet xmargin ymargin -@c LocalWords: leftmargin rightmargin topmargin bottommargin unset struct -@c LocalWords: NOHEADERS yoff xoff versionname errno malloc behaviour charset diff --git a/glabels1/barcode-0.98/doc/infofilter b/glabels1/barcode-0.98/doc/infofilter deleted file mode 100755 index 92bc8b7..0000000 --- a/glabels1/barcode-0.98/doc/infofilter +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/sed -f - - -# allow "%" as a comment char, but only at the beginning of the line -s/^%/@c / -#s/[^\\]%.*$// -s/^\\%/%/ - -#preserve blanks in @lisp blocks -/@lisp/,/@end lisp/ p -/@lisp/,/@end lisp/ d - -# remove leading blanks -s/^[ ]*// - -#s/\\t/@code/g diff --git a/glabels1/barcode-0.98/doc/manpager b/glabels1/barcode-0.98/doc/manpager deleted file mode 100755 index 46de5be..0000000 --- a/glabels1/barcode-0.98/doc/manpager +++ /dev/null @@ -1,120 +0,0 @@ -#! /usr/bin/awk -f -# Copyright (c) 1998-2001 Alessandro Rubini - -BEGIN {IN=0} - -/^%MANPAGE END/ {IN=0; next} -/^%MANPAGE/ {IN=1; USELP=NEEDLP=INTABLE=0; NAME=$2; next} -IN==0 {next} - -/^%MSKIP/ {SKIP=1;next} -/^%M/ {SKIP=0} - -/^@menu/ {SKIP=1;next} -/^@end menu/ {SKIP=0;next} - -SKIP==1 {next} -/^%M$/ {next} -/^@ignore/ {next} -/^@end ign/ {next} - -#now perform all the substitutions needed - - { gsub("^%M ?",""); } - -# Use gensub for converting tags: itz Sep 30 1998 -# -# However, the gensub function is gawk-specific, and we want things -# to work with original-awk too (for portability). -# Therefore, use a normal gsub, even though it's a subobptimal solution -# as it may step in extra braces. The good solution will be piping to sed, -# or match, extract subesxpression, replace, reinsert -- bleah... -# (ARub, Oct 10 2000) -/@b\{/ { - #$0 = gensub(/@b\{([^}]+)\}/, "\\\\fB\\1\\\\fP","g"); - gsub("@b\{","\\fB"); - gsub("\}","\\fP"); -} - -/@var\{/ { - #$0 = gensub(/@var\{([^}]+)\}/, "\\\\fI\\1\\\\fP","g"); - gsub("@var\{","\\fB"); - gsub("\}","\\fP"); -} - -/@(samp|code|file)\{/ { - #$0 = gensub(/@(samp|code|file)\{([^}]+)\}/, "`\\2'","g"); - gsub("@(samp|code|file)\{",""); - gsub("\}",""); -} - - -/@xref\{.*\}\./ { - gsub(/@xref\{.*\}\./,""); -} - -/@ref\{.*\}/ { - gsub("@ref\{",""); - gsub("\}",""); -} - -/@\*/ { - gsub(/@\* */,"\n.br\n"); -} - -/@[a-z]+\{/ { - gsub("@[a-z]+\\{",""); - gsub("}",""); - } - -/^@table/ { TABLE=1; } -/^@itemize/ { TABLE=1; next} - -/^@item/ { - gsub("^@item *",""); - printf ".TP\n%s\n",$0 > NAME; - NEEDLP=0; next; - } - -/^@end table/ {TABLE=0} -/^@end itemize/ {TABLE=0} - -# discard other texinfo commands - -/^@/ {next} - -# manage comments and '%' - -/^%/ {next} - - - { - gsub("[^\\\\]%.*$",""); - gsub("\\%","%"); - } - -# remove leading blanks - -/^[ \t]/ {gsub("^[ \t]*","");} - -# put a .LP at blank lines - -/^.nf/ {USELP=0} -/^.fi/ {USELP=1} - -/^$/ {if (USELP) {NEEDLP++; next;} } - - -/./ { if (NEEDLP) { printf "\n.LP\n" > NAME; NEEDLP=0; } } - -/^.TH/ {USELP=1} - -# Escape single slashes (e.g. in documentation for `-l' command line option) - - {gsub("\\\\ ", "\\\\ ");} - - {gsub("~", "~~");} - - {print > NAME} - - diff --git a/glabels1/barcode-0.98/doc/mktxt b/glabels1/barcode-0.98/doc/mktxt deleted file mode 100755 index bd3f88b..0000000 --- a/glabels1/barcode-0.98/doc/mktxt +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/awk -f - -# Warning: this may use gnu-awk features - -# Program to create ascii from info; -# Missing: table of contents - -# skip - -BEGIN {NODELINE=0; NODE=0; KEEP=1; printf "\n\n"} - - -/^\037$/ { NODELINE=1; NODE=NODE+1; KEEP=1; next} - -NODE==1 { next } - -NODELINE==1 { - NODELINE=2; - sub("^.*Node: ","*Node: "); - sub(",.*$",""); - printf "\n\n\n%s",$0; -#print - next; - } - -NODELINE { NODELINE=NODELINE+1 } - -NODELINE==4 { printf "\t\t\t\t"; } -NODELINE==5 { printf "\t\t\t\t"; NODELINE=0} - - -/^\* Menu:$/ { KEEP=0 } - - - -KEEP==0 { next } - -{ print } diff --git a/glabels1/barcode-0.98/doc/texi2html b/glabels1/barcode-0.98/doc/texi2html deleted file mode 100755 index 2c61aa9..0000000 --- a/glabels1/barcode-0.98/doc/texi2html +++ /dev/null @@ -1,2021 +0,0 @@ -#!/usr/local/bin/perl -'di '; -'ig 00 '; -#+############################################################################## -# # -# File: texi2html # -# # -# Description: Program to transform most Texinfo documents to HTML # -# # -#-############################################################################## - -# @(#)texi2html 1.51 09/10/96 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch - -# The man page for this program is included at the end of this file and can be -# viewed using the command 'nroff -man texi2html'. -# Please read the copyright at the end of the man page. - -#+++############################################################################ -# # -# Constants # -# # -#---############################################################################ - -$DEBUG_TOC = 1; -$DEBUG_INDEX = 2; -$DEBUG_BIB = 4; -$DEBUG_GLOSS = 8; -$DEBUG_DEF = 16; -$DEBUG_HTML = 32; -$DEBUG_USER = 64; - -$BIBRE = '\[[\w\/]+\]'; # RE for a bibliography reference -$FILERE = '[\/\w.+-]+'; # RE for a file name -$VARRE = '[^\s\{\}]+'; # RE for a variable name -$NODERE = '[^@{}:\'`",]+'; # RE for a node name -$NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names -$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE) - -$ERROR = "***"; # prefix for errors and warnings -$THISPROG = "texi2html 1.51"; # program name and version -$HOMEPAGE = "http://wwwcn.cern.ch/dci/texi2html/"; # program home page -$TODAY = &pretty_date; # like "20 September 1993" -$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split -$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections -$html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//EN">'; - -# -# language dependent constants -# -#$LDC_SEE = 'see'; -#$LDC_SECTION = 'section'; -#$LDC_IN = 'in'; -#$LDC_TOC = 'Table of Contents'; -#$LDC_GOTO = 'Go to the'; -#$LDC_FOOT = 'Footnotes'; -# TODO: @def* shortcuts - -# -# pre-defined indices -# -%predefined_index = ( - 'cp', 'c', - 'fn', 'f', - 'vr', 'v', - 'ky', 'k', - 'pg', 'p', - 'tp', 't', - ); - -# -# valid indices -# -%valid_index = ( - 'c', 1, - 'f', 1, - 'v', 1, - 'k', 1, - 'p', 1, - 't', 1, - ); - -# -# texinfo section names to level -# -%sec2level = ( - 'top', 0, - 'chapter', 1, - 'unnumbered', 1, - 'majorheading', 1, - 'chapheading', 1, - 'appendix', 1, - 'section', 2, - 'unnumberedsec', 2, - 'heading', 2, - 'appendixsec', 2, - 'appendixsection', 2, - 'subsection', 3, - 'unnumberedsubsec', 3, - 'subheading', 3, - 'appendixsubsec', 3, - 'subsubsection', 4, - 'unnumberedsubsubsec', 4, - 'subsubheading', 4, - 'appendixsubsubsec', 4, - ); - -# -# accent map, TeX command to ISO name -# -%accent_map = ( - '"', 'uml', - '~', 'tilde', - '^', 'circ', - '`', 'grave', - '\'', 'acute', - ); - -# -# texinfo "simple things" (@foo) to HTML ones -# -%simple_map = ( - # cf. makeinfo.c - "*", "<BR>", # HTML+ - " ", " ", - "\n", "\n", - "|", "", - # spacing commands - ":", "", - "!", "!", - "?", "?", - ".", ".", - ); - -# -# texinfo "things" (@foo{}) to HTML ones -# -%things_map = ( - 'TeX', 'TeX', - 'br', '<P>', # paragraph break - 'bullet', '*', - 'copyright', '(C)', - 'dots', '...', - 'equiv', '==', - 'error', 'error-->', - 'expansion', '==>', - 'minus', '-', - 'point', '-!-', - 'print', '-|', - 'result', '=>', - 'today', $TODAY, - ); - -# -# texinfo styles (@foo{bar}) to HTML ones -# -%style_map = ( - 'asis', '', - 'b', 'B', - 'cite', 'CITE', - 'code', 'CODE', - 'ctrl', '&do_ctrl', # special case - 'dfn', 'STRONG', # DFN tag is illegal in the standard - 'dmn', '', # useless - 'emph', 'EM', - 'file', '"TT', # will put quotes, cf. &apply_style - 'i', 'I', - 'kbd', 'KBD', - 'key', 'KBD', - 'r', '', # unsupported - 'samp', '"SAMP', # will put quotes, cf. &apply_style - 'sc', '&do_sc', # special case - 'strong', 'STRONG', - 't', 'TT', - 'titlefont', '', # useless - 'var', 'VAR', - 'w', '', # unsupported - ); - -# -# texinfo format (@foo/@end foo) to HTML ones -# -%format_map = ( - 'display', 'PRE', - 'example', 'PRE', - 'format', 'PRE', - 'lisp', 'PRE', - 'quotation', 'BLOCKQUOTE', - 'smallexample', 'PRE', - 'smalllisp', 'PRE', - # lists - 'itemize', 'UL', - 'enumerate', 'OL', - # poorly supported - 'flushleft', 'PRE', - 'flushright', 'PRE', - ); - -# -# texinfo definition shortcuts to real ones -# -%def_map = ( - # basic commands - 'deffn', 0, - 'defvr', 0, - 'deftypefn', 0, - 'deftypevr', 0, - 'defcv', 0, - 'defop', 0, - 'deftp', 0, - # basic x commands - 'deffnx', 0, - 'defvrx', 0, - 'deftypefnx', 0, - 'deftypevrx', 0, - 'defcvx', 0, - 'defopx', 0, - 'deftpx', 0, - # shortcuts - 'defun', 'deffn Function', - 'defmac', 'deffn Macro', - 'defspec', 'deffn {Special Form}', - 'defvar', 'defvr Variable', - 'defopt', 'defvr {User Option}', - 'deftypefun', 'deftypefn Function', - 'deftypevar', 'deftypevr Variable', - 'defivar', 'defcv {Instance Variable}', - 'defmethod', 'defop Method', - # x shortcuts - 'defunx', 'deffnx Function', - 'defmacx', 'deffnx Macro', - 'defspecx', 'deffnx {Special Form}', - 'defvarx', 'defvrx Variable', - 'defoptx', 'defvrx {User Option}', - 'deftypefunx', 'deftypefnx Function', - 'deftypevarx', 'deftypevrx Variable', - 'defivarx', 'defcvx {Instance Variable}', - 'defmethodx', 'defopx Method', - ); - -# -# things to skip -# -%to_skip = ( - # comments - 'c', 1, - 'comment', 1, - # useless - 'contents', 1, - 'shortcontents', 1, - 'summarycontents', 1, - 'footnotestyle', 1, - 'end ifclear', 1, - 'end ifset', 1, - 'titlepage', 1, - 'end titlepage', 1, - # unsupported commands (formatting) - 'afourpaper', 1, - 'cropmarks', 1, - 'finalout', 1, - 'headings', 1, - 'need', 1, - 'page', 1, - 'setchapternewpage', 1, - 'everyheading', 1, - 'everyfooting', 1, - 'evenheading', 1, - 'evenfooting', 1, - 'oddheading', 1, - 'oddfooting', 1, - 'smallbook', 1, - 'vskip', 1, - 'filbreak', 1, - # unsupported formats - 'cartouche', 1, - 'end cartouche', 1, - 'group', 1, - 'end group', 1, - ); - -#+++############################################################################ -# # -# Argument parsing, initialisation # -# # -#---############################################################################ - -$use_bibliography = 1; -$use_acc = 0; -$debug = 0; -$doctype = ''; -$check = 0; -$expandinfo = 0; -$use_glossary = 0; -$invisible_mark = ''; -$use_iso = 0; -@include_dirs = (); -$show_menu = 0; -$number_sections = 0; -$split_node = 0; -$split_chapter = 0; -$monolithic = 0; -$verbose = 0; -$usage = <<EOT; -This is $THISPROG -To convert a Texinfo file to HMTL: $0 [options] file - where options can be: - -expandinfo : use \@ifinfo sections, not \@iftex - -glossary : handle a glossary - -invisible name: use 'name' as an invisible anchor - -I dir : search also for files in 'dir' - -menu : handle menus - -monolithic : output only one file including ToC - -number : number sections - -split_chapter : split on main sections - -split_node : split on nodes - -usage : print usage instructions - -verbose : verbose output -To check converted files: $0 -check [-verbose] files -EOT - -while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) { - $_ = shift(@ARGV); - if (/^-acc$/) { $use_acc = 1; next; } - if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; } - if (/^-doctype$/) { $doctype = shift(@ARGV); next; } - if (/^-c(heck)?$/) { $check = 1; next; } - if (/^-e(xpandinfo)?$/) { $expandinfo = 1; next; } - if (/^-g(lossary)?$/) { $use_glossary = 1; next; } - if (/^-i(nvisible)?$/) { $invisible_mark = shift(@ARGV); next; } - if (/^-iso$/) { $use_iso = 1; next; } - if (/^-I(.+)?$/) { push(@include_dirs, $1 || shift(@ARGV)); next; } - if (/^-m(enu)?$/) { $show_menu = 1; next; } - if (/^-mono(lithic)?$/) { $monolithic = 1; next; } - if (/^-n(umber)?$/) { $number_sections = 1; next; } - if (/^-s(plit)?_?(n(ode)?|c(hapter)?)?$/) { - if ($2 =~ /^n/) { - $split_node = 1; - } else { - $split_chapter = 1; - } - next; - } - if (/^-v(erbose)?$/) { $verbose = 1; next; } - die $usage; -} -if ($check) { - die $usage unless @ARGV > 0; - ✓ - exit; -} - -if (($split_node || $split_chapter) && $monolithic) { - warn "Can't use -monolithic with -split, -monolithic ignored.\n"; - $monolithic = 0; -} -if ($expandinfo) { - $to_skip{'ifinfo'}++; - $to_skip{'end ifinfo'}++; -} else { - $to_skip{'iftex'}++; - $to_skip{'end iftex'}++; -} -$invisible_mark = '<IMG SRC="invisible.xbm">' if $invisible_mark eq 'xbm'; -die $usage unless @ARGV == 1; -$docu = shift(@ARGV); -if ($docu =~ /.*\//) { - chop($docu_dir = $&); - $docu_name = $'; -} else { - $docu_dir = '.'; - $docu_name = $docu; -} -unshift(@include_dirs, $docu_dir); -$docu_name =~ s/\.te?x(i|info)?$//; # basename of the document - -$docu_doc = "$docu_name.html"; # document's contents -if ($monolithic) { - $docu_toc = $docu_foot = $docu_doc; -} else { - $docu_toc = "${docu_name}_toc.html"; # document's table of contents - $docu_foot = "${docu_name}_foot.html"; # document's footnotes -} - -# -# variables -# -%value = (); # hold texinfo variables -$value{'html'} = 1; # predefine html (the output format) -$value{'texi2html'} = '1.51'; # predefine texi2html (the translator) -# _foo: internal to track @foo -foreach ('_author', '_title', '_subtitle', - '_settitle', '_setfilename') { - $value{$_} = ''; # prevent -w warnings -} -%node2sec = (); # node to section name -%node2href = (); # node to HREF -%bib2href = (); # bibliography reference to HREF -%gloss2href = (); # glossary term to HREF -@sections = (); # list of sections -%tag2pro = (); # protected sections - -# -# initial indexes -# -$bib_num = 0; -$foot_num = 0; -$gloss_num = 0; -$idx_num = 0; -$sec_num = 0; -$doc_num = 0; -$html_num = 0; - -# -# can I use ISO8879 characters? (HTML+) -# -if ($use_iso) { - $things_map{'bullet'} = "•"; - $things_map{'copyright'} = "©"; - $things_map{'dots'} = "…"; - $things_map{'equiv'} = "≡"; - $things_map{'expansion'} = "→"; - $things_map{'point'} = "∗"; - $things_map{'result'} = "⇒"; -} - -# -# read texi2html extensions (if any) -# -$extensions = 'texi2html.ext'; # extensions in working directory -if (-f $extensions) { - print "# reading extensions from $extensions\n" if $verbose; - require($extensions); -} -($progdir = $0) =~ s/[^\/]+$//; -if ($progdir && ($progdir ne './')) { - $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory - if (-f $extensions) { - print "# reading extensions from $extensions\n" if $verbose; - require($extensions); - } -} - -print "# reading from $docu\n" if $verbose; - -#+++############################################################################ -# # -# Pass 1: read source, handle command, variable, simple substitution # -# # -#---############################################################################ - -@lines = (); # whole document -@toc_lines = (); # table of contents -$toplevel = 0; # top level seen in hierarchy -$curlevel = 0; # current level in TOC -$node = ''; # current node name -$in_table = 0; # am I inside a table -$table_type = ''; # type of table ('', 'f', 'v') -@tables = (); # nested table support -$in_bibliography = 0; # am I inside a bibliography -$in_glossary = 0; # am I inside a glossary -$in_top = 0; # am I inside the top node -$in_pre = 0; # am I inside a preformatted section -$in_list = 0; # am I inside a list -$in_html = 0; # am I inside an HTML section -$first_line = 1; # is it the first line -$dont_html = 0; # don't protect HTML on this line -$split_num = 0; # split index -$deferred_ref = ''; # deferred reference for indexes -@html_stack = (); # HTML elements stack -$html_element = ''; # current HTML element -&html_reset; - -# build code for simple substitutions -# the maps used (%simple_map and %things_map) MUST be aware of this -# watch out for regexps, / and escaped characters! -$subst_code = ''; -foreach (keys(%simple_map)) { - ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars - $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n"; -} -foreach (keys(%things_map)) { - $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n"; -} -if ($use_acc) { - # accentuated characters - foreach (keys(%accent_map)) { - if ($_ eq "`") { - $subst_code .= "s/$;3"; - } elsif ($_ eq "'") { - $subst_code .= "s/$;4"; - } else { - $subst_code .= "s/\\\@\\$_"; - } - $subst_code .= "([aeiou])/&\${1}$accent_map{$_};/gi;\n"; - } -} -eval("sub simple_substitutions { $subst_code }"); - -&init_input; -while ($_ = &next_line) { - # - # remove \input on the first lines only - # - if ($first_line) { - next if /^\\input/; - $first_line = 0; - } - # - # parse texinfo tags - # - $tag = ''; - $end_tag = ''; - if (/^\@end\s+(\w+)\b/) { - $end_tag = $1; - } elsif (/^\@(\w+)\b/) { - $tag = $1; - } - # - # handle @ifhtml / @end ifhtml - # - if ($in_html) { - if ($end_tag eq 'ifhtml') { - $in_html = 0; - } else { - $tag2pro{$in_html} .= $_; - } - next; - } elsif ($tag eq 'ifhtml') { - $in_html = $PROTECTTAG . ++$html_num; - push(@lines, $in_html); - next; - } - # - # try to skip the line - # - if ($end_tag) { - next if $to_skip{"end $end_tag"}; - } elsif ($tag) { - next if $to_skip{$tag}; - last if $tag eq 'bye'; - } - if ($in_top) { - # parsing the top node - if ($tag eq 'node' || $tag eq 'include' || $sec2level{$tag}) { - # no more in top - $in_top = 0; - } else { - # skip it - next; - } - } - # - # try to remove inlined comments - # syntax from tex-mode.el comment-start-skip - # - s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/; - # non-@ substitutions cf. texinfmt.el - s/``/\"/g; - s/''/\"/g; - s/([\w ])---([\w ])/$1--$2/g; - # - # analyze the tag - # - if ($tag) { - # skip lines - &skip_until($tag), next if $tag eq 'ignore'; - if ($expandinfo) { - &skip_until($tag), next if $tag eq 'iftex'; - } else { - &skip_until($tag), next if $tag eq 'ifinfo'; - } - &skip_until($tag), next if $tag eq 'tex'; - # handle special tables - if ($tag eq 'table') { - $table_type = ''; - } elsif ($tag eq 'ftable') { - $tag = 'table'; - $table_type = 'f'; - } elsif ($tag eq 'vtable') { - $tag = 'table'; - $table_type = 'v'; - } - # special cases - if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) { - $in_top = 1; - @lines = (); # ignore all lines before top (title page garbage) - next; - } elsif ($tag eq 'node') { - $in_top = 0; - warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o; - $_ = &protect_html($_); # if node contains '&' for instance - s/^\@node\s+//; - ($node) = split(/,/); - &normalise_node($node); - if ($split_node) { - &next_doc; - push(@lines, $SPLITTAG) if $split_num++; - push(@sections, $node); - } - next; - } elsif ($tag eq 'include') { - if (/^\@include\s+($FILERE)\s*$/o) { - $file = $1; - unless (-e $file) { - foreach $dir (@include_dirs) { - $file = "$dir/$1"; - last if -e $file; - } - } - if (-e $file) { - &open($file); - print "# including $file\n" if $verbose; - } else { - warn "$ERROR Can't find $file, skipping"; - } - } else { - warn "$ERROR Bad include line: $_"; - } - next; - } elsif ($tag eq 'ifclear') { - if (/^\@ifclear\s+($VARRE)\s*$/o) { - next unless defined($value{$1}); - &skip_until($tag); - } else { - warn "$ERROR Bad ifclear line: $_"; - } - next; - } elsif ($tag eq 'ifset') { - if (/^\@ifset\s+($VARRE)\s*$/o) { - next if defined($value{$1}); - &skip_until($tag); - } else { - warn "$ERROR Bad ifset line: $_"; - } - next; - } elsif ($tag eq 'menu') { - unless ($show_menu) { - &skip_until($tag); - next; - } - &html_push_if($tag); - push(@lines, &html_debug("\n", __LINE__)); - } elsif ($format_map{$tag}) { - $in_pre = 1 if $format_map{$tag} eq 'PRE'; - &html_push_if($format_map{$tag}); - push(@lines, &html_debug("\n", __LINE__)); - $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ; - push(@lines, &debug("<$format_map{$tag}>\n", __LINE__)); - next; - } elsif ($tag eq 'table') { - if (/^\@[fv]?table\s+\@(\w+)\s*$/) { - $in_table = $1; - unshift(@tables, join($;, $table_type, $in_table)); - push(@lines, &debug("<DL COMPACT>\n", __LINE__)); - &html_push_if('DL'); - push(@lines, &html_debug("\n", __LINE__)); - } else { - warn "$ERROR Bad table line: $_"; - } - next; - } elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') { - if (/^\@$tag\s+(\w)\w\s+(\w)\w\s*$/) { - eval("*${1}index = *${2}index"); - } else { - warn "$ERROR Bad syn*index line: $_"; - } - next; - } elsif ($tag eq 'sp') { - push(@lines, &debug("<P>\n", __LINE__)); - next; - } elsif ($tag eq 'setref') { - &protect_html; # if setref contains '&' for instance - if (/^\@$tag\s*{($NODERE)}\s*$/) { - $setref = $1; - $setref =~ s/\s+/ /g; # normalize - $setref =~ s/ $//; - $node2sec{$setref} = $name; - $node2href{$setref} = "$docu_doc#$docid"; - } else { - warn "$ERROR Bad setref line: $_"; - } - next; - } elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') { - if (/^\@$tag\s+(\w\w)\s*$/) { - $valid_index{$1} = 1; - } else { - warn "$ERROR Bad defindex line: $_"; - } - next; - } elsif (defined($def_map{$tag})) { - if ($def_map{$tag}) { - s/^\@$tag\s+//; - $tag = $def_map{$tag}; - $_ = "\@$tag $_"; - $tag =~ s/\s.*//; - } - } elsif (defined($user_sub{$tag})) { - s/^\@$tag\s+//; - $sub = $user_sub{$tag}; - print "# user $tag = $sub, arg: $_" if $debug & $DEBUG_USER; - if (defined(&$sub)) { - chop($_); - &$sub($_); - } else { - warn "$ERROR Bad user sub for $tag: $sub\n"; - } - next; - } - if (defined($def_map{$tag})) { - s/^\@$tag\s+//; - if ($tag =~ /x$/) { - # extra definition line - $tag = $`; - $is_extra = 1; - } else { - $is_extra = 0; - } - while (/\{([^\{\}]*)\}/) { - # this is a {} construct - ($before, $contents, $after) = ($`, $1, $'); - # protect spaces - $contents =~ s/\s+/$;9/g; - # restore $_ protecting {} - $_ = "$before$;7$contents$;8$after"; - } - @args = split(/\s+/, &protect_html($_)); - foreach (@args) { - s/$;9/ /g; # unprotect spaces - s/$;7/\{/g; # ... { - s/$;8/\}/g; # ... } - } - $type = shift(@args); - $type =~ s/^\{(.*)\}$/$1/; - print "# def ($tag): {$type} ", join(', ', @args), "\n" - if $debug & $DEBUG_DEF; - $type .= ':'; # it's nicer like this - $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - if ($is_extra) { - $_ = &debug("<DT>", __LINE__); - } else { - $_ = &debug("<DL>\n<DT>", __LINE__); - } - if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { - $_ .= "<U>$type</U> <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' - || $tag eq 'defcv' || $tag eq 'defop') { - $ftype = $name; - $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - $_ .= "<U>$type</U> $ftype <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } else { - warn "$ERROR Unknown definition type: $tag\n"; - $_ .= "<U>$type</U> <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } - $_ .= &debug("\n<DD>", __LINE__); - $name = &unprotect_html($name); - if ($tag eq 'deffn' || $tag eq 'deftypefn') { - unshift(@input_spool, "\@findex $name\n"); - } elsif ($tag eq 'defop') { - unshift(@input_spool, "\@findex $name on $ftype\n"); - } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') { - unshift(@input_spool, "\@vindex $name\n"); - } else { - unshift(@input_spool, "\@tindex $name\n"); - } - $dont_html = 1; - } - } elsif ($end_tag) { - if ($format_map{$end_tag}) { - $in_pre = 0 if $format_map{$end_tag} eq 'PRE'; - $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ; - &html_pop_if('LI', 'P'); - &html_pop_if(); - push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__)); - push(@lines, &html_debug("\n", __LINE__)); - } elsif ($end_tag eq 'table' || - $end_tag eq 'ftable' || - $end_tag eq 'vtable') { - shift(@tables); - if (@tables) { - ($table_type, $in_table) = split($;, $tables[0]); - } else { - $in_table = 0; - } - push(@lines, "</DL>\n"); - &html_pop_if('DD'); - &html_pop_if(); - } elsif (defined($def_map{$end_tag})) { - push(@lines, &debug("</DL>\n", __LINE__)); - } elsif ($end_tag eq 'menu') { - &html_pop_if(); - push(@lines, $_); # must keep it for pass 2 - } - next; - } - # - # misc things - # - # protect texi and HTML things - &protect_texi; - $_ = &protect_html($_) unless $dont_html; - $dont_html = 0; - # substitution (unsupported things) - s/^\@center\s+//g; - s/^\@exdent\s+//g; - s/\@noindent\s+//g; - s/\@refill\s+//g; - # other substitutions - &simple_substitutions; - s/\@value{($VARRE)}/$value{$1}/eg; - s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 - # - # analyze the tag again - # - if ($tag) { - if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) { - if (/^\@$tag\s+(.+)$/) { - $name = $1; - $name =~ s/\s+$//; - $level = $sec2level{$tag}; - $name = &update_sec_num($tag, $level) . " $name" - if $number_sections && $tag !~ /^unnumbered/; - if ($tag =~ /heading$/) { - push(@lines, &html_debug("\n", __LINE__)); - if ($html_element ne 'body') { - # We are in a nice pickle here. We are trying to get a H? heading - # even though we are not in the body level. So, we convert it to a - # nice, bold, line by itself. - $_ = &debug("\n\n<P><STRONG>$name</STRONG></P>\n\n", __LINE__); - } else { - $_ = &debug("<H$level>$name</H$level>\n", __LINE__); - &html_push_if('body'); - } - print "# heading, section $name, level $level\n" - if $debug & $DEBUG_TOC; - } else { - if ($split_chapter) { - unless ($toplevel) { - # first time we see a "section" - unless ($level == 1) { - warn "$ERROR The first section found is not of level 1: $_"; - warn "$ERROR I'll split on sections of level $level...\n"; - } - $toplevel = $level; - } - if ($level == $toplevel) { - &next_doc; - push(@lines, $SPLITTAG) if $split_num++; - push(@sections, $name); - } - } - $sec_num++; - $docid = "SEC$sec_num"; - $tocid = "TOC$sec_num"; - # check biblio and glossary - $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i); - $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i); - # check node - if ($node) { - if ($node2sec{$node}) { - warn "$ERROR Duplicate node found: $node\n"; - } else { - $node2sec{$node} = $name; - $node2href{$node} = "$docu_doc#$docid"; - print "# node $node, section $name, level $level\n" - if $debug & $DEBUG_TOC; - } - $node = ''; - } else { - print "# no node, section $name, level $level\n" - if $debug & $DEBUG_TOC; - } - # update TOC - while ($level > $curlevel) { - $curlevel++; - push(@toc_lines, "<UL>\n"); - } - while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "</UL>\n"); - } - $_ = "<LI>" . &anchor($tocid, "$docu_doc#$docid", $name, 1); - push(@toc_lines, &substitute_style($_)); - # update DOC - push(@lines, &html_debug("\n", __LINE__)); - &html_reset; - $_ = "<H$level>".&anchor($docid, "$docu_toc#$tocid", $name)."</H$level>\n"; - $_ = &debug($_, __LINE__); - push(@lines, &html_debug("\n", __LINE__)); - } - # update DOC - foreach $line (split(/\n+/, $_)) { - push(@lines, "$line\n"); - } - next; - } else { - warn "$ERROR Bad section line: $_"; - } - } else { - # track variables - $value{$1} = $2, next if /^\@set\s+($VARRE)\s+(.*)$/o; - delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o; - # store things - $value{'_setfilename'} = $1, next if /^\@setfilename\s+(.*)$/; - $value{'_settitle'} = $1, next if /^\@settitle\s+(.*)$/; - $value{'_author'} .= "$1\n", next if /^\@author\s+(.*)$/; - $value{'_subtitle'} .= "$1\n", next if /^\@subtitle\s+(.*)$/; - $value{'_title'} .= "$1\n", next if /^\@title\s+(.*)$/; - # index - if (/^\@(..?)index\s+/) { - unless ($valid_index{$1}) { - warn "$ERROR Undefined index command: $_"; - next; - } - $id = 'IDX' . ++$idx_num; - $index = $1 . 'index'; - $what = &substitute_style($'); - $what =~ s/\s+$//; - print "# found $index for '$what' id $id\n" - if $debug & $DEBUG_INDEX; - eval(<<EOC); - if (defined(\$$index\{\$what\})) { - \$$index\{\$what\} .= "$;$docu_doc#$id"; - } else { - \$$index\{\$what\} = "$docu_doc#$id"; - } -EOC - # - # dirty hack to see if I can put an invisible anchor... - # - if ($html_element eq 'P' || - $html_element eq 'LI' || - $html_element eq 'DT' || - $html_element eq 'DD' || - $html_element eq 'ADDRESS' || - $html_element eq 'B' || - $html_element eq 'BLOCKQUOTE' || - $html_element eq 'PRE' || - $html_element eq 'SAMP') { - push(@lines, &anchor($id, '', $invisible_mark, !$in_pre)); - } elsif ($html_element eq 'body') { - push(@lines, &debug("<P>\n", __LINE__)); - push(@lines, &anchor($id, '', $invisible_mark, !$in_pre)); - &html_push('P'); - } elsif ($html_element eq 'DL' || - $html_element eq 'UL' || - $html_element eq 'OL' ) { - $deferred_ref .= &anchor($id, '', $invisible_mark, !$in_pre) . " "; - } - next; - } - # list item - if (/^\@itemx?\s+/) { - $what = $'; - $what =~ s/\s+$//; - if ($in_bibliography && $use_bibliography) { - if ($what =~ /^$BIBRE$/o) { - $id = 'BIB' . ++$bib_num; - $bib2href{$what} = "$docu_doc#$id"; - print "# found bibliography for '$what' id $id\n" - if $debug & $DEBUG_BIB; - $what = &anchor($id, '', $what); - } - } elsif ($in_glossary && $use_glossary) { - $id = 'GLOSS' . ++$gloss_num; - $entry = $what; - $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; - $gloss2href{$entry} = "$docu_doc#$id"; - print "# found glossary for '$entry' id $id\n" - if $debug & $DEBUG_GLOSS; - $what = &anchor($id, '', $what); - } - &html_pop_if('P'); - if ($html_element eq 'DL' || $html_element eq 'DD') { - if ($things_map{$in_table} && !$what) { - # special case to allow @table @bullet for instance - push(@lines, &debug("<DT>$things_map{$in_table}\n", __LINE__)); - } else { - push(@lines, &debug("<DT>\@$in_table\{$what\}\n", __LINE__)); - } - push(@lines, "<DD>"); - &html_push('DD') unless $html_element eq 'DD'; - if ($table_type) { # add also an index - unshift(@input_spool, "\@${table_type}index $what\n"); - } - } else { - push(@lines, &debug("<LI>$what\n", __LINE__)); - &html_push('LI') unless $html_element eq 'LI'; - } - push(@lines, &html_debug("\n", __LINE__)); - if ($deferred_ref) { - push(@lines, &debug("$deferred_ref\n", __LINE__)); - $deferred_ref = ''; - } - next; - } - } - } - # paragraph separator - if ($_ eq "\n") { - next if $#lines >= 0 && $lines[$#lines] eq "\n"; - if ($html_element eq 'P') { - push(@lines, "\n"); - $_ = &debug("</P>\n", __LINE__); - &html_pop; - } - } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') { - push(@lines, "<P>\n"); - &html_push('P'); - $_ = &debug($_, __LINE__); - } - # otherwise - push(@lines, $_); -} - -# finish TOC -$level = 0; -while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "</UL>\n"); -} - -print "# end of pass 1\n" if $verbose; - -#+++############################################################################ -# # -# Pass 2/3: handle style, menu, index, cross-reference # -# # -#---############################################################################ - -@lines2 = (); # whole document (2nd pass) -@lines3 = (); # whole document (3rd pass) -$in_menu = 0; # am I inside a menu - -while (@lines) { - $_ = shift(@lines); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@lines2, $_); - next; - } - # - # menu - # - $in_menu = 1, push(@lines2, &debug("<UL>\n", __LINE__)), next if /^\@menu\b/; - $in_menu = 0, push(@lines2, &debug("</UL>\n", __LINE__)), next if /^\@end\s+menu\b/; - if ($in_menu) { - if (/^\*\s+($NODERE)::/o) { - $descr = $'; - chop($descr); - &menu_entry($1, $1, $descr); - } elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) { - $descr = $'; - chop($descr); - &menu_entry($1, $2, $descr); - } elsif (/^\*/) { - warn "$ERROR Bad menu line: $_"; - } else { # description continued? - push(@lines2, $_); - } - next; - } - # - # printindex - # - if (/^\@printindex\s+(\w\w)\b/) { - local($index, *ary, @keys, $key, $letter, $last_letter, @refs); - if ($predefined_index{$1}) { - $index = $predefined_index{$1} . 'index'; - } else { - $index = $1 . 'index'; - } - eval("*ary = *$index"); - @keys = keys(%ary); - foreach $key (@keys) { - $_ = $key; - 1 while s/<(\w+)>\`(.*)\'<\/\1>/$2/; # remove HTML tags with quotes - 1 while s/<(\w+)>(.*)<\/\1>/$2/; # remove HTML tags - $_ = &unprotect_html($_); - &unprotect_texi; - tr/A-Z/a-z/; # lowercase - $key2alpha{$key} = $_; - print "# index $key sorted as $_\n" - if $key ne $_ && $debug & $DEBUG_INDEX; - } - $last_letter = undef; - foreach $key (sort byalpha @keys) { - $letter = substr($key2alpha{$key}, 0, 1); - $letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;; - if (!defined($last_letter) || $letter ne $last_letter) { - push(@lines2, "</DIR>\n") if defined($last_letter); - push(@lines2, "<H2>" . &protect_html($letter) . "</H2>\n"); - push(@lines2, "<DIR>\n"); - $last_letter = $letter; - } - @refs = (); - foreach (split(/$;/, $ary{$key})) { - push(@refs, &anchor('', $_, $key, 0)); - } - push(@lines2, "<LI>" . join(", ", @refs) . "\n"); - } - push(@lines2, "</DIR>\n") if defined($last_letter); - next; - } - # - # simple style substitutions - # - $_ = &substitute_style($_); - # - # xref - # - while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) { - # note: Texinfo may accept other characters - ($type, $nodes, $full) = ($1, $2, $3); - ($before, $after) = ($`, $'); - if (! $full && $after) { - warn "$ERROR Bad xref (no ending } on line): $_"; - $_ = "$before$;0${type}ref\{$nodes$after"; - next; # while xref - } - if ($type eq 'x') { - $type = 'See '; - } elsif ($type eq 'px') { - $type = 'see '; - } elsif ($type eq 'info') { - $type = 'See Info'; - } else { - $type = ''; - } - unless ($full) { - $next = shift(@lines); - $next = &substitute_style($next); - chop($nodes); # remove final newline - if ($next =~ /\}/) { # split on 2 lines - $nodes .= " $`"; - $after = $'; - } else { - $nodes .= " $next"; - $next = shift(@lines); - $next = &substitute_style($next); - chop($nodes); - if ($next =~ /\}/) { # split on 3 lines - $nodes .= " $`"; - $after = $'; - } else { - warn "$ERROR Bad xref (no ending }): $_"; - $_ = "$before$;0xref\{$nodes$after"; - unshift(@lines, $next); - next; # while xref - } - } - } - $nodes =~ s/\s+/ /g; # remove useless spaces - @args = split(/\s*,\s*/, $nodes); - $node = $args[0]; # the node is always the first arg - &normalise_node($node); - $sec = $node2sec{$node}; - if (@args == 5) { # reference to another manual - $sec = $args[2] || $node; - $man = $args[4] || $args[3]; - $_ = "${before}${type}section `$sec' in \@cite{$man}$after"; - } elsif ($type =~ /Info/) { # inforef - warn "$ERROR Wrong number of arguments: $_" unless @args == 3; - ($nn, $_, $in) = @args; - $_ = "${before}${type} file `$in', node `$nn'$after"; - } elsif ($sec) { - $href = $node2href{$node}; - $_ = "${before}${type}section " . &anchor('', $href, $sec) . $after; - } else { - warn "$ERROR Undefined node ($node): $_"; - $_ = "$before$;0xref{$nodes}$after"; - } - } - # - # try to guess bibliography references or glossary terms - # - unless (/^<H\d><A NAME=\"SEC\d/) { - if ($use_bibliography) { - $done = ''; - while (/$BIBRE/o) { - ($pre, $what, $post) = ($`, $&, $'); - $href = $bib2href{$what}; - if (defined($href) && $post !~ /^[^<]*<\/A>/) { - $done .= $pre . &anchor('', $href, $what); - } else { - $done .= "$pre$what"; - } - $_ = $post; - } - $_ = $done . $_; - } - if ($use_glossary) { - $done = ''; - while (/\b\w+\b/) { - ($pre, $what, $post) = ($`, $&, $'); - $entry = $what; - $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; - $href = $gloss2href{$entry}; - if (defined($href) && $post !~ /^[^<]*<\/A>/) { - $done .= $pre . &anchor('', $href, $what); - } else { - $done .= "$pre$what"; - } - $_ = $post; - } - $_ = $done . $_; - } - } - # otherwise - push(@lines2, $_); -} -print "# end of pass 2\n" if $verbose; - -# -# split style substitutions -# -while (@lines2) { - $_ = shift(@lines2); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@lines3, $_); - next; - } - # - # split style substitutions - # - $old = ''; - while ($old ne $_) { - $old = $_; - if (/\@(\w+)\{/) { - ($before, $style, $after) = ($`, $1, $'); - if (defined($style_map{$style})) { - $_ = $after; - $text = ''; - $after = ''; - $failed = 1; - while (@lines2) { - if (/\}/) { - $text .= $`; - $after = $'; - $failed = 0; - last; - } else { - $text .= $_; - $_ = shift(@lines2); - } - } - if ($failed) { - die "* Bad syntax (\@$style) after: $before\n"; - } else { - $text = &apply_style($style, $text); - $_ = "$before$text$after"; - } - } - } - } - # otherwise - push(@lines3, $_); -} -print "# end of pass 3\n" if $verbose; - -#+++############################################################################ -# # -# Pass 4: foot notes, final cleanup # -# # -#---############################################################################ - -@foot_lines = (); # footnotes -@doc_lines = (); # final document -$end_of_para = 0; # true if last line is <P> - -while (@lines3) { - $_ = shift(@lines3); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@doc_lines, $_); - $end_of_para = 0; - next; - } - # - # footnotes - # - while (/\@footnote([^\{\s]+)\{/) { - ($before, $d, $after) = ($`, $1, $'); - $_ = $after; - $text = ''; - $after = ''; - $failed = 1; - while (@lines3) { - if (/\}/) { - $text .= $`; - $after = $'; - $failed = 0; - last; - } else { - $text .= $_; - $_ = shift(@lines3); - } - } - if ($failed) { - die "* Bad syntax (\@footnote) after: $before\n"; - } else { - $foot_num++; - $docid = "DOCF$foot_num"; - $footid = "FOOT$foot_num"; - $foot = "($foot_num)"; - push(@foot_lines, "<H3>" . &anchor($footid, "$d#$docid", $foot) . "</H3>\n"); - $text = "<P>$text" unless $text =~ /^\s*<P>/; - push(@foot_lines, "$text\n"); - $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after; - } - } - # - # remove unnecessary <P> - # - if (/^\s*<P>\s*$/) { - next if $end_of_para++; - } else { - $end_of_para = 0; - } - # otherwise - push(@doc_lines, $_); -} -print "# end of pass 4\n" if $verbose; - -#+++############################################################################ -# # -# Pass 5: print things # -# # -#---############################################################################ - -$header = <<EOT; -<!-- This HTML file has been created by $THISPROG - from $docu on $TODAY --> -EOT - -$full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document"; -$title = $value{'_settitle'} || $full_title; -$_ = &substitute_style($full_title); -&unprotect_texi; -s/\n$//; # rmv last \n (if any) -$full_title = "<H1>" . join("</H1>\n<H1>", split(/\n/, $_)) . "</H1>\n"; - -# -# print ToC -# -if (!$monolithic && @toc_lines) { - if (open(FILE, "> $docu_toc")) { - print "# creating $docu_toc...\n" if $verbose; - &print_toplevel_header("$title - Table of Contents"); - &print_ruler; - &print(*toc_lines, FILE); - &print_toplevel_footer; - close(FILE); - } else { - warn "$ERROR Can't write to $docu_toc: $!\n"; - } -} - -# -# print footnotes -# -if (!$monolithic && @foot_lines) { - if (open(FILE, "> $docu_foot")) { - print "# creating $docu_foot...\n" if $verbose; - &print_toplevel_header("$title - Footnotes"); - &print_ruler; - &print(*foot_lines, FILE); - &print_toplevel_footer; - close(FILE); - } else { - warn "$ERROR Can't write to $docu_foot: $!\n"; - } -} - -# -# print document -# -if ($split_chapter || $split_node) { # split - $doc_num = 0; - $last_num = scalar(@sections); - $first_doc = &doc_name(1); - $last_doc = &doc_name($last_num); - while (@sections) { - $section = shift(@sections); - &next_doc; - if (open(FILE, "> $docu_doc")) { - print "# creating $docu_doc...\n" if $verbose; - &print_header("$title - $section"); - $prev_doc = ($doc_num == 1 ? undef : &doc_name($doc_num - 1)); - $next_doc = ($doc_num == $last_num ? undef : &doc_name($doc_num + 1)); - $navigation = "Go to the "; - $navigation .= ($prev_doc ? &anchor('', $first_doc, "first") : "first"); - $navigation .= ", "; - $navigation .= ($prev_doc ? &anchor('', $prev_doc, "previous") : "previous"); - $navigation .= ", "; - $navigation .= ($next_doc ? &anchor('', $next_doc, "next") : "next"); - $navigation .= ", "; - $navigation .= ($next_doc ? &anchor('', $last_doc, "last") : "last"); - $navigation .= " section, " . &anchor('', $docu_toc, "table of contents") . ".\n"; - print FILE $navigation; - &print_ruler; - # find corresponding lines - @tmp_lines = (); - while (@doc_lines) { - $_ = shift(@doc_lines); - last if ($_ eq $SPLITTAG); - push(@tmp_lines, $_); - } - &print(*tmp_lines, FILE); - &print_ruler; - print FILE $navigation; - &print_footer; - close(FILE); - } else { - warn "$ERROR Can't write to $docu_doc: $!\n"; - } - } -} else { # not split - if (open(FILE, "> $docu_doc")) { - print "# creating $docu_doc...\n" if $verbose; - if ($monolithic || !@toc_lines) { - &print_toplevel_header($title); - } else { - &print_header($title); - print FILE $full_title; - } - if ($monolithic && @toc_lines) { - &print_ruler; - print FILE "<H1>Table of Contents</H1>\n"; - &print(*toc_lines, FILE); - } - &print_ruler; - &print(*doc_lines, FILE); - if ($monolithic && @foot_lines) { - &print_ruler; - print FILE "<H1>Footnotes</H1>\n"; - &print(*foot_lines, FILE); - } - if ($monolithic || !@toc_lines) { - &print_toplevel_footer; - } else { - &print_footer; - } - close(FILE); - } else { - warn "$ERROR Can't write to $docu_doc: $!\n"; - } -} - -print "# that's all folks\n" if $verbose; - -#+++############################################################################ -# # -# Low level functions # -# # -#---############################################################################ - -sub update_sec_num { - local($name, $level) = @_; - - $level--; # here we start at 0 - if ($name =~ /^appendix/) { - # appendix style - if (defined(@appendix_sec_num)) { - &incr_sec_num($level, @appendix_sec_num); - } else { - @appendix_sec_num = ('A', 0, 0, 0); - } - return(join('.', @appendix_sec_num[0..$level])); - } else { - # normal style - if (defined(@normal_sec_num)) { - &incr_sec_num($level, @normal_sec_num); - } else { - @normal_sec_num = (1, 0, 0, 0); - } - return(join('.', @normal_sec_num[0..$level])); - } -} - -sub incr_sec_num { - local($level, $l); - $level = shift(@_); - $_[$level]++; - foreach $l ($level+1 .. 3) { - $_[$l] = 0; - } -} - -sub check { - local($_, %seen, %context, $before, $match, $after); - - while (<>) { - if (/\@(\*|\.|\:|\@|\{|\})/) { - $seen{$&}++; - $context{$&} .= "> $_" if $verbose; - $_ = "$`XX$'"; - redo; - } - if (/\@(\w+)/) { - ($before, $match, $after) = ($`, $&, $'); - if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address - $seen{'e-mail address'}++; - $context{'e-mail address'} .= "> $_" if $verbose; - } else { - $seen{$match}++; - $context{$match} .= "> $_" if $verbose; - } - $match =~ s/^\@/X/; - $_ = "$before$match$after"; - redo; - } - } - - foreach (sort(keys(%seen))) { - if ($verbose) { - print "$_\n"; - print $context{$_}; - } else { - print "$_ ($seen{$_})\n"; - } - } -} - -sub open { - local($name) = @_; - - ++$fh_name; - if (open($fh_name, $name)) { - unshift(@fhs, $fh_name); - } else { - warn "$ERROR Can't read file $name: $!\n"; - } -} - -sub init_input { - @fhs = (); # hold the file handles to read - @input_spool = (); # spooled lines to read - $fh_name = 'FH000'; - &open($docu); -} - -sub next_line { - local($fh, $line); - - if (@input_spool) { - $line = shift(@input_spool); - return($line); - } - while (@fhs) { - $fh = $fhs[0]; - $line = <$fh>; - return($line) if $line; - close($fh); - shift(@fhs); - } - return(undef); -} - -# used in pass 1, use &next_line -sub skip_until { - local($tag) = @_; - local($_); - - while ($_ = &next_line) { - return if /^\@end\s+$tag\s*$/; - } - die "* Failed to find '$tag' after: " . $lines[$#lines]; -} - -# -# HTML stacking to have a better HTML output -# - -sub html_reset { - @html_stack = ('html'); - $html_element = 'body'; -} - -sub html_push { - local($what) = @_; - push(@html_stack, $html_element); - $html_element = $what; -} - -sub html_push_if { - local($what) = @_; - push(@html_stack, $html_element) - if ($html_element && $html_element ne 'P'); - $html_element = $what; -} - -sub html_pop { - $html_element = pop(@html_stack); -} - -sub html_pop_if { - local($elt); - - if (@_) { - foreach $elt (@_) { - if ($elt eq $html_element) { - $html_element = pop(@html_stack) if @html_stack; - last; - } - } - } else { - $html_element = pop(@html_stack) if @html_stack; - } -} - -sub html_debug { - local($what, $line) = @_; - return("<!-- $line @html_stack, $html_element -->$what") - if $debug & $DEBUG_HTML; - return($what); -} - -# to debug the output... -sub debug { - local($what, $line) = @_; - return("<!-- $line -->$what") - if $debug & $DEBUG_HTML; - return($what); -} - -sub normalise_node { - $_[0] =~ s/\s+/ /g; - $_[0] =~ s/ $//; - $_[0] =~ s/^ //; -} - -sub menu_entry { - local($entry, $node, $descr) = @_; - local($href); - - &normalise_node($node); - $href = $node2href{$node}; - if ($href) { - $descr =~ s/^\s+//; - $descr = ": $descr" if $descr; - push(@lines2, "<LI>" . &anchor('', $href, $entry) . "$descr\n"); - } else { - warn "$ERROR Undefined node ($node): $_"; - } -} - -sub do_ctrl { "^$_[0]" } - -sub do_sc { "\U$_[0]\E" } - -sub apply_style { - local($texi_style, $text) = @_; - local($style); - - $style = $style_map{$texi_style}; - if (defined($style)) { # known style - if ($style =~ /^\"/) { # add quotes - $style = $'; - $text = "\`$text\'"; - } - if ($style =~ /^\&/) { # custom - $style = $'; - $text = &$style($text); - } elsif ($style) { # good style - $text = "<$style>$text</$style>"; - } else { # no style - } - } else { # unknown style - $text = undef; - } - return($text); -} - -# remove Texinfo styles -sub remove_style { - local($_) = @_; - s/\@\w+{([^\{\}]+)}/$1/g; - return($_); -} - -sub substitute_style { - local($_) = @_; - local($changed, $done, $style, $text); - - $changed = 1; - while ($changed) { - $changed = 0; - $done = ''; - while (/\@(\w+){([^\{\}]+)}/) { - $text = &apply_style($1, $2); - if ($text) { - $_ = "$`$text$'"; - $changed = 1; - } else { - $done .= "$`\@$1"; - $_ = "{$2}$'"; - } - } - $_ = $done . $_; - } - return($_); -} - -sub anchor { - local($name, $href, $text, $newline) = @_; - local($result); - - $result = "<A"; - $result .= " NAME=\"$name\"" if $name; - $result .= " HREF=\"$href\"" if $href; - $result .= ">$text</A>"; - $result .= "\n" if $newline; - return($result); -} - -sub pretty_date { - local(@MoY, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); - - @MoY = ('January', 'Febuary', 'March', 'April', 'May', 'June', - 'July', 'August', 'September', 'October', 'November', 'December'); - ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); - $year += ($year < 70) ? 2000 : 1900; - return("$mday $MoY[$mon] $year"); -} - -sub doc_name { - local($num) = @_; - - return("${docu_name}_$num.html"); -} - -sub next_doc { - $docu_doc = &doc_name(++$doc_num); -} - -sub print { - local(*lines, $fh) = @_; - local($_); - - while (@lines) { - $_ = shift(@lines); - if (/^$PROTECTTAG/o) { - $_ = $tag2pro{$_}; - } else { - &unprotect_texi; - } - print $fh $_; - } -} - -sub print_ruler { - print FILE "<P><HR><P>\n"; -} - -sub print_header { - local($_); - - # clean the title - $_ = &remove_style($_[0]); - &unprotect_texi; - # print the header - if ($doctype eq 'html2') { - print FILE $html2_doctype; - } elsif ($doctype) { - print FILE $doctype; - } - print FILE <<EOT; -<HTML> -<HEAD> -$header -<TITLE>$_</TITLE> -</HEAD> -<BODY> -EOT -} - -sub print_toplevel_header { - local($_); - - &print_header; # pass given arg... - print FILE $full_title; - if ($value{'_subtitle'}) { - $value{'_subtitle'} =~ s/\n+$//; - foreach (split(/\n/, $value{'_subtitle'})) { - $_ = &substitute_style($_); - &unprotect_texi; - print FILE "<H2>$_</H2>\n"; - } - } - if ($value{'_author'}) { - $value{'_author'} =~ s/\n+$//; - foreach (split(/\n/, $value{'_author'})) { - $_ = &substitute_style($_); - &unprotect_texi; - s/[\w.-]+\@[\w.-]+/<A HREF="mailto:$&">$&<\/A>/g; - print FILE "<ADDRESS>$_</ADDRESS>\n"; - } - } - print FILE "<P>\n"; -} - -sub print_footer { - print FILE <<EOT; -</BODY> -</HTML> -EOT -} - -sub print_toplevel_footer { - &print_ruler; - print FILE <<EOT; -This document was generated on $TODAY using the -<A HREF=\"$HOMEPAGE\">texi2html</A> -translator version 1.51.</P> -EOT - &print_footer; -} - -sub protect_texi { - # protect @ { } ` ' - s/\@\@/$;0/go; - s/\@\{/$;1/go; - s/\@\}/$;2/go; - s/\@\`/$;3/go; - s/\@\'/$;4/go; -} - -sub protect_html { - local($what) = @_; - # protect & < > - $what =~ s/\&/\&\#38;/g; - $what =~ s/\</\&\#60;/g; - $what =~ s/\>/\&\#62;/g; - # but recognize some HTML things - $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # </A> - $what =~ s/\&\#60;A ([^\&]+)\&\#62;/<A $1>/g; # <A [^&]+> - $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;/<IMG $1>/g; # <IMG [^&]+> - return($what); -} - -sub unprotect_texi { - s/$;0/\@/go; - s/$;1/\{/go; - s/$;2/\}/go; - s/$;3/\`/go; - s/$;4/\'/go; -} - -sub unprotect_html { - local($what) = @_; - $what =~ s/\&\#38;/\&/g; - $what =~ s/\&\#60;/\</g; - $what =~ s/\&\#62;/\>/g; - return($what); -} - -sub byalpha { - $key2alpha{$a} cmp $key2alpha{$b}; -} - -############################################################################## - - # These next few lines are legal in both Perl and nroff. - -.00 ; # finish .ig - -'di \" finish diversion--previous line must be blank -.nr nl 0-1 \" fake up transition to first page again -.nr % 0 \" start at page 1 -'; __END__ ############# From here on it's a standard manual page ############ -.TH TEXI2HTML 1 "09/10/96" -.AT 3 -.SH NAME -texi2html \- a Texinfo to HTML converter -.SH SYNOPSIS -.B texi2html [options] file -.PP -.B texi2html -check [-verbose] files -.SH DESCRIPTION -.I Texi2html -converts the given Texinfo file to a set of HTML files. It tries to handle -most of the Texinfo commands. It creates hypertext links for cross-references, -footnotes... -.PP -It also tries to add links from a reference to its corresponding entry in the -bibliography (if any). It may also handle a glossary (see the -.B \-glossary -option). -.PP -.I Texi2html -creates several files depending on the contents of the Texinfo file and on -the chosen options (see FILES). -.PP -The HTML files created by -.I texi2html -are closer to TeX than to Info, that's why -.I texi2html -converts @iftex sections and not @ifinfo ones by default. You can reverse -this with the \-expandinfo option. -.SH OPTIONS -.TP 12 -.B \-check -Check the given file and give the list of all things that may be Texinfo commands. -This may be used to check the output of -.I texi2html -to find the Texinfo commands that have been left in the HTML file. -.TP -.B \-expandinfo -Expand @ifinfo sections, not @iftex ones. -.TP -.B \-glossary -Use the section named 'Glossary' to build a list of terms and put links in the HTML -document from each term toward its definition. -.TP -.B \-invisible \fIname\fP -Use \fIname\fP to create invisible destination anchors for index links. This is a workaround -for a known bug of many WWW browsers, including xmosaic. -.TP -.B \-I \fIdir\fP -Look also in \fIdir\fP to find included files. -.TP -.B \-menu -Show the Texinfo menus; by default they are ignored. -.TP -.B \-monolithic -Output only one file, including the table of contents and footnotes. -.TP -.B \-number -Number the sections. -.TP -.B \-split_chapter -Split the output into several HTML files (one per main section: -chapter, appendix...). -.TP -.B \-split_node -Split the output into several HTML files (one per node). -.TP -.B \-usage -Print usage instructions, listing the current available command-line options. -.TP -.B \-verbose -Give a verbose output. Can be used with the -.B \-check -option. -.PP -.SH FILES -By default -.I texi2html -creates the following files (foo being the name of the Texinfo file): -.TP 16 -.B foo_toc.html -The table of contents. -.TP -.B foo.html -The document's contents. -.TP -.B foo_foot.html -The footnotes (if any). -.PP -When used with the -.B \-split -option, it creates several files (one per chapter or node), named -.B foo_n.html -(n being the indice of the chapter or node), instead of the single -.B foo.html -file. -.PP -When used with the -.B \-monolithic -option, it creates only one file: -.B foo.html -.SH VARIABLES -.I texi2html -predefines the following variables: \fBhtml\fP, \fBtexi2html\fP. -.SH ADDITIONAL COMMANDS -.I texi2html -implements the following non-Texinfo commands: -.TP 16 -.B @ifhtml -This indicates the start of an HTML section, this section will passed through -without any modofication. -.TP -.B @end ifhtml -This indcates the end of an HTML section. -.SH VERSION -This is \fItexi2html\fP version 1.51, 09/10/96. -.PP -The latest version of \fItexi2html\fP can be found in WWW, cf. URL -http://wwwcn.cern.ch/dci/texi2html/ -.SH AUTHOR -The main author is Lionel Cons, CERN CN/DCI/UWS, Lionel.Cons@cern.ch. -Many other people around the net contributed to this program. -.SH COPYRIGHT -This program is the intellectual property of the European -Laboratory for Particle Physics (known as CERN). No guarantee whatsoever is -provided by CERN. No liability whatsoever is accepted for any loss or damage -of any kind resulting from any defect or inaccuracy in this information or -code. -.PP -CERN, 1211 Geneva 23, Switzerland -.SH "SEE ALSO" -GNU Texinfo Documentation Format, -HyperText Markup Language (HTML), -World Wide Web (WWW). -.SH BUGS -This program does not understand all Texinfo commands (yet). -.PP -TeX specific commands (normally enclosed in @iftex) will be -passed unmodified. -.ex diff --git a/glabels1/barcode-0.98/ean.c b/glabels1/barcode-0.98/ean.c deleted file mode 100644 index 0801a0e..0000000 --- a/glabels1/barcode-0.98/ean.c +++ /dev/null @@ -1,774 +0,0 @@ -/* - * ean.c -- encoding for ean, upc and isbn - * - * Copyright (c) 1999 Alessandro Rubini <rubini@gnu.org> - * Copyright (c) 1999 Prosa Srl. <prosa@prosa.it> - * Copyright (c) 2001 Boszormenyi Zoltan <zboszor@mail.externet.hu> - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -/* - * IMPORTANT NOTE: if you are reading this file to learn how to add a - * new encoding type, this is the wrong place as there are too many - * special cases. Please refer to code39.c instead. If you want to - * learn how UPC, EAN, ISBN work, on the other hand, I did my best to - * commend things and hope you enjoy it. - */ - -/* - * These following static arrays are used to describe the barcode. - * - * The various forms of UPC and EAN are documented as using three - * different alphabets to encode the ten digits. However, each digit - * has exactly one encoding; only, it is sometimes mirrored. Moreover, - * if you represent the width of each symbol (bar/space) instead of - * the sequence of 1's and 0's, you find that even-parity and odd-parity - * encoding are exactly the same. So, here are the digits: */ -static char *digits[] = { - "3211","2221","2122","1411","1132", - "1231","1114","1312","1213","3112"}; - -/* - * What EAN encoding does is adding a leading digit (the 13th digit). - * Such an extra digit is encoded by mirroring three of the six digits that - * appear in the left half of the UPC code. Here how mirroring works: - */ -static char *ean_mirrortab[] = { - "------","--1-11","--11-1","--111-","-1--11", - "-11--1","-111--","-1-1-1","-1-11-","-11-1-" -}; - -/* - * UPC-E (the 6-digit one), instead, encodes the check character as - * a mirroring of the symbols. This is similar, but the encoding for "0" is - * different (EAN uses no mirroring for "0" to be compatible with UPC). - * The same rule is used for UPC-5 (the supplemental digits for ISBN) - */ -static char *upc_mirrortab[] = { - "---111","--1-11","--11-1","--111-","-1--11", - "-11--1","-111--","-1-1-1","-1-11-","-11-1-" -}; - -/* - * UPC-E mirroring for encoding "1" - */ -static char *upc_mirrortab1[] = { - "111---","11-1--","11--1-","11---1","1-11--", - "1--11-","1---11","1-1-1-","1-1--1","1--1-1" -}; - -/* UPC-2 has just two digits to mirror */ -static char *upc_mirrortab2[] = { - "11","1-","-1","--" -}; - -/* - * initial, middle, final guard bars (first symbol is a a space). - * EAN-13 overwrites the first "0" with "9" to make space for the extra digit. - */ -static char *guard[] = {"0a1a","1a1a1","a1a"}; - -/* initial, final guard bars for UPC-E*/ -static char *guardE[] = {"0a1a","1a1a1a"}; - -/* initial and inter-char guard bars for supplementals (first is space) */ -static char *guardS[] = {"9112","11"}; - -/* - * These functions are shortcuts I use in the encoding engine - */ -static int ean_make_checksum(char *text, int mode) -{ - int esum = 0, osum = 0, i; - int even=1; /* last char is even */ - - if (strchr(text, ' ')) - i = strchr(text, ' ') - text; /* end of first part */ - else - i = strlen(text); /* end of all */ - - while (i-- > 0) { - if (even) esum += text[i]-'0'; - else osum += text[i]-'0'; - even = !even; - } - if (!mode) { /* standard upc/ean checksum */ - i = (3*esum + osum) % 10; - return (10-i) % 10; /* complement to 10 */ - } else { /* add-5 checksum */ - i = (3*esum + 9*osum); - return i%10; - } -} - -/* - * Check that the text can be encoded. Returns 0 or -1. - * Accept: - * 13 or 12 digits: EAN-13 w/ or w/o checksum - * or - * 8 or 7 digits: EAN-8 w/ or w/o checksum. - * For both EAN-13 and EAN-8, accept an addon of 2 or 5 digits, - * separated by ' ' - */ -int Barcode_ean_verify(unsigned char *text) -{ - int i, len0, len, addon; - unsigned char tmp[24], *spc; - - len = strlen(text); - spc = strchr(text, ' '); - if (spc) { - len0 = spc - text; - addon = len - len0 - 1; - if (addon != 2 && addon != 5) - return -1; - for (i=len0+1; i<len; i++) - if (!isdigit(text[i])) - return -1; - } else - len0 = len; - - for (i=0; i<len0; i++) - if (!isdigit(text[i])) - return -1; - - switch (len0) { - case 8: - strncpy(tmp, text, 7); - tmp[7] = '\0'; - if (text[7] != (ean_make_checksum(tmp, 0) + '0')) - return -1; - case 7: - break; - case 13: - strncpy(tmp, text, 12); - tmp[12] = '\0'; - if (text[12] != (ean_make_checksum(tmp, 0) + '0')) - return -1; - case 12: - break; - default: - return -1; - } - return 0; -} - -/* Expand the middle part of UPC-E to UPC-A */ -static char *upc_e_to_a0(unsigned char *text) -{ - static char result[16]; - strcpy(result, "00000000000"); /* 11 0's */ - - switch(text[5]) { /* last char */ - case '0': case '1': case '2': - strncpy(result+1, text, 2); result[3]=text[5]; /* Manuf. */ - memcpy(result+8, text+2, 3); /* Product */ - break; - case '3': - memcpy(result+1, text, 3); /* Manufacturer */ - memcpy(result+9, text+3, 2); /* Product */ - break; - case '4': - memcpy(result+1, text, 4); /* Manufacturer */ - memcpy(result+10, text+4, 1); /* Product */ - break; - default: - memcpy(result+1, text, 5); /* Manufacturer */ - memcpy(result+10, text+5, 1); /* Product */ - break; - } - return result; -} - -/* Try to expand an UPC-E barcode to its UPC-A equivalent. - * Accept 6, 7 or 8-digit sequence (not counting the addon): - * 6: only the middle part, encoding "0", w/o checksum. - * 7: the middle part, encoding "0" with a correct checksum - * or - * the middle part, encoding "0" or "1" prepended - * 8: fully qualified UPC-E with checksum. - * - * Returns a 11 digit UPC-A (w/o checksum) for valid EPC-E barcode - * or an empty string for an invalid one. - * - * The checksum for UPC-E is calculated using its UPC-A equivalent. - */ -static char *upc_e_to_a(unsigned char *text) -{ - static unsigned char result[16], *spc; - int len, chk; - - spc = strchr(text, ' '); - if (spc) - len = spc - text; - else - len = strlen(text); - - switch (len) { - case 6: - strcpy(result, upc_e_to_a0(text)); - return result; - case 7: - /* the first char is '0' or '1': - * valid number system for UPC-E and no checksum - */ - if (text[0] == '0' || text[0] == '1') { - strcpy(result, upc_e_to_a0(text+1)); - result[0] = text[0]; - return result; - } - - /* Find out whether the 7th char is correct checksum */ - strcpy(result, upc_e_to_a0(text)); - chk = ean_make_checksum(result, 0); - - if (chk == (text[len-1] - '0')) - return result; - /* Invalid 7 digit representation for UPC-E. */ - return NULL; - case 8: - if (text[0] == '0' || text[0] == '1') { - strcpy(result, upc_e_to_a0(text+1)); - result[0] = text[0]; - chk = ean_make_checksum(result, 0); - if (chk == (text[len-1] - '0')) - return result; - } - default: - /* Invalid representation for UPC-E. */ - return NULL; - } -} - -/* - * Accept a 11 or 12 digit UPC-A barcode and - * shrink it into an 8-digit UPC-E equivalent if possible. - * Return NULL if impossible, the UPC-E barcode if possible. - */ -static unsigned char *upc_a_to_e(unsigned char *text) -{ - static unsigned char result[16]; - int len, chksum; - - len = strlen(text); - switch (len) { - case 12: - strcpy(result, text); - result[11] = '\0'; - chksum = ean_make_checksum(result, 0); - if (text[11] != (chksum - '0')) - return NULL; - break; - case 11: - chksum = ean_make_checksum(text, 0); - break; - default: - return NULL; - } - - strcpy(result, "00000000"); /* 8 0's*/ - - /* UPC-E can only be used with number system 0 or 1 */ - if (text[0] != '0' && text[0] != '1') - return NULL; - - result[0] = text[0]; - - if ((text[3] == '0' || text[3] == '1' || text[3] == '2') - && !strncmp(text+4, "0000", 4)) { - memcpy(&result[1], text+1, 2); - memcpy(&result[3], text+8, 3); - result[6] = text[3]; - } else if (!strncmp(text+4, "00000", 5)) { - memcpy(&result[1], text+1, 3); - memcpy(&result[4], text+9, 2); - result[6] = '3'; - } else if (!strncmp(text+5, "00000", 5)) { - memcpy(&result[1], text+1, 4); - result[5] = text[10]; - result[6] = '4'; - } else if ((text[5] != '0') && !strncmp(text+6, "0000", 4) - && text[10] >= '5' && text[10] <= '9') { - memcpy(&result[1], text+1, 5); - result[6] = text[10]; - } else { - return NULL; - } - result[7] = chksum + '0'; - - return result; -} - -/* - * UPC-A is the same as EAN, but accept - * 12 or 11 digits (UPC-A w/ or w/o checksum) - * or accept UPC-E as: - * 6 digits (w/o number system and checksum): number system '0' assumed, - * 7 digits (either w/o number system or checksum), - * 8 digits (w/ number system and checksum) - * plus the 2 or 5-digit add-on - */ -int Barcode_upc_verify(unsigned char *text) -{ - int i, len0, len, addon; - unsigned char tmp[24], *spc; - - len = strlen(text); - spc = strchr(text, ' '); - if (spc) { - len0 = spc - text; - addon = len - len0 - 1; - if (addon != 2 && addon != 5) - return -1; - for (i=len0+1; i<len; i++) - if (!isdigit(text[i])) - return -1; - } else - len0 = len; - - for (i=0; i<len0; i++) - if (!isdigit(text[i])) - return -1; - - switch (len0) { - case 6: case 7: case 8: - strncpy(tmp, text, len0); - tmp[len0] = '\0'; - if (!upc_e_to_a(tmp)) - return -1; - break; - case 12: - strncpy(tmp, text, 11); - tmp[11] = '\0'; - if (text[11] != (ean_make_checksum(tmp, 0) + '0')) - return -1; - case 11: - break; - default: - return -1; - } - return 0; -} - -/* - * Isbn is the same as EAN, just shorter. Dashes are accepted, the - * check character (if specified) is skipped, the extra 5 digits are - * accepted after a blank. - */ -int Barcode_isbn_verify(unsigned char *text) -{ - int i, ndigit=0; - - for (i=0; text[i]; i++) { - if (text[i] == '-') - continue; - if (isdigit(text[i])) { - ndigit++; - if (ndigit == 9) { /* got it all */ - i++; break; - } - continue; - } - return -1; /* found non-digit */ - } - if (ndigit!=9) return -1; /* too short */ - - /* skip an hyphen, if any */ - if (text[i] == '-') - i++; - /* accept one more char if any (the checksum) */ - if (isdigit(text[i]) || toupper(text[i])=='X') - i++; - if (text[i] == '\0') - return 0; /* Ok */ - - /* and accept the extra price tag (blank + 5 digits), if any */ - if (strlen(text+i) != 6) - return -1; - if (text[i] != ' ') - return -1; - i++; /* skip the blank */ - while (text[i]) { - if (!isdigit(text[i])) - return -1; - i++; - } - return 0; /* Ok: isbn + 5-digit addon */ -} - -static int width_of_partial(unsigned char *partial) -{ - int i=0; - while (*partial) { - if (isdigit(*partial)) - i += *partial - '0'; - else if (islower(*partial)) - i += *partial - 'a' + 1; - partial++; - } - return i; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * This one deals with both upc (-A and -E) and ean (13 and 8). - */ -int Barcode_ean_encode(struct Barcode_Item *bc) -{ - static char text[24]; - static char partial[256]; - static char textinfo[256]; - char *mirror, *ptr1, *ptr2, *tptr = textinfo; /* where text is written */ - char *spc; - - enum {UPCA, UPCE, EAN13, EAN8, ISBN} encoding = ISBN; - int i, xpos, checksum, len, len0, addon; - - if (!bc->ascii) { - bc->error = EINVAL; - return -1; - } - - /* Find out whether the barcode has addon and - * the length of the barcode w/o the addon. - */ - len = strlen(bc->ascii); - spc = strchr(bc->ascii, ' '); - if (spc) { - len0 = spc - bc->ascii; - addon = strlen(spc + 1); - if (addon != 2 && addon != 5) { - bc->error = EINVAL; /* impossible, actually */ - return -1; - } - } else { - len0 = len; - addon = 0; - } - - if (!bc->encoding) { - /* ISBN already wrote what it is; if unknown, find it out */ - - /* - * Do not decide only by barcode length, it may be ambiguous. - * Anyway, either the user specified the barcode type or - * we already found a fitting one. - */ - switch(bc->flags & BARCODE_ENCODING_MASK) { - case BARCODE_EAN: - switch (len0) { - case 7: case 8: - bc->encoding = strdup("EAN-8"); - encoding = EAN8; - break; - case 12: case 13: - bc->encoding = strdup("EAN-13"); - encoding = EAN13; - break; - default: - bc->error = -EINVAL; - return -1; - } - break; - - case BARCODE_UPC: - switch (len0) { - case 6: case 7: case 8: - bc->encoding = strdup("UPC-E"); - encoding = UPCE; - break; - case 11: case 12: - bc->encoding = strdup("UPC-A"); - encoding = UPCA; - break; - default: - bc->error = -EINVAL; - return -1; - } - break; - default: - /* else, it's wrong (impossible, as the text is checked) */ - bc->error = -EINVAL; - return -1; - } - } - - /* better safe than sorry */ - if (bc->partial) free(bc->partial); bc->partial = NULL; - if (bc->textinfo) free(bc->textinfo); bc->textinfo = NULL; - - if (encoding == UPCA) { /* add the leading 0 (not printed) */ - text[0] = '0'; - strcpy(text+1, bc->ascii); - } else if (encoding == UPCE) { - strcpy(text, upc_a_to_e(upc_e_to_a(bc->ascii))); - } else { - strcpy(text, bc->ascii); - } - - /* - * build the checksum and the bars: any encoding is slightly different - */ - if (encoding == UPCA || encoding == EAN13 || encoding == ISBN) { - if (!(encoding == UPCA && len0 == 12) && - !(encoding == EAN13 && len0 == 13)) { - checksum = ean_make_checksum(text, 0); - text[12] = '0' + checksum; /* add it to the text */ - text[13] = '\0'; - } - - strcpy(partial, guard[0]); - if (encoding == EAN13 || encoding == ISBN) { /* The first digit */ - sprintf(tptr,"0:12:%c ",text[0]); - tptr += strlen(tptr); - partial[0] = '9'; /* extra space for the digit */ - } else if (encoding == UPCA) - partial[0] = '9'; /* UPC has one digit before the symbol, too */ - xpos = width_of_partial(partial); - mirror = ean_mirrortab[text[0]-'0']; - - /* left part */ - for (i=1;i<7;i++) { - ptr1 = partial + strlen(partial); /* target */ - ptr2 = digits[text[i]-'0']; /* source */ - strcpy(ptr1, ptr2); - if (mirror[i-1] == '1') { - /* mirror this */ - ptr1[0] = ptr2[3]; - ptr1[1] = ptr2[2]; - ptr1[2] = ptr2[1]; - ptr1[3] = ptr2[0]; - } - /* - * Write the ascii digit. UPC has a special case - * for the first digit, which is out of the bars - */ - if (encoding == UPCA && i==1) { - sprintf(tptr, "0:10:%c ", text[i]); - tptr += strlen(tptr); - ptr1[1] += 'a'-'1'; /* bars are long */ - ptr1[3] += 'a'-'1'; - } else { - sprintf(tptr, "%i:12:%c ", xpos, text[i]); - tptr += strlen(tptr); - } - /* count the width of the symbol */ - xpos += 7; /* width_of_partial(ptr2) */ - } - - strcat(partial, guard[1]); /* middle */ - xpos += width_of_partial(guard[1]); - - /* right part */ - for (i=7;i<13;i++) { - ptr1 = partial + strlen(partial); /* target */ - ptr2 = digits[text[i]-'0']; /* source */ - strcpy(ptr1, ptr2); - /* - * Ascii digit. Once again, UPC has a special - * case for the last digit - */ - if (encoding == UPCA && i==12) { - sprintf(tptr, "%i:10:%c ", xpos+13, text[i]); - tptr += strlen(tptr); - ptr1[0] += 'a'-'1'; /* bars are long */ - ptr1[2] += 'a'-'1'; - } else { - sprintf(tptr, "%i:12:%c ", xpos, text[i]); - tptr += strlen(tptr); - } - xpos += 7; /* width_of_partial(ptr2) */ - } - tptr[-1] = '\0'; /* overwrite last space */ - strcat(partial, guard[2]); /* end */ - xpos += width_of_partial(guard[2]); - - } else if (encoding == UPCE) { - checksum = text[7] - '0'; - - strcpy(partial, guardE[0]); - partial[0] = '9'; /* UPC-A has one digit before the symbol, too */ - xpos = width_of_partial(partial); - - /* UPC-E has the number system written before the bars. */ - sprintf(tptr, "0:10:%c ", text[0]); - tptr += strlen(tptr); - - if (text[0] == '0') - mirror = upc_mirrortab[checksum]; - else - mirror = upc_mirrortab1[checksum]; - - for (i=0;i<6;i++) { - ptr1 = partial + strlen(partial); /* target */ - ptr2 = digits[text[i+1]-'0']; /* source */ - strcpy(ptr1, ptr2); - if (mirror[i] != '1') { /* negated wrt EAN13 */ - /* mirror this */ - ptr1[0] = ptr2[3]; - ptr1[1] = ptr2[2]; - ptr1[2] = ptr2[1]; - ptr1[3] = ptr2[0]; - } - sprintf(tptr, "%i:12:%c ", xpos, text[i+1]); - tptr += strlen(tptr); - xpos += 7; /* width_of_partial(ptr2) */ - } - - sprintf(tptr, "%i:10:%c ", xpos+10, text[7]); - tptr += strlen(tptr); - ptr1[0] += 'a'-'1'; /* bars are long */ - ptr1[2] += 'a'-'1'; - - tptr[-1] = '\0'; /* overwrite last space */ - strcat(partial, guardE[1]); /* end */ - - } else { /* EAN-8 almost identical to EAN-13 but no mirroring */ - - if (len0 != 8) { - checksum = ean_make_checksum(text, 0); - text[7] = '0' + checksum; /* add it to the text */ - text[8] = '\0'; - } - - strcpy(partial, guard[0]); - xpos = width_of_partial(partial); - - /* left part */ - for (i=0;i<4;i++) { - strcpy(partial + strlen(partial), digits[text[i]-'0']); - sprintf(tptr, "%i:12:%c ", xpos, text[i]); - tptr += strlen(tptr); - xpos += 7; /* width_of_partial(digits[text[i]-'0' */ - } - strcat(partial, guard[1]); /* middle */ - xpos += width_of_partial(guard[1]); - - /* right part */ - for (i=4;i<8;i++) { - strcpy(partial + strlen(partial), digits[text[i]-'0']); - sprintf(tptr, "%i:12:%c ", xpos, text[i]); - tptr += strlen(tptr); - xpos += 7; /* width_of_partial(digits[text[i]-'0' */ - } - tptr[-1] = '\0'; /* overwrite last space */ - strcat(partial, guard[2]); /* end */ - } - - /* - * And that's it. Now, in case some add-on is specified it - * must be encoded too. Look for it. - */ - if ( (ptr1 = spc) ) { - ptr1++; - strcpy(text, ptr1); - if (strlen(ptr1)==5) { - checksum = ean_make_checksum(text, 1 /* special way */); - mirror = upc_mirrortab[checksum]+1; /* only last 5 digits */ - } else { - checksum = atoi(text)%4; - mirror = upc_mirrortab2[checksum]; - } - strcat(textinfo, " +"); strcat(partial, "+"); - tptr = textinfo + strlen(textinfo); - for (i=0; i<strlen(text); i++) { - if (!i) { - strcat(partial, guardS[0]); /* separation and head */ - xpos += width_of_partial(guardS[0]); - } else { - strcat(partial, guardS[1]); - xpos += width_of_partial(guardS[1]); - } - ptr1 = partial + strlen(partial); /* target */ - ptr2 = digits[text[i]-'0']; /* source */ - strcpy(ptr1, ptr2); - if (mirror[i] != '1') { /* negated wrt EAN13 */ - /* mirror this */ - ptr1[0] = ptr2[3]; - ptr1[1] = ptr2[2]; - ptr1[2] = ptr2[1]; - ptr1[3] = ptr2[0]; - } - /* and the text */ - sprintf(tptr, " %i:12:%c", xpos, text[i]); - tptr += strlen(tptr); - xpos += 7; /* width_of_partial(ptr2) */ - } - } - - /* all done, copy results to the data structure */ - bc->partial = strdup(partial); - if (!bc->partial) { - bc->error = errno; - return -1; - } - bc->textinfo = strdup(textinfo); - if (!bc->textinfo) { - bc->error = errno; - free(bc->partial); - bc->partial = NULL; - return -1; - } - if (!bc->width) - bc->width = width_of_partial(partial); - - return 0; /* success */ -} - -int Barcode_upc_encode(struct Barcode_Item *bc) -{ - return Barcode_ean_encode(bc); /* UPC is folded into EAN */ -} - -int Barcode_isbn_encode(struct Barcode_Item *bc) -{ - /* For ISBN we must normalize the string and prefix "978" */ - unsigned char *text = malloc(24); /* 13 + ' ' + 5 plus some slack */ - unsigned char *otext; - int i, j, retval; - - if (!text) { - bc->error = ENOMEM; - return -1; - } - strcpy(text, "978"); j=3; - - otext = bc->ascii; - for (i=0; otext[i]; i++) { - if (isdigit(otext[i])) - text[j++] = otext[i]; - if (j == 12) /* checksum added later */ - break; - } - text[j]='\0'; - if (strchr(otext, ' ')) - strcat(text, strchr(otext, ' ')); - bc->ascii = text; - bc->encoding = strdup("ISBN"); - retval = Barcode_ean_encode(bc); - bc->ascii = otext; /* restore ascii for the ps comments */ - free(text); - return retval; -} - diff --git a/glabels1/barcode-0.98/i25.c b/glabels1/barcode-0.98/i25.c deleted file mode 100644 index 72bd035..0000000 --- a/glabels1/barcode-0.98/i25.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * i25.c -- "interleaved 2 of 5" - * - * Copyright (c) 1999,2000 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -static char *codes[] = { - "11331", "31113", "13113", "33111", "11313", - "31311", "13311", "11133", "31131", "13131" -}; - -static char *guard[] = {"a1a1", "c1a"}; /* begin end */ - -int Barcode_i25_verify(unsigned char *text) -{ - if (!text[0]) - return -1; - while (*text && isdigit(*text)) - text++; - if (*text) - return -1; /* a non-digit char */ - return 0; /* ok */ -} - -int Barcode_i25_encode(struct Barcode_Item *bc) -{ - unsigned char *text; - unsigned char *partial; /* dynamic */ - unsigned char *textinfo; /* dynamic */ - unsigned char *textptr, *p1, *p2, *pd; - int i, len, sum[2], textpos, usesum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("interleaved 2 of 5"); - - text = bc->ascii; - if (!bc->ascii) { - bc->error = EINVAL; - return -1; - } - - if ((bc->flags & BARCODE_NO_CHECKSUM)) usesum = 0; else usesum = 1; - - /* create the real text string, padded to an even number of digits */ - text = malloc(strlen(bc->ascii) + 3); /* leading 0, checksum, term. */ - if (!text) { - bc->error = errno; - return -1; - } - /* add the leading 0 if needed */ - i = strlen(bc->ascii) + usesum; - if (i % 2) { - /* add a leading 0 */ - text[0] = '0'; - strcpy(text+1, bc->ascii); - } else { - strcpy(text, bc->ascii); - } - /* add the trailing checksum if needed, the leading 0 is ignored */ - if (usesum) { - sum[0] = sum[1] = 0; - for (i=0; text[i]; i++) - sum[i%2] += text[i]-'0'; - /* - * The "even" sum must be multiplied by three, and the * - * rightmost digit is defined as "even". The digits' position - * is already correct, whether or not we added a leading zero. - * (e.g., they are in pos. 0..4 or 1..4 of the string) - */ - i = sum[0] * 3 + sum[1]; - strcat(text, "0"); - text[strlen(text)-1] += (10 - (i%10)) % 10; - } - - /* the partial code is 5 * (text + check) + 4(head) + 3(tail) + term. */ - partial = malloc( (strlen(text) + 3) * 5 +2); /* be large... */ - if (!partial) { - bc->error = errno; - free(text); - return -1; - } - - /* the text information is at most "nnn:fff:c " * (strlen+1) +term */ - textinfo = malloc(10*(strlen(text)+1) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - free(text); - return -1; - } - - - strcpy(partial, "0"); /* the first space */ - strcat(partial, guard[0]); /* start */ - textpos = 4; /* width of initial guard */ - textptr = textinfo; - - len = strlen(text); - for (i=0; i<len; i+=2) { - if (!isdigit(text[i]) || !isdigit(text[i+1])) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - free(text); - return -1; - } - /* interleave two digits */ - p1 = codes[text[i]-'0']; - p2 = codes[text[i+1]-'0']; - pd = partial + strlen(partial); /* destination */ - while (*p1) { - *(pd++) = *(p1++); - *(pd++) = *(p2++); - } - *pd = '\0'; - /* and print the ascii text (but don't print the checksum, if any */ - if (usesum && strlen(text+i)==2) { - /* print only one digit, discard the checksum */ - sprintf(textptr, "%i:12:%c ", textpos, text[i]); - } else { - sprintf(textptr, "%i:12:%c %i:12:%c ", textpos, text[i], - textpos+9, text[i+1]); - } - textpos += 18; /* width of two codes */ - textptr += strlen(textptr); - } - strcat(partial, guard[1]); - - bc->partial = partial; - bc->textinfo = textinfo; - free(text); - - return 0; -} - diff --git a/glabels1/barcode-0.98/install-sh b/glabels1/barcode-0.98/install-sh deleted file mode 100644 index ab74c88..0000000 --- a/glabels1/barcode-0.98/install-sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -tranformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/glabels1/barcode-0.98/library.c b/glabels1/barcode-0.98/library.c deleted file mode 100644 index a878702..0000000 --- a/glabels1/barcode-0.98/library.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * library.c -- external functions of libbarcode - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#ifdef HAVE_UNISTD_H /* sometimes (windows, for instance) it's missing */ -# include <unistd.h> -#endif -#include <errno.h> - -#include "barcode.h" - -/* - * This function allocates a barcode structure and strdup()s the - * text string. It returns NULL in case of error - */ -struct Barcode_Item *Barcode_Create(char *text) -{ - struct Barcode_Item *bc; - - bc = malloc(sizeof(*bc)); - if (!bc) return NULL; - - memset(bc, 0, sizeof(*bc)); - bc->ascii = strdup(text); - bc->margin = BARCODE_DEFAULT_MARGIN; /* default margin */ - return bc; -} - - -/* - * Free a barcode structure - */ -int Barcode_Delete(struct Barcode_Item *bc) -{ - if (bc->ascii) - free(bc->ascii); - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - if (bc->encoding) - free(bc->encoding); - free(bc); - return 0; /* always success */ -} - - -/* - * The various supported encodings. This might be extended to support - * dynamic addition of extra encodings - */ -extern int Barcode_ean_verify(unsigned char *text); -extern int Barcode_ean_encode(struct Barcode_Item *bc); -extern int Barcode_upc_verify(unsigned char *text); -extern int Barcode_upc_encode(struct Barcode_Item *bc); -extern int Barcode_isbn_verify(unsigned char *text); -extern int Barcode_isbn_encode(struct Barcode_Item *bc); -extern int Barcode_39_verify(unsigned char *text); -extern int Barcode_39_encode(struct Barcode_Item *bc); -extern int Barcode_128b_verify(unsigned char *text); -extern int Barcode_128b_encode(struct Barcode_Item *bc); -extern int Barcode_128c_verify(unsigned char *text); -extern int Barcode_128c_encode(struct Barcode_Item *bc); -extern int Barcode_128_verify(unsigned char *text); -extern int Barcode_128_encode(struct Barcode_Item *bc); -extern int Barcode_128raw_verify(unsigned char *text); -extern int Barcode_128raw_encode(struct Barcode_Item *bc); -extern int Barcode_i25_verify(unsigned char *text); -extern int Barcode_i25_encode(struct Barcode_Item *bc); -extern int Barcode_cbr_verify(unsigned char *text); -extern int Barcode_cbr_encode(struct Barcode_Item *bc); -extern int Barcode_msi_verify(unsigned char *text); -extern int Barcode_msi_encode(struct Barcode_Item *bc); -extern int Barcode_pls_verify(unsigned char *text); -extern int Barcode_pls_encode(struct Barcode_Item *bc); -extern int Barcode_93_verify(unsigned char *text); -extern int Barcode_93_encode(struct Barcode_Item *bc); - - -struct encoding { - int type; - int (*verify)(unsigned char *text); - int (*encode)(struct Barcode_Item *bc); -}; - -struct encoding encodings[] = { - {BARCODE_EAN, Barcode_ean_verify, Barcode_ean_encode}, - {BARCODE_UPC, Barcode_upc_verify, Barcode_upc_encode}, - {BARCODE_ISBN, Barcode_isbn_verify, Barcode_isbn_encode}, - {BARCODE_128B, Barcode_128b_verify, Barcode_128b_encode}, - {BARCODE_128C, Barcode_128c_verify, Barcode_128c_encode}, - {BARCODE_128RAW, Barcode_128raw_verify, Barcode_128raw_encode}, - {BARCODE_39, Barcode_39_verify, Barcode_39_encode}, - {BARCODE_I25, Barcode_i25_verify, Barcode_i25_encode}, - {BARCODE_128, Barcode_128_verify, Barcode_128_encode}, - {BARCODE_CBR, Barcode_cbr_verify, Barcode_cbr_encode}, - {BARCODE_PLS, Barcode_pls_verify, Barcode_pls_encode}, - {BARCODE_MSI, Barcode_msi_verify, Barcode_msi_encode}, - {BARCODE_93, Barcode_93_verify, Barcode_93_encode}, - {0, NULL, NULL} -}; - -/* - * A function to encode a string into bc->partial, ready for - * postprocessing to the output file. Meaningful bits for "flags" are - * the encoding mask and the no-checksum flag. These bits - * get saved in the data structure. - */ -int Barcode_Encode(struct Barcode_Item *bc, int flags) -{ - int validbits = BARCODE_ENCODING_MASK | BARCODE_NO_CHECKSUM; - struct encoding *cptr; - - /* If any flag is cleared in "flags", inherit it from "bc->flags" */ - if (!(flags & BARCODE_ENCODING_MASK)) - flags |= bc->flags & BARCODE_ENCODING_MASK; - if (!(flags & BARCODE_NO_CHECKSUM)) - flags |= bc->flags & BARCODE_NO_CHECKSUM; - flags = bc->flags = (flags & validbits) | (bc->flags & ~validbits); - - if (!(flags & BARCODE_ENCODING_MASK)) { - /* get the first code able to handle the text */ - for (cptr = encodings; cptr->verify; cptr++) - if (cptr->verify((unsigned char *)bc->ascii)==0) - break; - if (!cptr->verify) { - bc->error = EINVAL; /* no code can handle this text */ - return -1; - } - flags |= cptr->type; /* this works */ - bc->flags |= cptr->type; - } - for (cptr = encodings; cptr->verify; cptr++) - if (cptr->type == (flags & BARCODE_ENCODING_MASK)) - break; - if (!cptr->verify) { - bc->error = EINVAL; /* invalid barcode type */ - return -1; - } - if (cptr->verify(bc->ascii) != 0) { - bc->error = EINVAL; - return -1; - } - return cptr->encode(bc); -} - - -/* - * When multiple output formats are supported, there will - * be a jumpt table like the one for the types. Now we don't need it - */ -extern int Barcode_ps_print(struct Barcode_Item *bc, FILE *f); -extern int Barcode_pcl_print(struct Barcode_Item *bc, FILE *f); - -/* - * A function to print a partially decoded string. Meaningful bits for - * "flags" are the output mask etc. These bits get saved in the data - * structure. - */ -int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags) -{ - int validbits = BARCODE_OUTPUT_MASK | BARCODE_NO_ASCII - | BARCODE_OUT_NOHEADERS; - - /* If any flag is clear in "flags", inherit it from "bc->flags" */ - if (!(flags & BARCODE_OUTPUT_MASK)) - flags |= bc->flags & BARCODE_OUTPUT_MASK; - if (!(flags & BARCODE_NO_ASCII)) - flags |= bc->flags & BARCODE_NO_ASCII; - if (!(flags & BARCODE_OUT_NOHEADERS)) - flags |= bc->flags & BARCODE_OUT_NOHEADERS; - flags = bc->flags = (flags & validbits) | (bc->flags & ~validbits); - - if (bc->flags & BARCODE_OUT_PCL) - return Barcode_pcl_print(bc, f); - return Barcode_ps_print(bc, f); -} - -/* - * Choose the position - */ -int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, - int xoff, int yoff, double scalef) -{ - bc->width = wid; bc->height = hei; - bc->xoff = xoff; bc->yoff = yoff; - bc->scalef = scalef; - return 0; -} - -/* - * Do it all in one step - */ -int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, - int xoff, int yoff, int flags) -{ - struct Barcode_Item * bc; - - if (!(bc=Barcode_Create(text))) { - errno = -ENOMEM; - return -1; - } - if ( Barcode_Position(bc, wid, hei, xoff, yoff, 0.0) < 0 - || Barcode_Encode(bc, flags) < 0 - || Barcode_Print(bc, f, flags) < 0) { - errno = bc->error; - Barcode_Delete(bc); - return -1; - } - Barcode_Delete(bc); - return 0; -} - -/* - * Return the version - */ - -int Barcode_Version(char *vptr) -{ - if (vptr) - strcpy(vptr, BARCODE_VERSION); - return BARCODE_VERSION_INT; -} diff --git a/glabels1/barcode-0.98/main.c b/glabels1/barcode-0.98/main.c deleted file mode 100644 index e07e4d3..0000000 --- a/glabels1/barcode-0.98/main.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * main.c - a commandline frontend for the barcode library - * - * Copyright (c) 1999 Michele Comitini (mcm@glisco.it) - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> - -#include "cmdline.h" -#include "barcode.h" - -#ifndef NO_LIBPAPER -#include <paper.h> -#endif - -/* - * Most of this file deals with command line options, by exploiting - * the cmdline.[ch] engine to offer defaults via environment variables - * and handling functions for complex options. - * - * In order to offer a friendly interface (for those who feel the - * cmdline *is* friendly, like me), we have to convert names to enums... - */ - -struct { - char *name; - int type; -} encode_tab[] = { - {"ean", BARCODE_EAN}, - {"ean13", BARCODE_EAN}, - {"ean-13", BARCODE_EAN}, - {"ean8", BARCODE_EAN}, - {"ean-8", BARCODE_EAN}, - {"upc", BARCODE_UPC}, - {"upc-a", BARCODE_UPC}, - {"upc-e", BARCODE_UPC}, - {"isbn", BARCODE_ISBN}, - {"39", BARCODE_39}, - {"code39", BARCODE_39}, - {"128c", BARCODE_128C}, - {"code128c", BARCODE_128C}, - {"128b", BARCODE_128B}, - {"code128b", BARCODE_128B}, - {"128", BARCODE_128}, - {"code128", BARCODE_128}, - {"128raw", BARCODE_128RAW}, - {"i25", BARCODE_I25}, - {"interleaved 2 of 5", BARCODE_I25}, - {"cbr", BARCODE_CBR}, - {"codabar", BARCODE_CBR}, - {"msi", BARCODE_MSI}, - {"pls", BARCODE_PLS}, - {"plessey", BARCODE_PLS}, - {"code93", BARCODE_93}, - {"93", BARCODE_93}, - - {NULL, 0} -}; - -/* - * Get encoding type from string rapresentation. - * Returns -1 on error. - */ -#ifndef HAVE_STRCASECMP /* some libs (windows, for example) have stricmp */ -# define strcasecmp stricmp -#endif - -int encode_id(char *encode_name) -{ - int i; - for (i = 0; encode_tab[i].name; i++) - if (!strcasecmp(encode_tab[i].name, encode_name)) - return encode_tab[i].type; - return -1; -} - -int list_encodes(FILE *f) /* used in the help message */ -{ - int prev = -1; - int i; - - fprintf(f, "Known encodings are (synonyms appear on the same line):"); - for (i = 0; encode_tab[i].name; i++) { - if (encode_tab[i].type != prev) - fprintf(f, "\n\t"); - else - fprintf(f, ", "); - fprintf(f, "\"%s\"", encode_tab[i].name); - prev = encode_tab[i].type; - } - fprintf(f, "\n"); - return 0; -} - - -/* - * Variables to hold cmdline arguments (or defaults) - */ - -char *ifilename, *ofilename; -int encoding_type; /* filled by get_encoding() */ -int code_width, code_height; /* "-g" for standalone codes */ -int lines, columns; /* "-t" for tables */ -int xmargin0, ymargin0; /* both for "-g" and "-t" */ -int xmargin1, ymargin1; /* same, but right and top */ -int ximargin, yimargin; /* "-m": internal margins */ -int eps, pcl, ps, noascii, nochecksum; /* boolean flags */ -int page_wid, page_hei; /* page size in points */ -char *page_name; /* name of the media */ -double unit = 1.0; /* unit specification */ - -char *prgname; /* used to print error msgs, initialized to argv[0] by main */ - -/* - * Functions to handle command line arguments - */ - -struct encode_item { - char *string; - struct encode_item *next; -} *list_head, *list_tail; - -/* each "-b" option adds a string to the input pool allocating its space */ -int get_input_string(void *arg) -{ - struct encode_item *item = malloc(sizeof(*item)); - if (!item) { - fprintf(stderr, "%s: malloc: %s\n", prgname, strerror(errno)); - return -2; - } - item->string = strdup(arg); - if (!list_head) { - list_head = list_tail = item; - } else { - list_tail->next = item; - list_tail = item; - } - item->next = NULL; - return 0; -} - -/* and this function extracts strings from the pool */ -unsigned char *retrieve_input_string(FILE *ifile) -{ - char *string; - static char fileline[128]; - - struct encode_item *item = list_head; - if (list_tail) { /* this means at least one "-b" was specified */ - if (!item) - return NULL; /* the list is empty */ - string = item->string; - list_head = item->next; - free(item); - return string; - } - - /* else, read from the file */ - if (!fgets(fileline, 128, ifile)) - return NULL; - if (fileline[strlen(fileline)-1]=='\n') - fileline[strlen(fileline)-1]= '\0'; - return strdup(fileline); -} - -/* accept a unit specification */ -int get_unit(void *arg) -{ - static struct { - char *str; - double unit; - } *ptr, unittab[] = { - {"pt", 1.0}, - {"in", 72.0}, - {"cm", 72.0/2.54}, - {"mm", 72.0/25.4}, - {NULL, 0.0} - }; - - for (ptr = unittab; ptr->str && strcmp((char *)arg, ptr->str); ptr++) - ; - unit = ptr->unit; - if (ptr->str) return 0; - - fprintf(stderr, "%s: incorrect unit \"%s\" (use one of", - prgname, (char *)arg); - for (ptr = unittab; ptr->str; ptr++) - fprintf(stderr, " \"%s\"", ptr->str); - fprintf(stderr, ")\n"); - return -2; -} - -/* convert an encoding name to an encoding integer code */ -int get_encoding(void *arg) -{ - encoding_type = encode_id((char *)arg); - if (encoding_type >=0) return 0; - fprintf(stderr, "%s: wrong encoding \"%s\"\n", prgname, - (char *)arg); - return -2; /* error, no help */ -} - -/* convert a geometry specification */ -int get_geometry(void *arg) -{ - double w = 0.0, h = 0.0; - double x = 0.0, y = 0.0; - int n; - - if (((char *)arg)[0]=='+') { - n = sscanf((char *)arg, "+%lf+%lf%s", &x, &y, (char *)arg); - } else { - n = sscanf((char *)arg, "%lfx%lf+%lf+%lf%s", &w, &h, &x, &y, - (char *)arg); - } - if (n!=4 && n!=2) { - fprintf(stderr, "%s: wrong geometry \"%s\"\n", prgname, (char *)arg); - return -2; - } - /* convert to points */ - code_width = w * unit; - code_height = h * unit; - xmargin0 = x * unit; - ymargin0 = y * unit; - return 0; -} - -/* convert a geometry specification */ -int get_table(void *arg) -{ - double x0 = 0.0, y0 = 0.0, x1 = 0.0, y1 = 0.0; - int n; - - n = sscanf((char *)arg, "%dx%d+%lf+%lf-%lf-%lf", - &columns, &lines, &x0, &y0, &x1, &y1); - - if (n==1 || n==3) { /* error: 2, 4, 5, 6 are fine */ - fprintf(stderr, "%s: wrong table specification \"%s\"\n", prgname, - (char *)arg); - return -2; - } - if (n < 6) y1 = y0; /* symmetric by default */ - if (n < 5) x1 = x0; - - /* convert and return */ - xmargin0 = x0 * unit; - ymargin0 = y0 * unit; - xmargin1 = x1 * unit; - ymargin1 = y1 * unit; - return 0; -} - -/* convert an internal margin specification */ -int get_margin(void *arg) -{ - char separator; - double x,y; - int n; - - /* accept one number or two, separated by any char */ - n = sscanf((char *)arg, "%lf%c%lf", &x, &separator, &y); - - if (n==1) { - n=3; y = x; - } - if (n==3) { - ximargin = x * unit; - yimargin = y * unit; - return 0; - } - fprintf(stderr, "%s: wrong margin specification \"%s\"\n", prgname, - (char *)arg); - return -2; - return 0; -} - -/* convert a page geometry specification */ -int get_page_geometry(void *arg) -{ - int n; - double dpw, dph; /* page width, height in mm or inches */ - static char tmpstr[20]; - page_name = arg; /* if undecipherable, we won't run the program :) */ - /* - * try to decode a "mm" string (eg. "210mmx297mm" or "210x297mm") - */ - n = sscanf((char *)arg, "%lfmmx%lf", &dpw, &dph); - if (n != 2 && strlen(arg)<20) { - n = sscanf((char *)arg, "%lfx%lf%s", &dpw, &dph, tmpstr); - if (n == 3 && !strcmp(tmpstr, "mm")) { - /* Ok, convert to points: 1in is 25.4mm, 1in is also 72p */ - page_wid = (int)(dpw / 25.4 * 72.0 + 0.5); - page_hei = (int)(dph / 25.4 * 72.0 + 0.5); - return 0; - } - } - - /* - * try to decode an "in" string (eg. "8.5inx11in" or "8.5x11in") - */ - n = sscanf((char *)arg, "%lfinx%lf", &dpw, &dph); - if (n != 2 && strlen(arg)<20) { - n = sscanf((char *)arg, "%lfx%lf%s", &dpw, &dph, tmpstr); - if (n == 3 && !strcmp(tmpstr, "in")) { - page_wid = (int)(dpw * 72.0 + 0.5); /* round to points */ - page_hei = (int)(dph * 72.0 + 0.5); - return 0; - } - } - - /* - * try to decode a numeric specification - */ - n = sscanf((char *)arg, "%lfx%lf", &dpw, &dph); - if (n == 2) { - page_wid = dpw * unit; - page_hei = dph * unit; - if (unit != 1.0) { /* rebuild the page name */ - page_name = malloc(32); /* big, to avoid snprintf, missing on HP */ - if (page_name) - sprintf(page_name, "%dx%d\n", page_wid, page_hei); - } - return 0; - } - -#ifndef NO_LIBPAPER - /* - * try to use libpaper, since it is available - */ - { - const struct paper* paptr; - - paperinit(); - paptr = paperinfo(arg); - if (!paptr) { /* unknown name */ - paperdone(); - return -1; - } - page_wid = (int)(paperpswidth(paptr) + 0.5); - page_hei = (int)(paperpsheight(paptr) + 0.5); - paperdone(); - return 0; - } -#endif - /* If we got here, the argument is undecipherable: fail */ - fprintf(stderr, "%s: wrong page size specification \"%s\"\n", prgname, - (char *)arg); - return -2; -} - -/* - * The table of possible arguments - */ -struct commandline option_table[] = { - {'i', CMDLINE_S, &ifilename, NULL, NULL, NULL, - "input file (strings to encode), default is stdin"}, - {'o', CMDLINE_S, &ofilename, NULL, NULL, NULL, - "output file, default is stdout"}, - {'b', CMDLINE_S, NULL, get_input_string, NULL, NULL, - "string to encode (use input file if missing)"}, - {'e', CMDLINE_S, NULL, get_encoding, "BARCODE_ENCODING", NULL, - "encoding type (default is best fit for first string)"}, - {'u', CMDLINE_S, NULL, get_unit, "BARCODE_UNIT", NULL, - "unit (\"mm\", \"in\", ...) used to decode -g, -t, -p"}, - {'g', CMDLINE_S, NULL, get_geometry, "BARCODE_GEOMETRY", NULL, - "geometry on the page: [<wid>x<hei>][+<margin>+<margin>]"}, - {'t', CMDLINE_S, NULL, get_table, "BARCODE_TABLE", NULL, - "table geometry: <cols>x<lines>[+<margin>+<margin>]"}, - {'m', CMDLINE_S, NULL, get_margin, "BARCODE_MARGIN", "10", - "internal margin for each item in a table: <xm>[,<ym>]"}, - {'n', CMDLINE_NONE, &noascii, NULL, NULL, NULL, - "\"numeric\": avoid printing text along with the bars"}, - {'c', CMDLINE_NONE, &nochecksum, NULL, NULL, NULL, - "no Checksum character, if the chosen encoding allows it"}, - {'E', CMDLINE_NONE, &eps, NULL, NULL, NULL, - "print one code as eps file (default: multi-page ps)"}, - {'P', CMDLINE_NONE, &pcl, NULL, NULL, NULL, - "create PCL output instead of postscript"}, - {'p', CMDLINE_S, NULL, get_page_geometry, NULL, NULL, - "page size (refer to the man page)"}, - {0,} -}; - -#ifdef NO_STRERROR -/* - * A strerror replacement (thanks to Thad Floryan <thad@thadlabs.com>) - */ -char *strerror(int error) -{ - static char msg[16]; - if (error >= 0 && error < sys_nerr) - return sys_errlist[error]; - sprintf(msg, "Error %d", error); - return msg; -} -#endif - -/* - * The main function - */ -int main(int argc, char **argv) -{ - struct Barcode_Item * bc; - FILE *ifile = stdin; - FILE *ofile = stdout; - char *line; - int flags=0; /* for the library */ - int page, retval; - - prgname = argv[0]; - - /* First of all, accept "--help" and "-h" as a special case */ - if (argc == 2 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h"))) { - commandline_errormsg(stderr, option_table, argv[0], "Options:\n"); - fprintf(stderr,"\n"); - list_encodes(stderr); - exit(1); - } - /* Also, accept "--version" as a special case */ - if (argc == 2 && (!strcmp(argv[1],"--version"))) { - printf("barcode frontend (GNU barcode) " BARCODE_VERSION "\n"); - exit(0); - } - - /* Otherwise, parse the commandline */ - retval = commandline(option_table, argc, argv, "Use: %s [options]\n"); - if (retval) { - if (retval == -1) /* help printed, complete it */ - list_encodes(stderr); - else /* no help printed, suggest it */ - fprintf(stderr, "%s: try \"%s --help\"\n", prgname, prgname); - exit(1); - } - - /* If no paper size has been specified, use the default, if any */ - if (!page_name) { - page_wid = 595; page_hei = 842; - page_name = "A4"; /* I live in Europe :) */ -#ifndef NO_LIBPAPER - get_page_geometry(systempapername()); /* or the system default */ -#endif - } - - /* FIXME: print warnings for incompatible options */ - - /* open the input stream if specified */ - if (ifilename) - ifile = fopen(ifilename,"r"); - if (!ifile) { - fprintf(stderr, "%s: %s: %s\n", argv[0], ifilename, - strerror(errno)); - exit(1); - } - - /* open the output stream if specified */ - if (ofilename) - ofile = fopen(ofilename,"w"); - if (!ofile) { - fprintf(stderr, "%s: %s: %s\n", argv[0], ofilename, - strerror(errno)); - exit(1); - } - - if (encoding_type < 0) { /* unknown type specified */ - fprintf(stderr,"%s: Unknown endoding. Try \"%s --help\"\n", - argv[0], argv[0]); - exit(1); - } - flags |= encoding_type; - if (pcl) { - flags |= BARCODE_OUT_PCL; - } else { - ps = !eps; /* a shortcut */ - if (eps) - flags |= BARCODE_OUT_EPS; /* print headers too */ - else - flags |= BARCODE_OUT_PS | BARCODE_OUT_NOHEADERS; - } - if (noascii) - flags |= BARCODE_NO_ASCII; - if (nochecksum) - flags |= BARCODE_NO_CHECKSUM; - - /* the table is not available in eps mode */ - if (eps && (lines>1 || columns>1)) { - fprintf(stderr, "%s: can't print tables in EPS format\n",argv[0]); - exit(1); - } - - if (ps) { /* The header is independent of single/table mode */ - /* Headers. Don't let the library do it, we may need multi-page */ - fprintf(ofile, "%%!PS-Adobe-2.0\n"); - /* It would be nice to know the bounding box. Leave it alone */ - fprintf(ofile, "%%%%Creator: \"barcode\", " - "libbarcode sample frontend\n"); - if (page_name) - fprintf(ofile, "%%%%DocumentPaperSizes: %s\n", page_name); - fprintf(ofile, "%%%%EndComments\n"); - fprintf(ofile, "%%%%EndProlog\n\n"); - } - - /* - * Here we are, ready to work. Handle the one-per-page case first, - * as it is shorter. - */ - if (!lines && !columns) { - page = 0; - while ( (line = retrieve_input_string(ifile)) ) { - page++; - if (ps) { - fprintf(ofile, "%%%%Page: %i %i\n\n",page,page); - } - if (Barcode_Encode_and_Print(line, ofile, code_width, code_height, - xmargin0, ymargin0, flags) < 0) { - fprintf(stderr, "%s: can't encode \"%s\"\n", argv[0], line); - } - if (eps) break; /* if output is eps, do it once only */ - if (ps) fprintf(ofile, "showpage\n"); - if (pcl) fprintf(ofile, "\f"); - } - /* no more lines, print footers */ - if (ps) { - fprintf(ofile, "%%%%Trailer\n\n"); - } - } else { - - /* table mode, the header has been already printed */ - - int xstep = (page_wid - xmargin0 - xmargin1)/columns; - int ystep = (page_hei - ymargin0 - ymargin1)/lines; - int x = columns, y = -1; /* position in the table, start off-page */ - - if (!ximargin) ximargin = BARCODE_DEFAULT_MARGIN; - if (!yimargin) yimargin = BARCODE_DEFAULT_MARGIN; - /* Assign default size unless -g did it (Joachim Reichelt) */ - if ( !code_width && !code_height) { - code_width = xstep - 2*ximargin; - code_height = ystep - 2*yimargin; - } - - page=0; - while ( (line = retrieve_input_string(ifile)) ) { - x++; /* fit x and y */ - if (x >= columns) { - x=0; y--; - if (y<0) { - y = lines-1; page++; - /* flush page */ - if (ps && page > 1) fprintf(ofile, "showpage\n"); - if (pcl && page > 1) fprintf(ofile, "\f"); - /* new page */ - if (ps) fprintf(ofile, "%%%%Page: %i %i\n\n",page,page); - } - } - - /* - * Create a barcode item. This allows to set the margin to 0, as - * we have [xy]imargin to use. But don't use Encode_and_Print(), - * unroll it here instead - */ - bc = Barcode_Create(line); - if (!bc) { - fprintf(stderr, "%s: Barcode_Create(): %s\n", argv[0], - strerror(errno)); - exit(1); - } - bc->margin = 0; - if ( (Barcode_Position(bc, code_width, code_height, - xmargin0 + ximargin + x * xstep, - ymargin0 + yimargin + y * ystep, 0.0) < 0) - || (Barcode_Encode(bc, flags) < 0) - || (Barcode_Print(bc, ofile, flags) < 0) ) { - fprintf(stderr, "%s: can't encode \"%s\": %s\n", argv[0], - line, strerror(bc->error)); - } - Barcode_Delete(bc); - } - if (ps) fprintf(ofile, "showpage\n\n%%%%Trailer\n\n"); - if (pcl) fprintf(ofile, "\f"); - } - return 0; -} - - - diff --git a/glabels1/barcode-0.98/msi.c b/glabels1/barcode-0.98/msi.c deleted file mode 100644 index 77a373b..0000000 --- a/glabels1/barcode-0.98/msi.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * msi.c -- encoding for MSI-Plessey - * - * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - - -/* Patterns */ -static char *patterns[] = { "13", "31" }; - -static char *fillers[] = { "031", "131" }; - -static int width = 16 /* each character uses 4 patterns */, - startpos = 6 /* length of the first filler */; - -/* - * Check that the text can be encoded. Returns 0 or -1. - */ -int Barcode_msi_verify(unsigned char *text) -{ - int i; - - if (!strlen(text)) - return -1; - for (i=0; text[i]; i++) { - if (!isdigit(text[i])) - return -1; - } - return 0; -} - -static int add_one(char *ptr, int code) -{ - sprintf(ptr, "%s%s%s%s", - patterns[(code >> 3) & 1], - patterns[(code >> 2) & 1], - patterns[(code >> 1) & 1], - patterns[code & 1]); - return 0; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * Lowercase chars are converted to uppercase - */ -int Barcode_msi_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *ptr, *textptr; - int i, code, textpos, usesum, checksum = 0; - - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("msi"); - - if ((bc->flags & BARCODE_NO_CHECKSUM)) - usesum = 0; - else - usesum = 1; - - text = bc->ascii; - - /* the partial code is head + 8 * (text + check) + tail + margin + term. */ - partial = malloc( 3 + 8 * (strlen(text) + 1) + 3 + 2 ); - if (!partial) { - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * strlen +term */ - textinfo = malloc(10*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - strcpy(partial, fillers[0]); - ptr = partial + strlen(partial); - textptr = textinfo; - textpos = startpos; - - for (i=0; i<strlen(text); i++) { - code = text[i] - '0'; - add_one(ptr, code); - sprintf(textptr, "%i:12:%c ", textpos, text[i]); - - textpos += width; /* width of each code */ - textptr += strlen(textptr); - ptr += strlen(ptr); - if (usesum) { - /* For a code ...FEDCBA the checksum is computed - * as the sum of digits of the number ...FDB plus - * the sum of digits of the number ...ECA * 2. - * Which is equivalent to the sum of each digit of ...ECA doubled - * plus carry. - */ - if ((i ^ strlen(text)) & 1) { - /* a last digit, 2 away from last, etc. */ - checksum += 2 * code + (2 * code) / 10; - } else { - checksum += code; - } - } - } - /* Some implementations use a double checksum. Currently the only way - * to print a barcode with double checksum is to put the checksum - * digit printed below at the end of a code in the command line - * and re-run the program. - */ - if (usesum) { - /* the check digit is the complement of the checksum - * to a multiple of 10. - */ - checksum = (checksum + 9) / 10 * 10 - checksum; - /* fprintf(stderr, "Checksum: %d\n", checksum); */ - add_one(ptr, checksum); - ptr += strlen(ptr); - } - - strcpy(ptr, fillers[1]); - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels1/barcode-0.98/pcl.c b/glabels1/barcode-0.98/pcl.c deleted file mode 100644 index d5ec097..0000000 --- a/glabels1/barcode-0.98/pcl.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * pcl.c -- printing the "partial" bar encoding in PCL format - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * Copyright (c) 2001 Andrea Scopece (a.scopece@tin.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -#define SHRINK_AMOUNT 0.15 /* shrink the bars to account for ink spreading */ - - -/* - * How do the "partial" and "textinfo" strings work? See file "ps.c" - */ - - -int Barcode_pcl_print(struct Barcode_Item *bc, FILE *f) -{ - int i, j, k, barlen; - double f1, f2, fsav=0; - int mode = '-'; /* text below bars */ - double scalef=1, xpos, x0, y0, yr; - unsigned char *ptr; - unsigned char c; - - char font_id[6]; /* default font, should be "scalable" */ - /* 0 Line printer, use on older LJet II, isn't scalable */ - /* 4148 Univers, use on LJet III series, and Lj 4L, 5L */ - /* 16602 Arial, default LJ family 4, 5, 6, Color, Djet */ - - if (!bc->partial || !bc->textinfo) { - bc->error = EINVAL; - return -1; - } - - /* - * Maybe this first part can be made common to several printing back-ends, - * we'll see how that works when other ouput engines are added - */ - - /* First, calculate barlen */ - barlen = bc->partial[0] - '0'; - for (ptr = bc->partial+1; *ptr; ptr++) - if (isdigit(*ptr)) - barlen += (*ptr - '0'); - else if (islower(*ptr)) - barlen += (*ptr - 'a'+1); - - /* The scale factor depends on bar length */ - if (!bc->scalef) { - if (!bc->width) bc->width = barlen; /* default */ - scalef = bc->scalef = (double)bc->width / (double)barlen; - } - - /* The width defaults to "just enough" */ - if (!bc->width) bc->width = barlen * scalef +1; - - /* But it can be too small, in this case enlarge and center the area */ - if (bc->width < barlen * scalef) { - int wid = barlen * scalef + 1; - bc->xoff -= (wid - bc->width)/2 ; - bc->width = wid; - /* Can't extend too far on the left */ - if (bc->xoff < 0) { - bc->width += -bc->xoff; - bc->xoff = 0; - } - } - - /* The height defaults to 80 points (rescaled) */ - if (!bc->height) bc->height = 80 * scalef; - -#if 0 - /* If too small (5 + text), enlarge and center */ - i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0); - if (bc->height < i * scalef ) { - int hei = i * scalef; - bc->yoff -= (hei-bc->height)/2; - bc->height = hei; - if (bc->yoff < 0) { - bc->height += -bc->yoff; - bc->yoff = 0; - } - } -#else - /* If too small (5 + text), reduce the scale factor and center */ - i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0); - if (bc->height < i * scalef ) { - double scaleg = ((double)bc->height) / i; - int wid = bc->width * scaleg / scalef; - bc->xoff += (bc->width - wid)/2; - bc->width = wid; - scalef = scaleg; - } -#endif - - /* - * deal with PCL output - */ - - xpos = bc->margin + (bc->partial[0]-'0') * scalef; - for (ptr = bc->partial+1, i=1; *ptr; ptr++, i++) { - /* special cases: '+' and '-' */ - if (*ptr == '+' || *ptr == '-') { - mode = *ptr; /* don't count it */ i++; continue; - } - - /* j is the width of this bar/space */ - if (isdigit (*ptr)) j = *ptr-'0'; - else j = *ptr-'a'+1; - if (i%2) { /* bar */ - x0 = bc->xoff + xpos; - y0 = bc->yoff + bc->margin; - yr = bc->height; - if (!(bc->flags & BARCODE_NO_ASCII)) { /* leave space for text */ - if (mode == '-') { - /* text below bars: 10 points or five points */ - yr -= (isdigit(*ptr) ? 10 : 5) * scalef; - } else { /* '+' */ - /* text above bars: 10 or 0 from bottom, and 10 from top */ - y0 += (isdigit(*ptr) ? 10 : 0) * scalef; - yr -= (isdigit(*ptr) ? 20 : 10) * scalef; - } - } - - fprintf(f,"%c&a%.0fH", 27, x0 * 10.0); - fprintf(f,"%c&a%.0fV", 27, y0 * 10.0); - fprintf(f,"%c*c%.0fH", 27, ((j*scalef)-SHRINK_AMOUNT) * 10.0); - fprintf(f,"%c*c%.0fV", 27, yr * 10.0); - fprintf(f,"%c*c0P\n", 27); - } - xpos += j * scalef; - } - - /* the text */ - - mode = '-'; /* reinstantiate default */ - if (!(bc->flags & BARCODE_NO_ASCII)) { - k=0; /* k is the "previous font size" */ - for (ptr = bc->textinfo; ptr; ptr = strchr(ptr, ' ')) { - while (*ptr == ' ') ptr++; - if (!*ptr) break; - if (*ptr == '+' || *ptr == '-') { - mode = *ptr; continue; - } - if (sscanf(ptr, "%lf:%lf:%c", &f1, &f2, &c) != 3) { - fprintf(stderr, "barcode: impossible data: %s\n", ptr); - continue; - } - - /* select a Scalable Font */ - - if (fsav != f2) - { - if ((bc->flags & BARCODE_OUT_PCL_III) == BARCODE_OUT_PCL_III) - { strcpy(font_id, "4148"); /* font Univers */ - } - else - { strcpy(font_id, "16602"); /* font Arial */ - } - - fprintf(f,"%c(8U%c(s1p%5.2fv0s0b%sT", 27, 27, f2 * scalef, font_id); - } - fsav = f2; - - fprintf(f,"%c&a%.0fH", 27, (bc->xoff + f1 * scalef + bc->margin) * 10.0); - fprintf(f,"%c&a%.0fV", 27, - mode != '-' - ? ((double)bc->yoff + bc->margin + 8*scalef) * 10.0 - : ((double)bc->yoff + bc->margin + bc->height ) * 10.0); - - fprintf(f, "%c", c); - } - - } - - return 0; -} diff --git a/glabels1/barcode-0.98/plessey.c b/glabels1/barcode-0.98/plessey.c deleted file mode 100644 index ec47100..0000000 --- a/glabels1/barcode-0.98/plessey.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * plessey.c -- encoding for Plessey - * - * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -static char * patterns[] = { "13", "31" }; - -/* this is ordered in decades to simplify encoding */ -static char alphabet[] = - "0123456789" "ABCDEF"; - -/* stop sequence may be 231311313 (barcodemill.com) */ -static char *fillers[] = { "031311331", "331311313" }; - -static int width = 16, startpos = 16; - -/* - * Check that the text can be encoded. Returns 0 or -1. - * If it's all lowecase convert to uppercase and accept it - */ -int Barcode_pls_verify(unsigned char *text) -{ - int i, upper = 0, lower = 0; - - if (!strlen(text)) - return -1; - for (i=0; text[i]; i++) { - if (!strchr(alphabet,toupper(text[i]))) - return -1; - if (isupper(text[i])) upper++; - if (islower(text[i])) lower++; - } - if (upper && lower) - return -1; - return 0; -} - -static int add_one(char *ptr, int code) -{ - sprintf(ptr, "%s%s%s%s", - patterns[code & 1], - patterns[(code >> 1) & 1], - patterns[(code >> 2) & 1], - patterns[(code >> 3) & 1] - ); - return 0; -} - -/* - * The encoding functions fills the "partial" and "textinfo" fields. - * Lowercase chars are converted to uppercase - */ -int Barcode_pls_encode(struct Barcode_Item *bc) -{ - static char *text; - static char *partial; /* dynamic */ - static char *textinfo; /* dynamic */ - char *c, *ptr, *textptr; - unsigned char *checkptr; - int i, code, textpos; - static char check[9] = {1,1,1,1,0,1,0,0,1}; - if (bc->partial) - free(bc->partial); - if (bc->textinfo) - free(bc->textinfo); - bc->partial = bc->textinfo = NULL; /* safe */ - - if (!bc->encoding) - bc->encoding = strdup("plessey"); - - text = bc->ascii; - if (!text) { - bc->error = EINVAL; - return -1; - } - /* the partial code is 8 * (head + text + check + tail) + margin + term. */ - partial = malloc( (strlen(text) + 4) * 8 + 3); - checkptr = calloc (1, strlen(text) * 4 + 8); - - if (!partial || !checkptr) { - if (partial) free(partial); - if (checkptr) free(checkptr); - bc->error = errno; - return -1; - } - - /* the text information is at most "nnn:fff:c " * strlen +term */ - textinfo = malloc(10*strlen(text) + 2); - if (!textinfo) { - bc->error = errno; - free(partial); - return -1; - } - - strcpy(partial, fillers[0]); - ptr = partial + strlen(partial); - textptr = textinfo; - textpos = startpos; - - for (i=0; i<strlen(text); i++) { - c = strchr(alphabet, toupper(text[i])); - if (!c) { - bc->error = EINVAL; /* impossible if text is verified */ - free(partial); - free(textinfo); - return -1; - } - code = c - alphabet; - add_one(ptr, code); - sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i])); - - textpos += width; /* width of each code */ - textptr += strlen(textptr); - ptr += strlen(ptr); - checkptr[4*i] = code & 1; - checkptr[4*i+1] = (code >> 1) & 1; - checkptr[4*i+2] = (code >> 2) & 1; - checkptr[4*i+3] = (code >> 3) & 1; - } - /* The CRC checksum is required */ - for (i=0; i < 4*strlen(text); i++) { - int j; - if (checkptr[i]) - for (j = 0; j < 9; j++) - checkptr[i+j] ^= check[j]; - } - for (i = 0; i < 8; i++) { - sprintf(ptr, patterns[checkptr[strlen(text) * 4 + i]]); - ptr += 2; - } - fprintf(stderr, "CRC: "); - for (i = 0; i < 8; i++) { - fputc('0' + checkptr[strlen(text) * 4 + i], stderr); - } - fputc('\n', stderr); - strcpy(ptr, fillers[1]); - bc->partial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels1/barcode-0.98/ps.c b/glabels1/barcode-0.98/ps.c deleted file mode 100644 index 3591751..0000000 --- a/glabels1/barcode-0.98/ps.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * ps.c -- printing the "partial" bar encoding - * - * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org) - * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> - -#include "barcode.h" - -#define SHRINK_AMOUNT 0.15 /* shrink the bars to account for ink spreading */ - - -/* - * How do the "partial" and "textinfo" strings work? - * - * The first char in "partial" tells how much extra space to add to the - * left of the bars. For EAN-13, it is used to leave space to print the - * first digit, other codes may have '0' for no-extra-space-needed. - * - * The next characters are alternating bars and spaces, as multiples - * of the base dimension which is 1 unless the code is - * rescaled. Rescaling is calculated as the ratio from the requested - * width and the calculated width. Digits represent bar/space - * dimensions. Lower-case letters represent those bars that should - * extend lower than the others: 'a' is equivalent to '1', 'b' is '2' and - * so on. - * - * The "textinfo" string is made up of fields "%lf:%lf:%c" separated by - * blank space. The first integer is the x position of the character, - * the second is the font size (before rescaling) and the char item is - * the charcter to be printed. - * - * Both the "partial" and "textinfo" strings may include "-" or "+" as - * special characters (in "textinfo" the char should be a standalone - * word). They state where the text should be printed: below the bars - * ("-", default) or above the bars. This is used, for example, to - * print the add-5 and add-2 codes to the right of UPC or EAN codes - * (the add-5 extension is mostly used in ISBN codes. - */ - - -int Barcode_ps_print(struct Barcode_Item *bc, FILE *f) -{ - int i, j, k, barlen, printable=1; - double f1, f2, fsav=0; - int mode = '-'; /* text below bars */ - double scalef=1, xpos, x0, y0, yr; - unsigned char *ptr; - unsigned char c; - - if (!bc->partial || !bc->textinfo) { - bc->error = EINVAL; - return -1; - } - - - /* - * Maybe this first part can be made common to several printing back-ends, - * we'll see how that works when other ouput engines are added - */ - - /* First, calculate barlen */ - barlen = bc->partial[0] - '0'; - for (ptr = bc->partial+1; *ptr; ptr++) - if (isdigit(*ptr)) - barlen += (*ptr - '0'); - else if (islower(*ptr)) - barlen += (*ptr - 'a'+1); - - /* The scale factor depends on bar length */ - if (!bc->scalef) { - if (!bc->width) bc->width = barlen; /* default */ - scalef = bc->scalef = (double)bc->width / (double)barlen; - } - - /* The width defaults to "just enough" */ - if (!bc->width) bc->width = barlen * scalef +1; - - /* But it can be too small, in this case enlarge and center the area */ - if (bc->width < barlen * scalef) { - int wid = barlen * scalef + 1; - bc->xoff -= (wid - bc->width)/2 ; - bc->width = wid; - /* Can't extend too far on the left */ - if (bc->xoff < 0) { - bc->width += -bc->xoff; - bc->xoff = 0; - } - } - - /* The height defaults to 80 points (rescaled) */ - if (!bc->height) bc->height = 80 * scalef; - -#if 0 - /* If too small (5 + text), enlarge and center */ - i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0); - if (bc->height < i * scalef ) { - int hei = i * scalef; - bc->yoff -= (hei-bc->height)/2; - bc->height = hei; - if (bc->yoff < 0) { - bc->height += -bc->yoff; - bc->yoff = 0; - } - } -#else - /* If too small (5 + text), reduce the scale factor and center */ - i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0); - if (bc->height < i * scalef ) { - double scaleg = ((double)bc->height) / i; - int wid = bc->width * scaleg / scalef; - bc->xoff += (bc->width - wid)/2; - bc->width = wid; - scalef = scaleg; - } -#endif - - /* - * Ok, then deal with actual ps (eps) output - */ - - if (!(bc->flags & BARCODE_OUT_NOHEADERS)) { /* spit a header first */ - if (bc->flags & BARCODE_OUT_EPS) - fprintf(f, "%%!PS-Adobe-2.0 EPSF-1.2\n"); - else - fprintf(f, "%%!PS-Adobe-2.0\n"); - fprintf(f, "%%%%Creator: libbarcode\n"); - if (bc->flags & BARCODE_OUT_EPS) { - fprintf(f, "%%%%BoundingBox: %i %i %i %i\n", - bc->xoff, - bc->yoff, - bc->xoff + bc->width + 2* bc->margin, - bc->yoff + bc->height + 2* bc->margin); - } - fprintf(f, "%%%%EndComments\n"); - if (bc->flags & BARCODE_OUT_PS) { - fprintf(f, "%%%%EndProlog\n\n"); - fprintf(f, "%%%%Page: 1 1\n\n"); - } - } - - /* Print some informative comments */ - for (i=0; bc->ascii[i]; i++) - if (bc->ascii[i] < ' ') - printable = 0; - - fprintf(f,"%% Printing barcode for \"%s\", scaled %5.2f", - printable ? bc->ascii : "<unprintable string>", scalef); - if (bc->encoding) - fprintf(f,", encoded using \"%s\"",bc->encoding); - fprintf(f, "\n"); - fprintf(f,"%% The space/bar succession is represented " - "by the following widths (space first):\n" - "%% "); - for (i=0; i<strlen(bc->partial); i++) { - unsigned char c = bc->partial[i]; - if (isdigit(c)) putc(c, f); - if (islower(c)) putc(c-'a'+'1', f); - if (isupper(c)) putc(c-'A'+'1', f); - } - /* open array for "forall" */ - fprintf(f, "\n[\n%% height xpos ypos width" - " height xpos ypos width\n"); - - xpos = bc->margin + (bc->partial[0]-'0') * scalef; - for (ptr = bc->partial+1, i=1; *ptr; ptr++, i++) { - /* special cases: '+' and '-' */ - if (*ptr == '+' || *ptr == '-') { - mode = *ptr; /* don't count it */ i++; continue; - } - /* j is the width of this bar/space */ - if (isdigit (*ptr)) j = *ptr-'0'; - else j = *ptr-'a'+1; - if (i%2) { /* bar */ - x0 = bc->xoff + xpos + (j*scalef)/2; - y0 = bc->yoff + bc->margin; - yr = bc->height; - if (!(bc->flags & BARCODE_NO_ASCII)) { /* leave space for text */ - if (mode == '-') { - /* text below bars: 10 points or five points */ - y0 += (isdigit(*ptr) ? 10 : 5) * scalef; - yr -= (isdigit(*ptr) ? 10 : 5) * scalef; - } else { /* '+' */ - /* text above bars: 10 or 0 from bottom, and 10 from top */ - y0 += (isdigit(*ptr) ? 10 : 0) * scalef; - yr -= (isdigit(*ptr) ? 20 : 10) * scalef; - } - } - /* Define an array and then use "forall" (Hans Schou) */ - fprintf(f," [%5.2f %6.2f %6.2f %5.2f]%s", - yr, x0, y0, (j * scalef) - SHRINK_AMOUNT, - i%4 == 1 ? " " : "\n"); - } - xpos += j * scalef; - } - fprintf(f,"\n]\t{ {} forall setlinewidth moveto 0 exch rlineto stroke} " - "bind forall\n"); - - /* Then, the text */ - - mode = '-'; /* reinstantiate default */ - if (!(bc->flags & BARCODE_NO_ASCII)) { - fprintf(f, "[\n%% char xpos ypos fontsize\n"); - k=0; /* k is the "previous font size" */ - for (ptr = bc->textinfo; ptr; ptr = strchr(ptr, ' ')) { - while (*ptr == ' ') ptr++; - if (!*ptr) break; - if (*ptr == '+' || *ptr == '-') { - mode = *ptr; continue; - } - if (sscanf(ptr, "%lf:%lf:%c", &f1, &f2, &c) != 3) { - fprintf(stderr, "barcode: impossible data: %s\n", ptr); - continue; - } - - fprintf(f, " [("); - /* Both the backslash and the two parens are special */ - if (c=='\\' || c==')' || c=='(') - fprintf(f, "\\%c) ", c); - else - fprintf(f, "%c) ", c); - fprintf(f, "%6.2f %6.2f %5.2f]\n", - bc->xoff + f1 * scalef + bc->margin, - mode == '-' - ? (double)bc->yoff + bc->margin - : (double)bc->yoff + bc->margin+bc->height - 8*scalef, - fsav == f2 ? 0.0 : f2 * scalef); - fsav = f2; - } - fprintf(f,"] { {} forall dup 0.00 ne {\n\t" - "/Helvetica findfont exch scalefont setfont\n" - " } {pop} ifelse\n" - " moveto show} bind forall\n"); - - - } - - fprintf(f,"%% End barcode for \"%s\"\n\n", - printable ? bc->ascii : "<unprintable string>"); - - if (!(bc->flags & BARCODE_OUT_NOHEADERS)) { - if (bc->flags & BARCODE_OUT_PS) { - fprintf(f,"showpage\n"); - fprintf(f, "%%%%Trailer\n\n"); - } - } - return 0; -} - - - - diff --git a/glabels1/barcode-0.98/sample.c b/glabels1/barcode-0.98/sample.c deleted file mode 100644 index 46e6205..0000000 --- a/glabels1/barcode-0.98/sample.c +++ /dev/null @@ -1,98 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -#include "barcode.h" - -int main(int argc, char **argv) -{ - int ps = 1, pcl = 0, oflags; - if (argc == 2 && !strcmp(argv[1],"-P")) { - ps = 0; pcl = 1; argc=1; - } - if (argc>2) { - fprintf(stderr, "%s: use \"%s\" for postscript or \"%s -P\" for PCL\n", - argv[0], argv[0], argv[0]); - exit(1); - } - if (pcl) { - oflags = BARCODE_OUT_PCL; - } else { - oflags = BARCODE_OUT_PS | BARCODE_OUT_NOHEADERS; - printf("%%!PS-Adobe-2.0\n"); - printf("%%%%Creator: barcode sample program\n"); - printf("%%%%EndComments\n"); - printf("%%%%EndProlog\n\n"); - printf("%%%%Page: 1 1\n\n"); - } - /* Print a few barcodes in several places in the page */ - - /* default size, bottom left */ - Barcode_Encode_and_Print("800894002700",stdout, 0, 0, 40, 40, - BARCODE_EAN | oflags); - - /* smaller */ - Barcode_Encode_and_Print("800894002700",stdout, 70, 50, 160, 55, - BARCODE_EAN | oflags); - - /* smallest */ - Barcode_Encode_and_Print("800894002700",stdout, 40, 30, 270, 70, - BARCODE_EAN | oflags); - - /* A bigger all-0 */ - Barcode_Encode_and_Print("000000000000",stdout, 170, 0, 40, 160, - BARCODE_EAN | oflags); - - /* Still bigger all-0 (but UPC, this time) */ - Barcode_Encode_and_Print("00000000000",stdout, 250, 0, 270, 160, - BARCODE_UPC | oflags); - - /* A few code-39 ones */ - Barcode_Encode_and_Print("silly code",stdout, 0, 0, 40, 320, - BARCODE_39 | oflags); - Barcode_Encode_and_Print("SAMPLE CODES",stdout, 100, 30, 400, 80, - BARCODE_39 | oflags); - - /* ISBN with add-5 */ - Barcode_Encode_and_Print("1-56592-292-1 90000",stdout, 0, 0, 40, 430, - BARCODE_ISBN | oflags); - - /* UPC with add-2 */ - Barcode_Encode_and_Print("07447084452 07",stdout, 0, 0, 300, 410, - BARCODE_UPC | oflags); - - /* code 128-C */ - Barcode_Encode_and_Print("12345678900123456789",stdout, 0, 0, 40, 530, - BARCODE_128C | oflags); - - /* and my data as code-128B autodetected */ - Barcode_Encode_and_Print("RBNLSN68T11E897W",stdout, 0, 60, 240, 510, - oflags); - /* same as code-39, forced */ - Barcode_Encode_and_Print("RBNLSN68T11E897W",stdout, 0, 60, 240, 590, - BARCODE_NO_CHECKSUM | BARCODE_39 | oflags); - - /* one interleaved 2 of 5 */ - Barcode_Encode_and_Print("0123456789",stdout, 0, 0, 40, 620, - BARCODE_I25 | oflags); - - /* upc-e and ean-8 (autotected based on code size) */ - Barcode_Encode_and_Print("012345",stdout, 0, 0, 50, 720, oflags); - Barcode_Encode_and_Print("0123456",stdout, 0, 0, 160, 720, oflags); - - - - if (pcl) { - printf("\f"); - } else { - printf("\nshowpage\n"); - printf("%%%%Trailer\n\n"); - } - return 0; -} - - - - - - - diff --git a/glabels1/config.h.in b/glabels1/config.h.in deleted file mode 100644 index 939f719..0000000 --- a/glabels1/config.h.in +++ /dev/null @@ -1,143 +0,0 @@ -/* 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 -#undef HACKTEXT - -/* 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 dcgettext function. */ -#undef HAVE_DCGETTEXT - -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* 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 strchr function. */ -#undef HAVE_STRCHR - -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP - -/* Define if you have the <X11/SM/SMlib.h> header file. */ -#undef HAVE_X11_SM_SMLIB_H - -/* 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 <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 <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the i library (-li). */ -#undef HAVE_LIBI - -/* Name of package */ -#undef PACKAGE - -/* Version number of package */ -#undef VERSION - -/* Define if your <locale.h> file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - diff --git a/glabels1/configure.in b/glabels1/configure.in deleted file mode 100644 index 6d1207f..0000000 --- a/glabels1/configure.in +++ /dev/null @@ -1,150 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(src/glabels.c) -AM_INIT_AUTOMAKE(glabels, 0.4.6) -AM_CONFIG_HEADER(config.h) - -dnl Pick up the Gnome macros. -AM_MAINTAINER_MODE -AM_ACLOCAL_INCLUDE(macros) - -GNOME_INIT -AC_ISC_POSIX -AC_PROG_CC -AM_PROG_CC_STDC -AC_HEADER_STDC - -GNOME_COMPILE_WARNINGS -GNOME_X_CHECKS - - - -dnl ******************************************************************* -dnl * Check for required package and version (borrowed from Evolution) -dnl ******************************************************************* -AC_DEFUN(GLABELS_CHECK_LIB, [ - dispname="$1" - dispvers="$2" - pkgname="$3" - - AC_MSG_CHECKING(for $dispname >= $dispvers) - cmpvers=`echo $dispvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'` - if gnome-config --libs $pkgname > /dev/null 2>&1; then - pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'` - else - pkgvers=not - fi - AC_MSG_RESULT($pkgvers found) - - pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'` - if test "$pkgvers" -lt $cmpvers; then - AC_MSG_ERROR([ -"" -"You need $dispname $dispvers or later to build gLabels" -"If you think you already have this installed, consult the README."]) - fi -]) - -dnl **************************************** -dnl * LIBXML -dnl **************************************** -GLABELS_CHECK_LIB(LIBXML, 1.8.11, xml) -GNOME_XML_CFLAGS=`gnome-config --cflags xml` -GNOME_XML_LIBS=`gnome-config --libs xml` -AC_SUBST(GNOME_XML_CFLAGS) -AC_SUBST(GNOME_XML_LIBS) - -dnl **************************************** -dnl * GNOME-PRINT -dnl **************************************** -GLABELS_CHECK_LIB(GNOME-PRINT, 0.25, print) -GNOME_PRINT_CFLAGS=`gnome-config --cflags print` -GNOME_PRINT_LIBS=`gnome-config --libs print` -AC_SUBST(GNOME_PRINT_CFLAGS) -AC_SUBST(GNOME_PRINT_LIBS) - -dnl **************************************** -dnl * GDK-PIXBUF -dnl **************************************** -GLABELS_CHECK_LIB(GDK-PIXBUF, 0.11.0, gdk_pixbuf) -GDK_PIXBUF_CFLAGS=`gnome-config --cflags gdk_pixbuf` -GDK_PIXBUF_LIBS=`gnome-config --libs gdk_pixbuf` -AC_SUBST(GDK_PIXBUF_CFLAGS) -AC_SUBST(GDK_PIXBUF_LIBS) - -dnl **************************************** -dnl * GNOME-CANVAS-PIXBUF -dnl **************************************** -GLABELS_CHECK_LIB(GNOME-CANVAS-PIXBUF, 0.11.0, gnomecanvaspixbuf) -GNOME_CANVAS_PIXBUF_CFLAGS=`gnome-config --cflags gnomecanvaspixbuf` -GNOME_CANVAS_PIXBUF_LIBS=`gnome-config --libs gnomecanvaspixbuf` -AC_SUBST(GNOME_CANVAS_PIXBUF_CFLAGS) -AC_SUBST(GNOME_CANVAS_PIXBUF_LIBS) - - -dnl **************************************** -dnl * Supported languages -dnl **************************************** -dnl Add the languages which your application supports here. -ALL_LINGUAS="fr de ja pt_BR es ru zh_TW.Big5 pl" -AM_GNOME_GETTEXT - -dnl **************************************** -dnl * Set PACKAGE_LOCALE_DIR in config.h. -dnl **************************************** -if test "x${prefix}" = "xNONE"; then - AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale") - AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/${DATADIRNAME}") -else - AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale") - AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/${DATADIRNAME}") -fi - - -dnl **************************************** -dnl * Configure barcode library -dnl **************************************** -AC_CONFIG_SUBDIRS(barcode-0.98) - - - -dnl **************************************** -dnl * Disable use of hacktext canvas item -dnl **************************************** -AC_ARG_ENABLE(hacktext, -[--disable-hacktext don't use hacktext canvas item for AA text], -enable_hacktext=$enableval, -enable_hacktext=yes) -if test "x$enable_hacktext" = "xyes"; then - AC_DEFINE(HACKTEXT) -fi - - - -dnl **************************************** -dnl * Makefiles -dnl **************************************** -AC_OUTPUT([ m4/Makefile -Makefile -macros/Makefile -src/Makefile -src/pixmaps/Makefile -intl/Makefile -po/Makefile.in -doc/Makefile -doc/C/Makefile -glabels.spec -]) - - - -dnl **************************************** -dnl Print configuration summary -dnl **************************************** -echo " - -Configuration: - - Source code location: ${srcdir} - Compiler: ${CC} -" diff --git a/glabels1/data/predefined-labels.template b/glabels1/data/predefined-labels.template deleted file mode 100644 index 52c5e09..0000000 --- a/glabels1/data/predefined-labels.template +++ /dev/null @@ -1,830 +0,0 @@ -<?xml version="1.0"?> -<GLabels-templates> - - - <!-- ******************************************************************** --> - <!-- Avery US-Letter products (and look-alikes) --> - <!-- ******************************************************************** --> - - <!-- =================================================================== --> - <!-- Avery 5160 family: Mailing Labels, 1'' x 2_5/8'', 30 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5160" size="US-Letter" description="Mailing Labels"> - <Label style="rectangle" width="189" height="72" margin="5" round="5"> - <Layout nx="3" ny="10" x0="11.5" y0="36" dx="200" dy="72"/> - </Label> - <Alias name="Avery 15160"/> - <Alias name="Avery 18160"/> - <Alias name="Avery 18660"/> - <Alias name="Avery 25160"/> - <Alias name="Avery 5260"/> - <Alias name="Avery 5510"/> - <Alias name="Avery 5520"/> - <Alias name="Avery 5560"/> - <Alias name="Avery 5810"/> - <Alias name="Avery 5920"/> - <Alias name="Avery 5960"/> - <Alias name="Avery 5970"/> - <Alias name="Avery 5971"/> - <Alias name="Avery 5972"/> - <Alias name="Avery 5979"/> - <Alias name="Avery 5980"/> - <Alias name="Avery 6233"/> - <Alias name="Avery 6245"/> - <Alias name="Avery 6460"/> - <Alias name="Avery 6498"/> - <Alias name="Avery 8160"/> - <Alias name="Avery 8250"/> - <Alias name="Avery 8460"/> - <Alias name="Avery 8560"/> - <Alias name="Avery 8620"/> - <Alias name="Avery 8660"/> - <Alias name="Avery 8810"/> - <Alias name="Avery 8920"/> - <Alias name="Avery 8930"/> - <Alias name="Maco ll5805"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5162 family: Mailing labels, 1_1/3'' x 4'', 14 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5162" size="US-Letter" description="Mailing labels"> - <Label style="rectangle" width="288" height="96" margin="5" round="5"> - <Layout nx="2" ny="7" x0="10.5" y0="60" dx="303" dy="96"/> - </Label> - <Alias name="Avery 15162"/> - <Alias name="Avery 18162"/> - <Alias name="Avery 18662"/> - <Alias name="Avery 5262"/> - <Alias name="Avery 5512"/> - <Alias name="Avery 5522"/> - <Alias name="Avery 5922"/> - <Alias name="Avery 5962"/> - <Alias name="Avery 8162"/> - <Alias name="Avery 8252"/> - <Alias name="Avery 8462"/> - <Alias name="Avery 8662"/> - <Alias name="Avery 8922"/> - <Alias name="Avery 8932"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5163 family: Shipping labels, 4'' x 2'', 10 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5163" size="US-Letter" description="Shipping labels"> - <Label style="rectangle" width="288" height="144" margin="10" round="10"> - <Layout nx="2" ny="5" x0="11.25" y0="36" dx="301.5" dy="144"/> - </Label> - <Alias name="Avery 15163"/> - <Alias name="Avery 18163"/> - <Alias name="Avery 18663"/> - <Alias name="Avery 5263"/> - <Alias name="Avery 5513"/> - <Alias name="Avery 5523"/> - <Alias name="Avery 5795"/> - <Alias name="Avery 5923"/> - <Alias name="Avery 5963"/> - <Alias name="Avery 5978"/> - <Alias name="Avery 8163"/> - <Alias name="Avery 8253"/> - <Alias name="Avery 8463"/> - <Alias name="Avery 8663"/> - <Alias name="Avery 8763"/> - <Alias name="Avery 8923"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5167 family: Address labels, 1_3/4'' x 1/2'', 80 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5167" size="US-Letter" description="Address labels"> - <Label style="rectangle" width="126" height="36" margin="5" round="5"> - <Layout nx="4" ny="20" x0="20.25" y0="36" dx="148.5" dy="36"/> - </Label> - <Alias name="Avery 15167"/> - <Alias name="Avery 15267"/> - <Alias name="Avery 18167"/> - <Alias name="Avery 18667"/> - <Alias name="Avery 5267"/> - <Alias name="Avery 5667"/> - <Alias name="Avery 5927"/> - <Alias name="Avery 6467"/> - <Alias name="Avery 6504"/> - <Alias name="Avery 8167"/> - <Alias name="Avery 8567"/> - <Alias name="Avery 8667"/> - <Alias name="Avery 8927"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5196 family: Diskette labels, 2_3/4'' x 2_3/4'', 9 per sheet* --> - <!-- =================================================================== --> - <Sheet name="Avery 5196" size="US-Letter" description="Diskette labels"> - <Label style="rectangle" width="198" height="198" margin="5" round="5"> - <Layout nx="3" ny="3" x0="9" y0="126" dx="198" dy="216"/> - </Label> - <Alias name="Avery 5096"/> - <Alias name="Avery 5896"/> - <Alias name="Avery 8196"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5261 family: Mailing Labels, 1'' x 4'', 20 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5261" size="US-Letter" description="Mailing Labels"> - <Label style="rectangle" width="288" height="72" margin="5" round="5"> - <Layout nx="2" ny="10" x0="11.5" y0="36" dx="303" dy="72"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5371 family: Business Cards, 2'' x 3_1/2'', 10 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5371" size="US-Letter" description="Business Cards"> - <Label style="rectangle" width="252" height="144" margin="5" round="0"> - <Layout nx="2" ny="5" x0="54" y0="36" dx="252" dy="144"/> - </Label> - <Alias name="Avery 25371"/> - <Alias name="Avery 26550"/> - <Alias name="Avery 26551"/> - <Alias name="Avery 27871"/> - <Alias name="Avery 27881"/> - <Alias name="Avery 27882"/> - <Alias name="Avery 28371"/> - <Alias name="Avery 28877"/> - <Alias name="Avery 5372"/> - <Alias name="Avery 5376"/> - <Alias name="Avery 5377"/> - <Alias name="Avery 5871"/> - <Alias name="Avery 5876"/> - <Alias name="Avery 5877"/> - <Alias name="Avery 5911"/> - <Alias name="Avery 8271"/> - <Alias name="Avery 8371"/> - <Alias name="Avery 8372"/> - <Alias name="Avery 8374"/> - <Alias name="Avery 8376"/> - <Alias name="Avery 8377"/> - <Alias name="Avery 8471"/> - <Alias name="Avery 8476"/> - <Alias name="Avery 8571"/> - <Alias name="Avery 8871"/> - <Alias name="Avery 8872"/> - <Alias name="Avery 8876"/> - <Alias name="Avery 8877"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 8373 family: Business Cards, 2'' x 3_1/2'', 8 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 8373" size="US-Letter" description="Business Cards"> - <Label style="rectangle" width="252" height="144" margin="0" round="0"> - <Layout nx="2" ny="4" x0="36" y0="54" dx="288" dy="180"/> - </Label> - <Alias name="Avery 3612"/> - <Alias name="Avery 5881"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5931 family: CD/DVD Labels (face only), 2 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 5931" size="US-Letter" - description="CD/DVD Labels (face only)"> - <Label style="cd" radius="166.5" hole="58.5" margin="5"> - <Layout nx="1" ny="2" x0="139.5" y0="49.5" dx="0" dy="360"/> - </Label> - <Alias name="Avery 5691"/> - <Alias name="Avery 5692"/> - <Alias name="Avery 5694"/> - <Alias name="Avery 8692"/> - <Alias name="Avery 8694"/> - <Alias name="Avery 8695"/> - <Alias name="Avery 8699"/> - <Alias name="Avery 8831"/> - <Alias name="Avery 8832"/> - <Alias name="Avery 8842"/> - <Alias name="Avery 8844"/> - <Alias name="Avery 8846"/> - <Alias name="Avery 8847"/> - <Alias name="Avery 8931"/> - <Alias name="Avery 8941"/> - <Alias name="Avery 8942"/> - <Alias name="Neato USCD2lbl.NTT"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5997face family: VCR Labels, 1_7/8'' x 3_1/16'', 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 5997 - VCR Face" size="US-Letter" - description="VCR Face Labels"> - <Label style="rectangle" width="220" height="133" margin="5" round="5"> - <Layout nx="2" ny="5" x0="80" y0="66.5" dx="236" dy="133"/> - </Label> - <Alias name="Avery 5199 - VCR Face"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 5997spine family: VCR Labels, 2/3'' x 5_3/4'',15 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 5997 - VCR Spine" size="US-Letter" - description="VCR Spine Labels"> - <Label style="rectangle" width="414" height="48" margin="5" round="5"> - <Layout nx="1" ny="15" x0="99" y0="36" dx="0" dy="48"/> - </Label> - <Alias name="Avery 5199 - VCR Spine"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 6490 family: Diskette Labels, 2_11/16'' x 2'', 15 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 6490" size="US-Letter" description="Diskette labels"> - <Label style="rectangle" width="193.5" height="144" margin="5" round="5"> - <Layout nx="3" ny="5" x0="9.215999926" y0="36" dx="200.2679959" dy="144"/> - </Label> - <Alias name="Avery 6501"/> - <Alias name="Avery 6861"/> - <Alias name="Avery 8096"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 8165 family: Full-page label, 8_1/2'' x 11'', 1 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Avery 8165" size="US-Letter" description="Full-page"> - <Label style="rectangle" width="612" height="792" margin="5" - round="0"> - <Layout nx="1" ny="1" x0="0" y0="0" dx="0" dy="0"/> - </Label> - <Alias name="Avery 3114"/> - <Alias name="Avery 3121"/> - <Alias name="Avery 3123"/> - <Alias name="Avery 3131"/> - <Alias name="Avery 3132"/> - <Alias name="Avery 3133"/> - <Alias name="Avery 3141"/> - <Alias name="Avery 3142"/> - <Alias name="Avery 3145"/> - <Alias name="Avery 3245"/> - <Alias name="Avery 3246"/> - <Alias name="Avery 3247"/> - <Alias name="Avery 3255"/> - <Alias name="Avery 3267"/> - <Alias name="Avery 3270"/> - <Alias name="Avery 3271"/> - <Alias name="Avery 3272"/> - <Alias name="Avery 3275"/> - <Alias name="Avery 3276"/> - <Alias name="Avery 3277"/> - <Alias name="Avery 3614"/> - <Alias name="Avery 3625"/> - <Alias name="Avery 3641"/> - <Alias name="Avery 3651"/> - <Alias name="Avery 5165"/> - <Alias name="Avery 5177"/> - <Alias name="Avery 5182"/> - <Alias name="Avery 5265"/> - <Alias name="Avery 5277"/> - <Alias name="Avery 5282"/> - <Alias name="Avery 53205"/> - <Alias name="Avery 53211"/> - <Alias name="Avery 53230"/> - <Alias name="Avery 53240"/> - <Alias name="Avery 5884"/> - <Alias name="Avery 5975"/> - <Alias name="Avery 6465"/> - <Alias name="Avery 6503"/> - <Alias name="Avery 75287"/> - <Alias name="Avery 75299"/> - <Alias name="Avery 8255"/> - <Alias name="Avery 8314"/> - <Alias name="Avery 8324"/> - <Alias name="Avery 8384"/> - <Alias name="Avery 8465"/> - <Alias name="Avery 8665"/> - <Alias name="IP Invent It! #00064-3"/> - <Alias name="Generic US-Letter Full-page"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 3274.1 family: Square stickers, 2_1/2'' x 2_1/2, 9 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 3274.1" size="US-Letter" description="Square Stickers"> - <Label margin="5" style="rectangle" width="180" height="180" round="0"> - <Layout nx="3" ny="3" x0="22.5" y0="90" dx="193.5" dy="216"/> - </Label> - <Alias name="Avery 3111"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 3274.2 family: Small round stickers, 1_1/2'', 20 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 3274.2" size="US-Letter" description="Small Round Stickers"> - <Label margin="5" style="round" radius="54"> - <Layout nx="4" ny="5" x0="36" y0="54" dx="144" dy="144"/> - </Label> - <Alias name="Avery 3112"/> - <Alias name="Avery 8293"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 3274.3 family: Big round stickers, 2_1/2'', 9 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 3274.3" size="US-Letter" description="Big Round Stickers"> - <Label margin="5" style="round" radius="90"> - <Layout nx="3" ny="3" x0="22.5" y0="90" dx="193.5" dy="216"/> - </Label> - </Sheet> - - - - <!-- ******************************************************************** --> - <!-- Avery A4 products (and look-alikes) --> - <!-- ******************************************************************** --> - - <!-- =================================================================== --> - <!-- Avery 7160 family: Mailing labels, 63.5 x 38.1 mm, 21 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 7160" size="A4" description="Mailing labels"> - <Label style="rectangle" width="181.4" height="108.0" margin="5" round="5"> - <Layout nx="3" ny="7" x0="21.2" y0="43.9" dx="187.2" dy="108.0"/> - </Label> - <Alias name="Avery L7160"/> - <Alias name="Avery J8160"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 7163 family: Mailing labels, 99.1 x 38.1 mm, 14 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 7163" size="A4" description="Mailing labels"> - <Label style="rectangle" width="280.9" height="108" margin="5" round="5"> - <Layout nx="2" ny="7" x0="9.5" y0="43" dx="292" dy="108"/> - </Label> - <Alias name="Avery L7163"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 8414 family: Business Cards, 50.8 x 87.0 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Avery 8414" size="A4" description="Business Cards"> - <Label style="rectangle" width="246.6" height="144" margin="5" round="0"> - <Layout nx="2" ny="5" x0="42" y0="64" dx="264" dy="144"/> - </Label> - <Alias name="Avery J8414"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Avery 8666 family: Diskette labels (face only), 70 x 52 mm, 10 per --> - <!-- =================================================================== --> - <Sheet name="Avery 8666" size="A4" - description="3.5'' Diskette labels (face only)"> - <Label style="rectangle" width="198.4" height="147.4" margin="5" round="5"> - <Layout nx="2" ny="5" x0="66" y0="53" dx="264" dy="147"/> - </Label> - <Alias name="Avery J8666"/> - </Sheet> - - <!-- =============================================================== --> - <!-- Avery-Zweckform J8676A: CD/DVD Labels 2 per sheet --> - <!-- =============================================================== --> - <Sheet name="Avery 8676" size="A4" description="CD/DVD Labels"> - <Label style="cd" radius="166.5" hole="17" margin="5"> - <Layout nx="1" ny="2" x0="130" y0="59.5" dx="0" dy="388"/> - </Label> - <Alias name="Avery J8676"/> - </Sheet> - - - - <!-- ******************************************************************** --> - <!-- Zweckform A4 products --> - <!-- ******************************************************************** --> - - <!-- =================================================================== --> - <!-- Zweckform 32010: Business Cards, 54.0 x 85.0 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 32010" size="A4" description="Business Cards"> - <Label style="rectangle" width="240.94" height="153.07" margin="5" round="0"> - <Layout nx="2" ny="5" x0="40" y0="40" dx="269" dy="153"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 4761: Lever Arch File Labels, 192 x 61 mm, 4 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 4761" size="A4" description="Lever Arch File Labels"> - <Label style="rectangle" width="544.25" height="172.9" margin="5" round="5"> - <Layout nx="1" ny="4" x0="25" y0="75" dx="544.25" dy="172.9"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 3651: Rectangular Labels, 52 x 29.5 mm, 40 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 3651" size="A4" description="Rectangular Labels"> - <Label style="rectangle" width="147.4016" height="83.6220" -margin="2" round="0"> - <Layout nx="4" ny="10" x0="2.834" y0="2.834" dx="147.4016" dy="83.6220"/> - </Label> - </Sheet> - - <!-- ====================================================================--> - <!-- Zweckform 3654: CD Labels 2 per Sheet --> - <!-- ====================================================================--> - <Sheet name="Zweckform 3654" size="A4" description="CD/DVD Labels"> - <Label style="cd" radius="165.78" hole="58.09" margin="5"> - <Layout nx="1" ny="2" x0="131.78" y0="63.56" dx="0" dy="387.97"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 3659: Rectangular Labels, 97 x 42.125 mm, 12 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 3659" size="A4" description="Mailing Labels -- 12"> - <Label style="rectangle" width="274" height="120.5" margin="5" round="0"> - <Layout nx="2" ny="6" x0="22.68" y0="60" dx="274" dy="120.5"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 3669: Rectangular Labels, 70 x 50.8mm, 15 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 3669" size="A4" description="QSL-Karten Etiketten 70mm x 50,8mm"> - <Label style="rectangle" width="198.425" height="144" margin="0" round="0"> - <Layout nx="3" ny="5" x0="0" y0="61" dx="198.425" dy="144"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 4746: Video Labels, 147,32 x 20 mm, 13 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 4746" size="A4" description="Video Labels (back)"> - <Label style="rectangle" width="416.6" height="56.6929" margin="5" round="5"> - <Layout nx="1" ny="13" x0="88.8377" y0="52.2425" dx="416.6" dy="56.6929"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 4780: Allround Labels, 48,5 x 25,4 mm, 40 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 4780" size="A4" description="Allround Labels"> - <Label style="rectangle" width="137.48" height="72" margin="3" round="0"> - <Layout nx="4" ny="10" x0="23" y0="68" dx="137.48" dy="72"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 3490: Rectangular Labels, 70 x 36 mm, 24 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 3490" size="A4" description="Rectangular Copier Labels"> - <Label style="rectangle" width="198.425" height="102.047" margin="5" round="0"> - <Layout nx="3" ny="8" x0="" y0="12.557" dx="198.425" dy="102.047"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Zweckform 4781: Rectangular Labels, 97 x 42.3 mm, 12 per sheet --> - <!-- =================================================================== --> - <Sheet name="Zweckform 4781" size="A4" description="Rectangular Copier Labels"> - <Label style="rectangle" width="274.960" height="119.905" margin="5" round="0"> - <Layout nx="2" ny="6" x0="22.677" y0="61.030" dx="274.960" dy="119.905"/> - </Label> - </Sheet> - - - - <!-- ******************************************************************** --> - <!-- Misc. US-Letter products. --> - <!-- ******************************************************************** --> - - <!-- =================================================================== --> - <!-- Southworth BC: Business Cards, 2'' x 3_1/2'', 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Southworth BC" size="US-Letter" description="Business Cards"> - <Label style="rectangle" width="252" height="144" margin="5" round="0"> - <Layout nx="2" ny="5" x0="36" y0="36" dx="288" dy="144"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Memorex CD Labels 2 Pass * --> - <!-- =================================================================== --> - <Sheet name="Memorex CD Labels" size="US-Letter" - description="CD/DVD Labels (2 Pass)"> - <Label style="cd" radius="166.5" hole="58.5" margin="5"> - <Layout nx="1" ny="1" x0="40.5" y0="414" dx="0" dy="0"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Neato CLP-192328/26: HandiCD-R 50MB, 3" x 2_1/8'', 9 per sheet --> - <!-- =================================================================== --> - <Sheet name="Neato HandiCD-R" size="US-Letter" - description="Business Card CD"> - <Label margin="5" style="rectangle" height="216" width="171" round="75"> - <Layout nx="3" ny="3" x0="36.5" y0="54" dx="184.5" dy="234"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- CD STOMPER PRO CD Label Refills, (Face Only), 2 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Stomper PRO CD" size="US-Letter" - description="PRO CD Labels 2-up (face only, 2 Pass)"> - <Label style="cd" radius="166.5" hole="58.5" margin="5"> - <Layout nx="1" ny="1" x0="34" y0="416" dx="0" dy="0"/> - </Label> - </Sheet> - - <Sheet name="Stomper PRO Zip" size="US-Letter" - description="PRO CD Labels 2-up (Face only, 2 Pass)"> - <Label style="rectangle" width="168" height="142" margin="5" round="0"> - <Layout nx="1" ny="2" x0="407" y0="440" dx="0" dy="142"/> - </Label> - </Sheet> - - <Sheet name="Stomper PRO Spine" size="US-Letter" - description="PRO CD Labels 2-up (CD spine only)"> - <Label style="rectangle" width="288" height="20" margin="2" round="0"> - <Layout nx="2" ny="1" x0="18" y0="387" dx="288" dy="0"/> - </Label> - </Sheet> - - <!-- ===================================================================--> - <!-- Meritline Mini CD/DVD Labels (face only), 5 per sheet --> - <!-- ===================================================================--> - <Sheet name="Meritline Mini-CD 4" size="US-Letter" - description="Mini-CD Labels, outer 4"> - <Label style="cd" radius="110.5" hole="57.5" margin="0"> - <Layout nx="2" ny="2" x0="48.4" y0="41.9" dx="299.5" dy="481.5"/> - </Label> - </Sheet> - <!-- y0=47 is probably about right, but changing it isn't helping! --> - - <Sheet name="Meritline Mini-CD 1" size="US-Letter" - description="Mini-CD Labels, center 1"> - <Label style="cd" radius="110.5" hole="57.5" margin="0"> - <Layout nx="1" ny="1" x0="197.3" y0="281.5" dx="0" dy="0"/> - </Label> - </Sheet> - - <!-- ===================================================================--> - <!-- Neato Slimline CD Jewel Case Insert, 2 per sheet. --> - <!-- Left margin area is CD spine; ignore other margins. --> - <!-- To write text on spine, use "upside down" template, "rotated", --> - <!-- spine is bottom margin, print label sheet BOTTOM FIRST. --> - <!-- ===================================================================--> - <Sheet name="Neato Slimline CD Case" size="US-Letter" - description="Slimline CD Case (rightside up)"> - <Label style="rectangle" width="394.5" height="342.5" margin="7.5" round="0"> - <Layout nx="1" ny="2" x0="130" y0="44.6" dx="0" dy="363"/> - </Label> - </Sheet> - <Sheet name="Neato Slimline CD Case, spine" size="US-Letter" - description="Slimline CD Case (upside down)"> - <Label style="rectangle" width="394.5" height="342.5" margin="7.5" round="0"> - <Layout nx="1" ny="2" x0="96.5" y0="44.6" dx="0" dy="363"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Great Gizmos : CD/DVD Labels (face only), 2 per sheet * --> - <!-- =================================================================== --> - <Sheet name="Great Gizmos" size="US-Letter" - description="CD/DVD Labels (face only)"> - <Label style="cd" radius="166.5" hole="58.5" margin="5"> - <Layout nx="1" ny="2" x0="139.5" y0="42.52" dx="0" dy="374.17"/> - </Label> - </Sheet> - - - <!-- ******************************************************************** --> - <!-- Misc. A4 products. --> - <!-- ******************************************************************** --> - - <!-- =================================================================== --> - <!-- Sigel DP 830/DP 930: Business Cards, 55.0 x 85.0 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Sigel DP 830/DP 930" size="A4" description="Business Cards"> - <Label style="rectangle" width="240.9" height="155.9" margin="5" round="0"> - <Layout nx="2" ny="5" x0="40" y0="31" dx="269" dy="156"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Ascom A4/24/MKII: Rectangular Labels, 24 per sheet --> - <!-- =================================================================== --> - <Sheet name="Ascom A4/24/MKII" size="A4" description="Rectangular Labels"> - <Label style="rectangle" width="181" height="96" margin="5" round="10"> - <Layout nx="3" ny="8" x0="19" y0="36" dx="187" dy="96"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Agipa 119488: Business Cards, 50 x 90 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Agipa 119488" size="A4" - description="Agipa 119488: Business Cards"> - <Label style="rectangle" width="255" height="142" margin="5" round="0"> - <Layout nx="2" ny="5" x0="43" y0="67" dx="255" dy="142"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Ednet BC: Business Cards, 51 x 89 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Ednet" size="A4" description="Business Cards"> - <Label style="rectangle" width="253" height="145" margin="5" round="0"> - <Layout nx="2" ny="5" x0="40" y0="59" dx="253" dy="145"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma 4620: Mailing Labels - 2 columns, 107 x 37 mm, 16 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4620" size="A4" description="Mailing Labels-2 columns"> - <Label style="rectangle" width="298" height="105" margin="5" round="0"> - <Layout nx="2" ny="8" x0="0" y0="0" dx="298" dy="105"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma 4464: Mailing Labels - 3 columns, 70 x 37.125 mm, 24 per sheet--> - <!-- =================================================================== --> - <Sheet name="Herma 4464" size="A4" description="Mailing Labels-3 columns"> - <Label style="rectangle" width="199" height="105" margin="5" round="0"> - <Layout nx="3" ny="8" x0="0" y0="0" dx="199" dy="105"/> - </Label> - </Sheet> - - <!-- ===================================================================--> - <!-- Neato brand CD/DVD Labels (face only), 2 per sheet --> - <!-- ===================================================================--> - <Sheet name="Neato A4 CD" size="A4" description="CD/DVD Labels (face only)"> - <Label style="cd" radius="166.5" hole="58.5" margin="5"> - <Layout nx="1" ny="2" x0="125" y0="80" dx="0" dy="360"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- EPSON Photo Stickers, 17 x 24 mm, 16 per sheet (Actually A6) --> - <!-- =================================================================== --> - <Sheet name="Epson S041144" size="A4" description="EPSON Photo Stickers 16"> - <Label style="rectangle" width="48" height="68" margin="4" round="7"> - <Layout nx="4" ny="4" x0="33" y0="59" dx="59.5" dy="79.5"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- DATA BECKER: Business Cards, 50 x 90 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="DataBecker" size="A4" description="Business Cards"> - <Label style="rectangle" width="255" height="142" margin="5" round="0"> - <Layout nx="2" ny="5" x0="36" y0="62" dx="255" dy="142"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Hema Etiketten: 65 x 38 mm, 21 per sheet --> - <!-- =================================================================== --> - <Sheet name="Hema Etiketten" size="A4" description="Rectangular Labels"> - <Label style="rectangle" width="178" height="108" margin="5" round="5"> - <Layout nx="3" ny="7" x0="20" y0="42" dx="187" dy="107"/> - </Label> - </Sheet> - - <!-- ====================================================== --> - <!-- Alpi 02793: Business Cards, 50,8 x 90 mm, 10 per sheet --> - <!-- ====================================================== --> - <Sheet name="Alpi 02793" size="A4" description="Alpi 02793: Business Cards"> - <Label style="rectangle" width="255.118" height="144" margin="5" round="0"> - <Layout nx="2" ny="5" x0="42.5197" y0="62.3622" dx="255.118" dy="144"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- APLI 1999: Mailing Labels, 9,9cm x 6,8cm, 8 per sheet --> - <!-- =================================================================== --> - <Sheet name="APLI 1999" size="A4" description="Mailing Labels"> - <Label style="rectangle" width="281" height="193" round="5" margin="5"> - <Layout nx="2" ny="4" x0="13" y0="45" dx="289" dy="194"/> - </Label> - </Sheet> - - <!-- =================================================================== --> - <!-- Data Becker Etiketten Paket: Ordnerrücken, 192 x 61,5 mm, 4 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4284" size="A4" description="Arch File Labels (large)"> - <Label style="rectangle" width="544.252" height="174.331" margin="5" round="5"> - <Layout nx="1" ny="4" x0="25.5118" y0="38.2677" dx="544.252" dy="197.008"/> - </Label> - <Alias name="Herma 5095"/> - <Alias name="Herma 5096"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Data Becker Etiketten Paket: Ordnerrücken, 192 x 39 mm, 6 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4283" size="A4" description="Arch File Labels (small)"> - <Label style="rectangle" width="544.252" height="110.551" margin="5" round="5"> - <Layout nx="1" ny="6" x0="25.5118" y0="32.5984" dx="544.252" dy="133.228"/> - </Label> - <Alias name="Herma 5090"/> - <Alias name="Herma 5091"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Data Becker Etiketten Paket: Video Etiketten, 78,7 x 46,5 mm, 12 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4828" size="A4" description="Video Labels (face only)"> - <Label style="rectangle" width="223.086" height="131.811" margin="5" round="5"> - <Layout nx="2" ny="6" x0="38.5512" y0="24.9449" dx="295.086" dy="131.811"/> - </Label> - <Alias name="Herma 5070"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Data Becker Etiketten Paket: Disketten Etiketten, 70 x 50,8 mm, 10 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 8803" size="A4" description="Diskette Labels (face only)"> - <Label style="rectangle" width="198.425" height="144" margin="5" round="5"> - <Layout nx="2" ny="5" x0="60.9448" y0="60.9448" dx="270.425" dy="144"/> - </Label> - <Alias name="Herma 8839"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Otto Versand: Allzweck Etiketten, 38 x 21,2 mm, 65 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4606" size="A4" description="Allround Labels --65"> - <Label style="rectangle" width="107.716" height="60.0945" margin="5" round="0"> - <Layout nx="5" ny="13" x0="26.9291" y0="29.7638" dx="107.716" dy="60.0945"/> - </Label> - <Alias name="Herma 4270"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma Musteretiketten: Allzweck Etiketten, 48,3 x 16,9 mm, 64 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4607" size="A4" description="Allround Labels --64"> - <Label style="rectangle" width="136.913" height="47.9055" margin="5" round="0"> - <Layout nx="4" ny="16" x0="24.0945" y0="35.7165" dx="136.913" dy="47.9055"/> - </Label> - <Alias name="Herma 4271"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma Musteretiketten: Allzweck Etiketten, 48,3 x 25,4 mm, 44 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4608" size="A4" description="Allround Labels --44"> - <Label style="rectangle" width="136.913" height="72" margin="5" round="0"> - <Layout nx="4" ny="11" x0="24.0945" y0="24.0945" dx="136.913" dy="72"/> - </Label> - <Alias name="Herma 4272"/> - <Alias name="Herma 5051"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma Musteretiketten: Allzweck Etiketten, 66 x 33,8 mm, 24 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4614" size="A4" description="Allround Labels --24"> - <Label style="rectangle" width="187.086" height="95.811" margin="5" round="0"> - <Layout nx="3" ny="8" x0="16.1575" y0="36.8504" dx="187.086" dy="95.811"/> - </Label> - <Alias name="Herma 4670"/> - <Alias name="Herma 5053"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma Musteretiketten: Adress Etiketten, 105 x 42,3 mm, 24 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4625" size="A4" description="Mailing Labels --14"> - <Label style="rectangle" width="297.638" height="119.905" margin="5" round="0"> - <Layout nx="2" ny="7" x0="0" y0="0" dx="297.638" dy="119.905"/> - </Label> - <Alias name="Herma 4674"/> - <Alias name="Herma 5057"/> - </Sheet> - - <!-- =================================================================== --> - <!-- Herma Musteretiketten: Ordnerrücken, 192 x 38 mm, 7 per sheet --> - <!-- =================================================================== --> - <Sheet name="Herma 4293" size="A4" description="Arch File Labels"> - <Label style="rectangle" width="544.252" height="107.716" margin="5" round="5"> - <Layout nx="1" ny="7" x0="25.5118" y0="42.5197" dx="544.252" dy="107.716"/> - </Label> - <Alias name="Herma 5092"/> - </Sheet> - - <!-- ===================================================================--> - <!-- Data Becker CD/DVD Labels (face only), 2 per sheet --> - <!-- ===================================================================--> - <Sheet name="DataBecker 0335" size="A4" description="CD/DVD Labels Standard Format (face only)"> - <Label style="cd" radius="164.409" hole="58.1102" margin="5"> - <Layout nx="1" ny="2" x0="133.228" y0="46.7716" dx="0" dy="419.527"/> - </Label> - <Alias name="DataBecker 0368"/> - </Sheet> - -</GLabels-templates> - - - - diff --git a/glabels1/doc/C/Makefile.am b/glabels1/doc/C/Makefile.am deleted file mode 100644 index 51f464a..0000000 --- a/glabels1/doc/C/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -glabels_helpdir = $(datadir)/gnome/help/glabels/C - -glabels_help_DATA = \ - index.html \ - topic.dat - -SGML_FILES = \ - glabels.sgml - -EXTRA_DIST = \ - topic.dat \ - $(SGML_FILES) - -all: index.html - -index.html: glabels/index.html - -cp glabels/index.html . - -glabels/index.html: $(SGML_FILES) - -db2html glabels.sgml - -cp -rp images glabels/images - -dist-hook: index.html - -mkdir $(distdir)/glabels - -mkdir $(distdir)/glabels/stylesheet-images - -mkdir $(distdir)/glabels/images - -cp glabels/*.html $(distdir)/glabels - -cp glabels/*.css $(distdir)/glabels - -cp glabels/stylesheet-images/*.gif $(distdir)/glabels/stylesheet-images - -cp glabels/images/*.jpg $(distdir)/glabels/images - -mkdir $(distdir)/images - -cp images/*.jpg $(distdir)/images - -install-data-local: index.html - -$(mkinstalldirs) $(DESTDIR)$(glabels_helpdir)/images - -$(mkinstalldirs) $(DESTDIR)$(glabels_helpdir)/stylesheet-images - -for file in $(srcdir)/glabels/*.html $(srcdir)/glabels/*.css; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/$$basefile; \ - done - -for file in $(srcdir)/glabels/images/*.jpg; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/images/$$basefile; \ - done - -for file in $(srcdir)/glabels/stylesheet-images/*.gif; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/stylesheet-images/$$basefile; \ - done - -glabels.ps: glabels.sgml - -db2ps $< - -glabels.rtf: glabels.sgml - -db2rtf $< - diff --git a/glabels1/doc/C/Makefile.in b/glabels1/doc/C/Makefile.in deleted file mode 100644 index 0a63d13..0000000 --- a/glabels1/doc/C/Makefile.in +++ /dev/null @@ -1,304 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 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 = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ -GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ -GENCAT = @GENCAT@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ -GNOMEUI_LIBS = @GNOMEUI_LIBS@ -GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ -GNOME_CANVAS_PIXBUF_CFLAGS = @GNOME_CANVAS_PIXBUF_CFLAGS@ -GNOME_CANVAS_PIXBUF_LIBS = @GNOME_CANVAS_PIXBUF_LIBS@ -GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ -GNOME_CONFIG = @GNOME_CONFIG@ -GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ -GNOME_LIBDIR = @GNOME_LIBDIR@ -GNOME_LIBS = @GNOME_LIBS@ -GNOME_PRINT_CFLAGS = @GNOME_PRINT_CFLAGS@ -GNOME_PRINT_LIBS = @GNOME_PRINT_LIBS@ -GNOME_XML_CFLAGS = @GNOME_XML_CFLAGS@ -GNOME_XML_LIBS = @GNOME_XML_LIBS@ -GNORBA_CFLAGS = @GNORBA_CFLAGS@ -GNORBA_LIBS = @GNORBA_LIBS@ -GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_CONFIG = @GTK_CONFIG@ -GTK_LIBS = @GTK_LIBS@ -GT_NO = @GT_NO@ -GT_YES = @GT_YES@ -INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -ORBIT_CFLAGS = @ORBIT_CFLAGS@ -ORBIT_CONFIG = @ORBIT_CONFIG@ -ORBIT_IDL = @ORBIT_IDL@ -ORBIT_LIBS = @ORBIT_LIBS@ -PACKAGE = @PACKAGE@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PTHREAD_LIB = @PTHREAD_LIB@ -RANLIB = @RANLIB@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XPM_LIBS = @XPM_LIBS@ -ZVT_LIBS = @ZVT_LIBS@ -cflags_set = @cflags_set@ -cxxflags_set = @cxxflags_set@ -l = @l@ - -glabels_helpdir = $(datadir)/gnome/help/glabels/C - -glabels_help_DATA = \ - index.html \ - topic.dat - - -SGML_FILES = \ - glabels.sgml - - -EXTRA_DIST = \ - topic.dat \ - $(SGML_FILES) - -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../../config.h -CONFIG_CLEAN_FILES = -DATA = $(glabels_help_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/C/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -install-glabels_helpDATA: $(glabels_help_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(glabels_helpdir) - @list='$(glabels_help_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(glabels_helpdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(glabels_helpdir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glabels_helpdir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(glabels_helpdir)/$$p; \ - fi; fi; \ - done - -uninstall-glabels_helpDATA: - @$(NORMAL_UNINSTALL) - list='$(glabels_help_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(glabels_helpdir)/$$p; \ - done -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = doc/C - -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 doc/C/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 - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook -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-glabels_helpDATA install-data-local -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-glabels_helpDATA -uninstall: uninstall-am -all-am: Makefile $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(glabels_helpdir) - - -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: uninstall-glabels_helpDATA install-glabels_helpDATA tags distdir \ -info-am info dvi-am dvi check check-am installcheck-am installcheck \ -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 mostlyclean-generic distclean-generic \ -clean-generic maintainer-clean-generic clean mostlyclean distclean \ -maintainer-clean - - -all: index.html - -index.html: glabels/index.html - -cp glabels/index.html . - -glabels/index.html: $(SGML_FILES) - -db2html glabels.sgml - -cp -rp images glabels/images - -dist-hook: index.html - -mkdir $(distdir)/glabels - -mkdir $(distdir)/glabels/stylesheet-images - -mkdir $(distdir)/glabels/images - -cp glabels/*.html $(distdir)/glabels - -cp glabels/*.css $(distdir)/glabels - -cp glabels/stylesheet-images/*.gif $(distdir)/glabels/stylesheet-images - -cp glabels/images/*.jpg $(distdir)/glabels/images - -mkdir $(distdir)/images - -cp images/*.jpg $(distdir)/images - -install-data-local: index.html - -$(mkinstalldirs) $(DESTDIR)$(glabels_helpdir)/images - -$(mkinstalldirs) $(DESTDIR)$(glabels_helpdir)/stylesheet-images - -for file in $(srcdir)/glabels/*.html $(srcdir)/glabels/*.css; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/$$basefile; \ - done - -for file in $(srcdir)/glabels/images/*.jpg; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/images/$$basefile; \ - done - -for file in $(srcdir)/glabels/stylesheet-images/*.gif; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(glabels_helpdir)/stylesheet-images/$$basefile; \ - done - -glabels.ps: glabels.sgml - -db2ps $< - -glabels.rtf: glabels.sgml - -db2rtf $< - -# 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: diff --git a/glabels1/doc/C/glabels.sgml b/glabels1/doc/C/glabels.sgml deleted file mode 100644 index 2104f27..0000000 --- a/glabels1/doc/C/glabels.sgml +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[ -<!ENTITY version "0.4.x">]> - - -<!-- =============Document Header ============================= --> - -<article id="index"> <!-- please do not change the id --> - -<artheader> - <title>gLabels Manual</title> - <copyright><year>2001</year><holder>Jim Evins</holder></copyright> - - <!-- translators: uncomment this: - <copyright> - <year>2000</year><holder>ME-THE-TRANSLATOR (Latin translation)</holder> - </copyright> - --> - - <legalnotice> - <para> - Permission is granted to copy, distribute and/or modify this - document under the terms of the <citetitle>GNU Free Documentation - License</citetitle>, 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. You may obtain a copy - of the <citetitle>GNU Free Documentation License</citetitle> from - the Free Software Foundation by visiting <ulink type="http" - url="http://www.fsf.org">their Web site</ulink> or by writing to: - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - </para> - <para> - Many of the names used by companies to distinguish their products and - services are claimed as trademarks. Where those names appear in any - GNOME documentation, and those trademarks are made aware to the members - of the GNOME Documentation Project, the names have been printed in caps - or initial caps. - </para> - </legalnotice> - - - <!-- Tracks the GBonds version --> - <releaseinfo>This is version &version; of the gLabels manual.</releaseinfo> - -</artheader> - -<!-- ============= Document Body ============================= --> - - - - -<!-- ********************************************************************* --> -<!-- Introduction --> -<!-- ********************************************************************* --> -<sect1 id="intro"> <title>Introduction</title> - -See the README file. - -</sect1> - - - - -</article> - - - - - - - - - diff --git a/glabels1/doc/C/glabels/index.html b/glabels1/doc/C/glabels/index.html deleted file mode 100644 index 8f975cc..0000000 --- a/glabels1/doc/C/glabels/index.html +++ /dev/null @@ -1,64 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<HTML -><HEAD -><TITLE ->gLabels Manual</TITLE -><META -NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.64 -"></HEAD -><BODY -CLASS="ARTICLE" -BGCOLOR="#FFFFFF" -TEXT="#000000" -LINK="#0000FF" -VLINK="#840084" -ALINK="#0000FF" -><DIV -CLASS="ARTICLE" -><DIV -CLASS="TITLEPAGE" -><H1 -CLASS="TITLE" -><A -NAME="AEN2" ->gLabels Manual</A -></H1 -><P -CLASS="COPYRIGHT" -><A -HREF="ln7.html" ->Copyright</A -> © 2001 by Jim Evins</P -><HR -WIDTH="75%" -ALIGN="CENTER" -COLOR="#000000" -SIZE="1"></DIV -><DIV -CLASS="TOC" -><DL -><DT -><B ->Table of Contents</B -></DT -><DT -><A -HREF="index.html#INTRO" ->Introduction</A -></DT -></DL -></DIV -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="INTRO" ->Introduction</A -></H1 ->See the README file. </DIV -></DIV -></BODY -></HTML ->
\ No newline at end of file diff --git a/glabels1/doc/C/glabels/ln7.html b/glabels1/doc/C/glabels/ln7.html deleted file mode 100644 index a0dd927..0000000 --- a/glabels1/doc/C/glabels/ln7.html +++ /dev/null @@ -1,128 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<HTML -><HEAD -><META -NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.64 -"><LINK -REL="HOME" -TITLE="gLabels Manual" -HREF="index.html"><LINK -REL="UP" -TITLE="gLabels Manual" -HREF="index.html#AEN2"></HEAD -><BODY -BGCOLOR="#FFFFFF" -TEXT="#000000" -LINK="#0000FF" -VLINK="#840084" -ALINK="#0000FF" -><DIV -CLASS="NAVHEADER" -><TABLE -WIDTH="100%" -BORDER="0" -CELLPADDING="0" -CELLSPACING="0" -><TR -><TH -COLSPAN="3" -ALIGN="center" ->gLabels Manual</TH -></TR -></TABLE -><HR -ALIGN="LEFT" -WIDTH="100%"></DIV -><DIV -CLASS="LEGALNOTICE" -><A -NAME="AEN7" -></A -><P -></P -><P -> Permission is granted to copy, distribute and/or modify this - document under the terms of the <I -CLASS="CITETITLE" ->GNU Free Documentation - License</I ->, 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. You may obtain a copy - of the <I -CLASS="CITETITLE" ->GNU Free Documentation License</I -> from - the Free Software Foundation by visiting <A -HREF="http://www.fsf.org" -TARGET="_top" ->their Web site</A -> or by writing to: - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - </P -><P -> Many of the names used by companies to distinguish their products and - services are claimed as trademarks. Where those names appear in any - GNOME documentation, and those trademarks are made aware to the members - of the GNOME Documentation Project, the names have been printed in caps - or initial caps. - </P -><P -></P -></DIV -><DIV -CLASS="NAVFOOTER" -><HR -ALIGN="LEFT" -WIDTH="100%"><TABLE -WIDTH="100%" -BORDER="0" -CELLPADDING="0" -CELLSPACING="0" -><TR -><TD -WIDTH="33%" -ALIGN="left" -VALIGN="top" -> </TD -><TD -WIDTH="34%" -ALIGN="center" -VALIGN="top" -><A -HREF="index.html" ->Home</A -></TD -><TD -WIDTH="33%" -ALIGN="right" -VALIGN="top" -> </TD -></TR -><TR -><TD -WIDTH="33%" -ALIGN="left" -VALIGN="top" -> </TD -><TD -WIDTH="34%" -ALIGN="center" -VALIGN="top" -><A -HREF="index.html#AEN2" ->Up</A -></TD -><TD -WIDTH="33%" -ALIGN="right" -VALIGN="top" -> </TD -></TR -></TABLE -></DIV -></BODY -></HTML ->
\ No newline at end of file diff --git a/glabels1/doc/C/topic.dat b/glabels1/doc/C/topic.dat deleted file mode 100644 index 368844b..0000000 --- a/glabels1/doc/C/topic.dat +++ /dev/null @@ -1 +0,0 @@ -index.html gLabels Manual diff --git a/glabels1/doc/Makefile.am b/glabels1/doc/Makefile.am deleted file mode 100644 index a68e4e5..0000000 --- a/glabels1/doc/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -SUBDIRS = C diff --git a/glabels1/doc/Makefile.in b/glabels1/doc/Makefile.in deleted file mode 100644 index 255f675..0000000 --- a/glabels1/doc/Makefile.in +++ /dev/null @@ -1,328 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 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 = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ -GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ -GENCAT = @GENCAT@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ -GNOMEUI_LIBS = @GNOMEUI_LIBS@ -GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ -GNOME_CANVAS_PIXBUF_CFLAGS = @GNOME_CANVAS_PIXBUF_CFLAGS@ -GNOME_CANVAS_PIXBUF_LIBS = @GNOME_CANVAS_PIXBUF_LIBS@ -GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ -GNOME_CONFIG = @GNOME_CONFIG@ -GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ -GNOME_LIBDIR = @GNOME_LIBDIR@ -GNOME_LIBS = @GNOME_LIBS@ -GNOME_PRINT_CFLAGS = @GNOME_PRINT_CFLAGS@ -GNOME_PRINT_LIBS = @GNOME_PRINT_LIBS@ -GNOME_XML_CFLAGS = @GNOME_XML_CFLAGS@ -GNOME_XML_LIBS = @GNOME_XML_LIBS@ -GNORBA_CFLAGS = @GNORBA_CFLAGS@ -GNORBA_LIBS = @GNORBA_LIBS@ -GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_CONFIG = @GTK_CONFIG@ -GTK_LIBS = @GTK_LIBS@ -GT_NO = @GT_NO@ -GT_YES = @GT_YES@ -INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -ORBIT_CFLAGS = @ORBIT_CFLAGS@ -ORBIT_CONFIG = @ORBIT_CONFIG@ -ORBIT_IDL = @ORBIT_IDL@ -ORBIT_LIBS = @ORBIT_LIBS@ -PACKAGE = @PACKAGE@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PTHREAD_LIB = @PTHREAD_LIB@ -RANLIB = @RANLIB@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XPM_LIBS = @XPM_LIBS@ -ZVT_LIBS = @ZVT_LIBS@ -cflags_set = @cflags_set@ -cxxflags_set = @cxxflags_set@ -l = @l@ - -SUBDIRS = C -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -# 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. - -@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) $(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)$$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 = doc - -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 doc/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=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ - done -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive -check-am: all-am -check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: -install-exec: install-exec-recursive - -install-data-am: -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 -all-redirect: all-recursive -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-tags mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-tags clean-generic mostlyclean-am - -clean: clean-recursive - -distclean-am: distclean-tags distclean-generic clean-am - -distclean: distclean-recursive - -maintainer-clean-am: 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 - -.PHONY: 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 install-exec-am \ -install-exec 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 - - -# 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: diff --git a/glabels1/glabels.desktop b/glabels1/glabels.desktop deleted file mode 100644 index 0459cb1..0000000 --- a/glabels1/glabels.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=gLabels -Name[ja]=gLabels -Comment=Create Labels & Business Cards -Comment[ja]=¥é¥Ù¥ë¤È¥Ó¥¸¥Í¥¹¥«¡¼¥É¤ÎºîÀ®¥×¥í¥°¥é¥à -Exec=glabels -Icon=glabels/glabels-icon.png -Terminal=0 -Type=Application diff --git a/glabels1/glabels.spec.in b/glabels1/glabels.spec.in deleted file mode 100644 index 419fed2..0000000 --- a/glabels1/glabels.spec.in +++ /dev/null @@ -1,57 +0,0 @@ -%define name @PACKAGE@ -%define ver @VERSION@ -%define RELEASE 1 -%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} -%define prefix /usr -%define sysconfdir /etc - -Summary: glabels is a GNOME program to create labels and business cards -Name: %name -Version: %ver -Release: %rel -Copyright: GPL -Group: Applications/Graphics -Source: glabels-%{ver}.tar.gz -URL: http://snaught.com/glabels/ -BuildRoot: /var/tmp/glabels-%{PACKAGE_VERSION}-root - -Requires: gtk+ >= 1.2 -Requires: gnome-libs >= 1.2.8 -Requires: gnome-print >= 0.25 -Requires: gdk-pixbuf >= 0.11.0 - -%description -gLabels is a lightweight program for creating labels and -business cards for the GNOME desktop environment. -It is designed to work with various laser/ink-jet peel-off -label and business card sheets that you'll find at most office -supply stores. - - -%prep -%setup - -%build -CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure --prefix=%{prefix} -make - -%install -rm -rf $RPM_BUILD_ROOT - -make prefix=$RPM_BUILD_ROOT%{prefix} install - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-, root, root) -%doc README COPYING ChangeLog NEWS AUTHORS INSTALL -%{prefix}/bin/glabels -%{prefix}/bin/glabels-batch -%{prefix}/share/* - - -%changelog -* Sat May 19 2001 Jim Evins <evins@snaught.com> -- Created - diff --git a/glabels1/install-sh b/glabels1/install-sh deleted file mode 100755 index e9de238..0000000 --- a/glabels1/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/glabels1/intl/ChangeLog b/glabels1/intl/ChangeLog deleted file mode 100644 index 1989501..0000000 --- a/glabels1/intl/ChangeLog +++ /dev/null @@ -1,1086 +0,0 @@ -1998-04-29 Ulrich Drepper <drepper@cygnus.com> - - * intl/localealias.c (read_alias_file): Use unsigned char for - local variables. Remove unused variable tp. - * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * - for type of codeset. For loosing Solaris systems. - * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. - * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable - len if not needed. - Patches by Jim Meyering. - -1998-04-28 Ulrich Drepper <drepper@cygnus.com> - - * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if - mmap is not supported. - - * hash-string.h: Don't include <values.h>. - -1998-04-27 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Use strdup is available. - - * localealias.c: Define HAVE_MEMPCPY so that we can use this - function. Define and use semapahores to protect modfication of - global objects when compiling for glibc. Add code to allow - freeing alias table. - - * l10nflist.c: Don't assume stpcpy not being a macro. - - * gettextP.h: Define internal_function macri if not already done. - Use glibc byte-swap macros instead of defining SWAP when compiled - for glibc. - (struct loaded_domain): Add elements to allow unloading. - - * Makefile.in (distclean): Don't remove libintl.h here. - - * bindtextdomain.c: Carry over changes from glibc. Use strdup if - available. - - * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal - functions. Add memory freeing code for glibc. - - * dgettext.c: Update copyright. - - * explodename.c: Include stdlib.h and string.h only if they exist. - Use strings.h eventually. - - * finddomain.c: Mark internal functions. Use strdup if available. - Add memory freeing code for glibc. - -1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com> - - * libgettext.h: Fix dummy textdomain and bindtextdomain macros. - They should return reasonable values. - Reported by Tom Tromey <tromey@cygnus.com>. - -1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com> - - * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. - * intlh.inst.in: Likewise. - Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>. - - * libintl.glibc: Update from current glibc version. - -1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in: Reformat copyright. - -1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (DCGETTEXT): Remove wrong comment. - -1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install-data): Don't change directory to install. - -1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com> - - * cat-compat.c: Fix copyright. - - * localealias.c: Don't define strchr unless !HAVE_STRCHR. - - * loadmsgcat.c: Update copyright. Fix typos. - - * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. - (_nl_make_l10nflist): Handle sponsor and revision correctly. - - * gettext.c: Update copyright. - * gettext.h: Likewise. - * hash-string.h: Likewise. - - * finddomain.c: Remoave dead code. Define strchr only if - !HAVE_STRCHR. - - * explodename.c: Include <sys/types.h>. - - * explodename.c: Reformat copyright text. - (_nl_explode_name): Fix typo. - - * dcgettext.c: Define and use __set_errno. - (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is - not defined. - - * bindtextdom.c: Pretty printing. - -1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (guess_category_value): Don't depend on - HAVE_LC_MESSAGES. We don't need the macro here. - Patch by Bruno Haible <haible@ilog.fr>. - - * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL - macro. Instead use HAVE_LOCALE_NULL and define it when using - glibc, as in dcgettext.c. - Patch by Bruno Haible <haible@ilog.fr>. - - * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois - Pinard. - -Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in: Implement handling of libtool. - - * gettextP.h: Change data structures for use of generic lowlevel - i18n file handling. - -Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Put parentheses around arguments of memcpy macro - definition. - * localealias.c: Likewise. - * l10nflist.c: Likewise. - * finddomain.c: Likewise. - * bindtextdom.c: Likewise. - Reported by Thomas Esken. - -Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com> - - * textdomain.c: Move definition of `memcpy` macro to right - position. - -Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com> - - * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using - bcopy if not already defined. Reported by Thomas Esken. - * bindtextdom.c: Likewise. - * l10nflist.c: Likewise. - * localealias.c: Likewise. - * textdomain.c: Likewise. - -Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (libdir): Change to use exec_prefix instead of - prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>. - -Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c (_nl_normalize_codeset): We convert to lower case, - so don't prepend uppercase `ISO' for only numeric arg. - -Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after - definition of _GNU_SOURCE. Patch by Roland McGrath. - - * Makefile.in (uninstall): Fix another bug with `for' loop and - empty arguments. Patch by Jim Meyering. Correct name os - uninstalled files: no intl- prefix anymore. - - * Makefile.in (install-data): Again work around shells which - cannot handle mpty for list. Reported by Jim Meyering. - -Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Split goal. Now depend on install-exec - and install-data. - (install-exec, install-data): New goals. Created from former - install goal. - Reported by Karl Berry. - -Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (MKINSTALLDIRS): New variable. Path to - mkinstalldirs script. - (install): use MKINSTALLDIRS variable or if the script is not present - try to find it in the $top_scrdir). - -Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Linux libc *partly* includes the argz_* functions. - Grr. Work around by renaming the static version and use macros - for renaming. - -Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c: Correct presence test macros of __argz_* functions. - - * l10nflist.c: Include <argz.h> based on test of it instead when - __argz_* functions are available. - Reported by Andreas Schwab. - -Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com> - - * explodename.c, l10nflist.c: Define NULL for dumb systems. - -Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in, libgettext.h (dcgettext): Rename local variable - result to __result to prevent name clash. - - * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to - get prototype for stpcpy and strcasecmp. - - * intlh.inst.in, libgettext.h: Move declaration of - `_nl_msg_cat_cntr' outside __extension__ block to prevent warning - from gcc's -Wnested-extern option. - -Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Remove comment. - -Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (install): Work around for another Buglix stupidity. - Always use an `else' close for `if's. Reported by Nelson Beebe. - - * Makefile.in (intlh.inst): Correct typo in phony rule. - Reported by Nelson Beebe. - -Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com> - - * dcgettext.c (read_alias_file): Rename variable alloca_list to - block_list as the macro calls assume. - Patch by Eric Backus. - - * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using - malloc. - (read_alias_file): Rename varriabe alloca_list to block_list as the - macro calls assume. - Patch by Eric Backus. - - * l10nflist.c: Correct conditional for <argz.h> inclusion. - Reported by Roland McGrath. - - * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not - all-@USE_NLS@. - - * Makefile.in (install): intlh.inst comes from local dir, not - $(srcdir). - - * Makefile.in (intlh.inst): Special handling of this goal. If - used in gettext, this is really a rul to construct this file. If - used in any other package it is defined as a .PHONY rule with - empty body. - - * finddomain.c: Extract locale file information handling into - l10nfile.c. Rename local stpcpy__ function to stpcpy. - - * dcgettext.c (stpcpy): Add local definition. - - * l10nflist.c: Solve some portability problems. Patches partly by - Thomas Esken. Add local definition of stpcpy. - -Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com> - - * intlh.inst.in: Don't depend including <locale.h> on - HAVE_LOCALE_H. Instead configure must rewrite this fiile - depending on the result of the configure run. - - * Makefile.in (install): libintl.inst is now called intlh.inst. - Add rules for updating intlh.inst from intlh.inst.in. - - * libintl.inst: Renamed to intlh.inst.in. - - * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 - because gcc has __buitlin_alloca. - Reported by Roland McGrath. - -Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com> - - * Makefile.in (installcheck): New goal to fulfill needs of - automake's distcheck. - - * Makefile.in (install): Reorder commands so that VERSION is - found. - - * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in - @datadir@/gettext. - (COMSRCS): Add l10nfile.c. - (OBJECTS): Add l10nfile.o. - (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). - (DISTFILE.gettext): Remove $(DISTFILES.common). - (all-gettext): Remove goal. - (install): If $(PACKAGE) = gettext install, otherwose do nothing. No - package but gettext itself should install libintl.h + headers. - (dist): Extend goal to work for gettext, too. - (dist-gettext): Remove goal. - - * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. - -Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com> - - * loadmsgcat.c (_nl_load_domain): Parameter is now comes from - find_l10nfile. - -Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com> - - * l10nflist.c (__argz_next): Add definition. - - * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca - code. Use new l10nfile handling. - - * localealias.c [!HAVE_ALLOCA]: Add code for handling missing - alloca code. - - * l10nflist.c: Initial revision. - -Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all-gettext): New goal. Same as all-yes. - -Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de> - - * Makefile.in (gettextsrcdir): Define using @datadir@. - -Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware> - - * finddomain.c: Include <ctype.h>. Reported by Roland McGrath. - -Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware> - - * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing - with external declaration. - -Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all-no): Rename from all_no. - -Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware> - - * gettextP.h [loaded_domain]: Array `successor' must now contain up - to 63 elements (because of codeset name normalization). - - * finddomain.c: Implement codeset name normalization. - -Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware> - - * Makefile.in (all): Define to `all-@USE_NLS@'. - (all-yes, all_no): New goals. `all-no' is noop, `all-yes' - is former all. - -Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com> - - * localealias.c (alias_compare): Increment string pointers in loop - of strcasecmp replacement. - -Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): Who commented this goal out ? :-) - -Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls - should not effect it because a missing catalog is no error. - Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>. - -Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (Makefile): Explicitly use $(SHELL) for running - shell scripts. - -Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * Makefile.in (install-src): Only install library and header when - we use the own implementation. Don't do it when using the - system's gettext or catgets functions. - - * dcgettext.c (find_msg): Must not swap domain->hash_size here. - -Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware> - - * localealias.c, libintl.inst, libgettext.h, hash-string.h, - gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: - Use PARAMS instead of __P. Suggested by Roland McGrath. - -Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu> - - * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if - !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. - -Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): - Install libintl.inst instead of libintl.h.install. - -Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu> - - * cat-compat.c (textdomain): - Reverse order in which files are tried you load. First - try local file, when this failed absolute path. - -Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu> - - * cat-compat.c (bindtextdomain): Add missing { }. - -Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware> - - * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. - - * Makefile.in: - Add dummy `all' and `dvi' goals. Reported by Tom Tromey. - -Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca> - - * hash-string.h: Capitalize arguments of macros. - -Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Prevent files names longer than 13 - characters. libintl.h.glibc->libintl.glibc, - libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. - -Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com> - - * dcgettext.c: Fix bug in preprocessor conditionals. - -Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu> - - * libgettext.h: Solaris cc does not understand - #if !SYMBOL1 && !SYMBOL2. Sad but true. - -Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h (hash_string): - Fix for machine with >32 bit `unsigned long's. - - * dcgettext.c (DCGETTEXT): - Fix horrible bug in loop for alternative translation. - -Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: - Some further simplifications in message number generation. - -Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware> - - * libintl.h.glibc: Use __const instead of const in prototypes. - - * Makefile.in (install-src): - Install libintl.h.install instead of libintl.h. This - is a stripped-down version. Suggested by Peter Miller. - - * libintl.h.install, libintl.h.glibc: Initial revision. - - * localealias.c (_nl_expand_alias, read_alias_file): - Protect prototypes in type casts by __P. - -Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h: Correct prototype for hash_string. - -Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware> - - * hash-string.h (hash_string): Add prototype. - - * gettextP.h: Fix copyright. - (SWAP): Add prototype. - -Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (read_alias_file): Forgot sizeof. - Avoid calling *printf function. This introduces a big overhead. - Patch by Roland McGrath. - -Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. - - * finddomain.c (stpcpy): - Define substitution function local. The macro was to flaky. - - * cat-compat.c: Fix typo. - - * xopen-msg.sed, linux-msg.sed: - While bringing message number to right place only accept digits. - - * linux-msg.sed, xopen-msg.sed: Now that the counter does not have - leading 0s we don't need to remove them. Reported by Marcus - Daniels. - - * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in - dependency. Reported by Marcus Daniels. - - * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. - Generally cleanup using #if instead of #ifndef. - - * Makefile.in: Correct typos in comment. By Franc,ois Pinard. - -Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (install-src): Don't install libintl.h and libintl.a - if we use an available gettext implementation. - -Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported - by Franc,ois Pinard. - - * libgettext.h: Use #if instead of #ifdef/#ifndef. - - * finddomain.c: - Comments describing what has to be done should start with FIXME. - -Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. - DISTFILES.common names the files common to both dist goals. - DISTFILES.gettext are the files only distributed in GNU gettext. - -Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (DCGETTEXT): Correct searching in derived locales. - This was necessary since a change in _nl_find_msg several weeks - ago. I really don't know this is still not fixed. - -Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This - might mark a special condition. - - * finddomain.c (make_entry_rec): Don't make illegal entry as decided. - - * Makefile.in (dist): Suppress error message when ln failed. - Get files from $(srcdir) explicitly. - - * libgettext.h (gettext_const): Rename to gettext_noop. - -Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (make_entry_rec): - Protect against wrong locale names by testing mask. - - * libgettext.h (gettext_const): Add macro definition. - Capitalize macro arguments. - -Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Test for pointer != NULL before accessing value. - Reported by Tom Tromey. - - * gettext.c (NULL): - Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. - -Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. - -Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h: Disable dcgettext optimization for Solaris 2.3. - - * localealias.c (alias_compare): - Peter Miller reported that tolower in some systems is - even dumber than I thought. Protect call by `isupper'. - -Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (libdir, includedir): New variables. - (install-src): Install libintl.a and libintl.h in correct dirs. - -Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. - - * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. - - * localealias.c: - Fix typo and superflous test. Reported by Christian von Roques. - -Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Correct some remainder from the pre-CEN syntax. Now - we don't have a constant number of successors anymore. - -Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): Add libintl.h.glibc. - - * Makefile.in (dist-libc): Add goal for packing sources for glibc. - (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. - - * loadmsgcat.c: Forget to continue #if line. - - * localealias.c: - [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name - space clean. - - * dcgettext.c, finddomain.c: Better comment to last change. - - * loadmsgcat.c: - [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to - __fstat, __open, __close, __read, __mmap, and __munmap resp - to keep ANSI C name space clean. - - * finddomain.c: - [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. - - * dcgettext.c: - [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to - keep ANSI C name space clean. - - * libgettext.h: - Include sys/types.h for those old SysV systems out there. - Reported by Francesco Potorti`. - - * loadmsgcat.c (use_mmap): Define if compiled for glibc. - - * bindtextdom.c: Include all those standard headers - unconditionally if _LIBC is defined. - - * finddomain.c: Fix 2 times defiend -> defined. - - * textdomain.c: Include libintl.h instead of libgettext.h when - compiling for glibc. Include all those standard headers - unconditionally if _LIBC is defined. - - * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. - - * gettext.c: - Include libintl.h instead of libgettext.h when compiling for glibc. - Get NULL from stddef.h if we compile for glibc. - - * finddomain.c: Include libintl.h instead of libgettext.h when - compiling for glibc. Include all those standard headers - unconditionally if _LIBC is defined. - - * dcgettext.c: Include all those standard headers unconditionally - if _LIBC is defined. - - * dgettext.c: If compiled in glibc include libintl.h instead of - libgettext.h. - (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. - - * dcgettext.c: If compiled in glibc include libintl.h instead of - libgettext.h. - (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. - - * bindtextdom.c: - If compiled in glibc include libintl.h instead of libgettext.h. - -Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. - Reported by Marcus Daniels. - - * cat-compat.c (bindtextdomain): - String used in putenv must not be recycled. - Reported by Marcus Daniels. - - * libgettext.h (__USE_GNU_GETTEXT): - Additional symbol to signal that we use GNU gettext - library. - - * cat-compat.c (bindtextdomain): - Fix bug with the strange stpcpy replacement. - Reported by Nelson Beebe. - -Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware> - - * cat-compat.c: Include <string.h> for stpcpy prototype. - - * localealias.c (read_alias_file): - While expand strdup code temporary variable `cp' hided - higher level variable with same name. Rename to `tp'. - - * textdomain.c (textdomain): - Avoid warning by using temporary variable in strdup code. - - * finddomain.c (_nl_find_domain): Remove unused variable `application'. - -Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (alias_compare): - Use strcasecmp() only if available. Else use - implementation in place. - - * intl-compat.c: - Wrapper functions now call *__ functions instead of __*. - - * libgettext.h: Declare prototypes for *__ functions instead for __*. - - * cat-compat.c, loadmsgcat.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - - * bindtextdom.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - Rename to bindtextdomain__ if not used in GNU C Library. - - * dgettext.c: - Rename function to dgettext__ if not used in GNU C Library. - - * gettext.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - Functions now called gettext__ if not used in GNU C Library. - - * dcgettext.c, localealias.c, textdomain.c, finddomain.c: - Don't use xmalloc, xstrdup, and stpcpy. These functions are not part - of the standard libc and so prevent libintl.a from being used - standalone. - -Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c: Correct some bugs in handling of CEN standard - locale definitions. - -Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c: Implement CEN syntax. - - * gettextP.h (loaded_domain): Extend number of successors to 31. - -Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (aliaspath): Remove path to X11 locale dir. - - * Makefile.in: Make install-src depend on install. This helps - gettext to install the sources and other packages can use the - install goal. - -Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (uninstall): Remove stuff installed by install-src. - -Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware> - - * VERSION.in: Initial revision. - - * Makefile.in (DISTFILES): - Add VERSION file. This is not necessary for gettext, but - for other packages using this library. - -Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware> - - * gettextP.h (_nl_find_domain): - New prototype after changing search strategy. - - * finddomain.c (_nl_find_domain): - We now try only to find a specified catalog. Fall back to other - catalogs listed in the locale list is now done in __dcgettext. - - * dcgettext.c (__dcgettext): - Now we provide message fall back even to different languages. - I.e. if a message is not available in one language all the other - in the locale list a tried. Formerly fall back was only possible - within one language. Implemented by moving one loop from - _nl_find_domain to here. - -Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (gettextsrcdir): - Directory where source of GNU gettext library are made - available. - (INSTALL, INSTALL_DATA): Programs used for installing sources. - (gettext-src): New. Rule to install GNU gettext sources for use in - gettextize shell script. - -Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c (_nl_load_domain): - Use mmap for loading only when munmap function is - also available. - - * Makefile.in (install): Depend on `all' goal. - -Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware> - - * localealias.c (read_alias_file): - Do not overwrite '\n' when terminating alias value string. - - * localealias.c (read_alias_file): - Handle long lines. Ignore the rest not fitting in - the buffer after the initial `fgets' call. - -Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware> - - * gettextP.h (_nl_load_domain): - Add prototype, replacing prototype for _nl_load_msg_cat. - - * finddomain.c (_nl_find_domain): - Remove unneeded variable filename and filename_len. - (expand_alias): Remove prototype because functions does not - exist anymore. - - * localealias.c (read_alias_file): - Change type of fname_len parameter to int. - (xmalloc): Add prototype. - - * loadmsgcat.c: Better prototypes for xmalloc. - -Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (_nl_find_domain): - Allow alias name to be constructed from the four components. - - * Makefile.in (aliaspath): New variable. Set to preliminary value. - (SOURCES): Add localealias.c. - (OBJECTS): Add localealias.o. - - * gettextP.h: Add prototype for _nl_expand_alias. - - * finddomain.c: Aliasing handled in intl/localealias.c. - - * localealias.c: Aliasing for locale names. - - * bindtextdom.c: Better prototypes for xmalloc and xstrdup. - -Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): gettext.perl is now found in misc/. - - * cat-compat.c (bindtextdomain): - Correct implementation. dirname parameter was not used. - Reported by Marcus Daniels. - - * gettextP.h (loaded_domain): - New fields `successor' and `decided' for oo, lazy - message handling implementation. - - * dcgettext.c: - Adopt for oo, lazy message handliing. - Now we can inherit translations from less specific locales. - (find_msg): New function. - - * loadmsgcat.c, finddomain.c: - Complete rewrite. Implement oo, lazy message handling :-). - We now have an additional environment variable `LANGUAGE' with - a higher priority than LC_ALL for the LC_MESSAGE locale. - Here we can set a colon separated list of specifications each - of the form `language[_territory[.codeset]][@modifier]'. - -Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (unistd.h): - Include to get _PC_PATH_MAX defined on system having it. - -Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware> - - * finddomain.c (stpcpy): Include prototype. - - * Makefile.in (dist): Remove `copying instead' message. - -Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (ID, TAGS): Do not use $^. - -Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (TAGS, ID): Use $^ as command argument. - (TAGS): Give etags -o option t write to current directory, - not $(srcdir). - (ID): Use $(srcdir) instead os $(top_srcdir)/src. - (distclean): Remove ID. - -Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (gnulocaledir): - New variable, always using share/ for data directory. - (DEFS): Add GNULOCALEDIR, used in finddomain.c. - - * finddomain.c (_nl_default_dirname): - Set to GNULOCALEDIR, because it always has to point - to the directory where GNU gettext Library writes it to. - - * intl-compat.c (textdomain, bindtextdomain): - Undefine macros before function definition. - -Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware> - - * libgettext.h (_LIBINTL_H): - Protect definition in case where this file is included as - libgettext.h on Solaris machines. Add comment about this. - -Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware> - - * intl-compat.c (textdomain): Correct typo. - -Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware> - - * dcgettext.c (dcgettext): Function now called __dcgettext. - - * dgettext.c (dgettext): Now called __dgettext and calls - __dcgettext. - - * gettext.c (gettext): - Function now called __gettext and calls __dgettext. - - * textdomain.c (textdomain): Function now called __textdomain. - - * bindtextdom.c (bindtextdomain): Function now called - __bindtextdomain. - - * intl-compat.c: Initial revision. - - * Makefile.in (SOURCES): Add intl-compat.c. - (OBJECTS): We always compile the GNU gettext library functions. - OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, - and intl-compat.o. - (GETTOBJS): Contains now only intl-compat.o. - - * libgettext.h: - Re-include protection matches dualistic character of libgettext.h. - For all functions in GNU gettext library define __ counter part. - - * finddomain.c (strchr): Define as index if not found in C library. - (_nl_find_domain): For relative paths paste / in between. - -Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware> - - * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. - - * xopen-msg.sed: Fix bug with `msgstr ""' lines. - A little bit better comments. - -Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: - po-mode.el, makelinks, combine-sh are now found in ../misc. - - * po-mode.el, makelinks, combine-sh, elisp-comp: - Moved to ../misc/. - - * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. - -Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (INSTALL, INSTALL_DATA): New variables. - (install-data, uninstall): Install/uninstall .elc file. - - * po-mode.el (Installation comment): - Add .pox as possible extension of .po files. - -Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware> - - * elisp-comp: Complete new version by Franc,ois: This does not - fail when not compiling in the source directory. - -Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (../po/cat-id-tbl.o): - Use $(MAKE) instead of make for recursive make. - - * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. - (install-exec): Add missing dummy goal. - (install-data, uninstall): @ in multi-line shell command at - beginning, not in front of echo. Reported by Eric Backus. - -Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (DISTFILES): - Rename libgettext.perl to gettext.perl to fit in 14 chars - file systems. - - * gettext.perl: - Rename to gettext.perl to fit in 14 chars file systems. - -Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware> - - * cat-compat.c: If !STDC_HEADERS try to include malloc.h. - -Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware> - - * po2tbl.sed.in: Pretty printing. - - * linux-msg.sed, xopen-msg.sed: - Correct bugs with handling substitute flags in branches. - - * hash-string.h (hash_string): - Old K&R compilers don't under stand `unsigned char'. - - * gettext.h (nls_uint32): - Some old K&R compilers (eg HP) don't understand `unsigned int'. - - * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. - -Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (ELCFILES): New variable. - (DISTFILES): Add elisp-comp. - Add implicit rule for .el -> .elc compilation. - (install-data): install $ELCFILES - (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. - - * elisp-comp: Initial revision - -Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: - cat-id-tbl.c is now found in po/. This enables us to use an identical - intl/ directory in all packages. - - * dcgettext.c (dcgettext): hashing does not work for table size <= 2. - - * textdomain.c: fix typo (#if def -> #if defined) - -Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in (stamp-cat-id): use top_srcdir to address source files - (DISTFILES,distclean): move tupdate.perl to src/ - - * po-to-tbl.sed.in: - add additional jump to clear change flag to recognize multiline strings - -Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware> - - * textdomain.c: Protect inclusion of stdlib.h and string.h. - - * loadmsgcat.c: Protect inclusion of stdlib.h. - - * libgettext.h: Protect inclusion of locale.h. - Allow use in C++ programs. - Define NULL is not happened already. - - * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of - po-to-tbl.sed. - (distclean): remove po-to-tbl.sed and tupdate.perl. - - * tupdate.perl.in: Substitute Perl path even in exec line. - Don't include entries without translation from old .po file. - -Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware> - - * tupdate.perl.in: use "Updated: " in msgid "". - - * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). - Define getenv if !__STDC__. - - * bindtextdom.c: Protect stdlib.h and string.h inclusion. - Define free if !__STDC__. - - * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. - Define free if !__STDC__. - - * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. - -Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware> - - * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. - Remove unneeded $(srcdir) from Makefile.in dependency. - - * makelinks: Add copyright and short description. - - * po-mode.el: Last version for 0.7. - - * tupdate.perl.in: Fix die message. - - * dcgettext.c: Protect include of string.h. - - * gettext.c: Protect include of stdlib.h and further tries to get NULL. - - * finddomain.c: Some corrections in includes. - - * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. - - * po-to-tbl.sed: Adopt for new .po file format. - - * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. - -Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware> - - * tupdate.perl.in: Complete rewrite for new .po file format. - -Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware> - - * First official release. This directory contains all the code - needed to internationalize own packages. It provides functions - which allow to use the X/Open catgets function with an interface - like the Uniforum gettext function. For system which does not - have neither of those a complete implementation is provided. diff --git a/glabels1/intl/Makefile.in b/glabels1/intl/Makefile.in deleted file mode 100644 index 4bdb186..0000000 --- a/glabels1/intl/Makefile.in +++ /dev/null @@ -1,214 +0,0 @@ -# Makefile for directory with message catalog handling in GNU NLS Utilities. -# Copyright (C) 1995, 1996, 1997 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. - -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 = $(exec_prefix)/lib -includedir = $(prefix)/include -datadir = $(prefix)/@DATADIRNAME@ -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = @datadir@/gettext/intl -aliaspath = $(localedir):. -subdir = intl - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ - -l = @l@ - -AR = ar -CC = @CC@ -LIBTOOL = @LIBTOOL@ -RANLIB = @RANLIB@ - -DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ --DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -HEADERS = $(COMHDRS) libgettext.h loadinfo.h -COMHDRS = gettext.h gettextP.h hash-string.h -SOURCES = $(COMSRCS) intl-compat.c cat-compat.c -COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ -finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ -explodename.c -OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ -finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ -explodename.$lo -CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo -GETTOBJS = intl-compat.$lo -DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ -xopen-msg.sed $(HEADERS) $(SOURCES) -DISTFILES.normal = VERSION -DISTFILES.gettext = libintl.glibc intlh.inst.in - -.SUFFIXES: -.SUFFIXES: .c .o .lo -.c.o: - $(COMPILE) $< -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) $< - -INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib - -all: all-@USE_INCLUDED_LIBINTL@ - -all-yes: libintl.$la intlh.inst -all-no: - -libintl.a: $(OBJECTS) - rm -f $@ - $(AR) cru $@ $(OBJECTS) - $(RANLIB) $@ - -libintl.la: $(OBJECTS) - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ - -version-info 1:0 -rpath $(libdir) - -../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot - cd ../po && $(MAKE) cat-id-tbl.$lo - -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 gettext() function in its C library or in a -# separate library or use the catgets interface. A special case is -# where configure found a previously installed GNU gettext 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 \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(libdir) $(includedir); \ - else \ - $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ - fi; \ - $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ - $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ - else \ - : ; \ - fi -install-data: all - if test "$(PACKAGE)" = "gettext"; then \ - if test -r $(MKINSTALLDIRS); then \ - $(MKINSTALLDIRS) $(gettextsrcdir); \ - else \ - $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ - fi; \ - $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - dists="$(DISTFILES.common)"; \ - for file in $$dists; do \ - rm -f $(gettextsrcdir)/$$file; \ - done - -info dvi: - -$(OBJECTS): ../config.h libgettext.h -bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h -dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.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 *.o *.lo core core.* - -clean: mostlyclean - -distclean: clean - rm -f Makefile ID TAGS po2msg.sed po2tbl.sed - -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 $(DISTFILES) - if test "$(PACKAGE)" = gettext; then \ - additional="$(DISTFILES.gettext)"; \ - else \ - additional="$(DISTFILES.normal)"; \ - fi; \ - for file in $(DISTFILES.common) $$additional; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -dist-libc: - tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc - -Makefile: Makefile.in ../config.status - cd .. \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# The dependency for intlh.inst is different in gettext and all other -# packages. Because we cannot you GNU make features we have to solve -# the problem while rewriting Makefile.in. -@GT_YES@intlh.inst: intlh.inst.in ../config.status -@GT_YES@ cd .. \ -@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ -@GT_YES@ $(SHELL) ./config.status -@GT_NO@.PHONY: intlh.inst -@GT_NO@intlh.inst: - -# 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: diff --git a/glabels1/intl/VERSION b/glabels1/intl/VERSION deleted file mode 100644 index ee66b06..0000000 --- a/glabels1/intl/VERSION +++ /dev/null @@ -1 +0,0 @@ -GNU gettext library from gettext-0.10.35 diff --git a/glabels1/intl/bindtextdom.c b/glabels1/intl/bindtextdom.c deleted file mode 100644 index d9c3f34..0000000 --- a/glabels1/intl/bindtextdom.c +++ /dev/null @@ -1,203 +0,0 @@ -/* Implementation of the bindtextdomain(3) function - Copyright (C) 1995, 1996, 1997, 1998 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif -#include "gettext.h" -#include "gettextP.h" - -/* @@ 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; - - -/* 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 -# ifndef strdup -# define strdup(str) __strdup (str) -# endif -#else -# define BINDTEXTDOMAIN bindtextdomain__ -#endif - -/* 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; -{ - struct binding *binding; - - /* Some sanity checks. */ - if (domainname == NULL || domainname[0] == '\0') - return NULL; - - 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 (dirname == NULL) - /* The current binding has be to returned. */ - return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; - - if (binding != NULL) - { - /* The domain is already bound. If the new value and the old - one are equal we simply do nothing. Otherwise replace the - old binding. */ - if (strcmp (dirname, binding->dirname) != 0) - { - char *new_dirname; - - if (strcmp (dirname, _nl_default_dirname) == 0) - new_dirname = (char *) _nl_default_dirname; - else - { -#if defined _LIBC || defined HAVE_STRDUP - new_dirname = strdup (dirname); - if (new_dirname == NULL) - return NULL; -#else - size_t len = strlen (dirname) + 1; - new_dirname = (char *) malloc (len); - if (new_dirname == NULL) - return NULL; - - memcpy (new_dirname, dirname, len); -#endif - } - - if (binding->dirname != _nl_default_dirname) - free (binding->dirname); - - binding->dirname = new_dirname; - } - } - else - { - /* We have to create a new binding. */ -#if !defined _LIBC && !defined HAVE_STRDUP - size_t len; -#endif - struct binding *new_binding = - (struct binding *) malloc (sizeof (*new_binding)); - - if (new_binding == NULL) - return NULL; - -#if defined _LIBC || defined HAVE_STRDUP - new_binding->domainname = strdup (domainname); - if (new_binding->domainname == NULL) - return NULL; -#else - len = strlen (domainname) + 1; - new_binding->domainname = (char *) malloc (len); - if (new_binding->domainname == NULL) - return NULL; - memcpy (new_binding->domainname, domainname, len); -#endif - - if (strcmp (dirname, _nl_default_dirname) == 0) - new_binding->dirname = (char *) _nl_default_dirname; - else - { -#if defined _LIBC || defined HAVE_STRDUP - new_binding->dirname = strdup (dirname); - if (new_binding->dirname == NULL) - return NULL; -#else - len = strlen (dirname) + 1; - new_binding->dirname = (char *) malloc (len); - if (new_binding->dirname == NULL) - return NULL; - memcpy (new_binding->dirname, dirname, len); -#endif - } - - /* 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; - } - - binding = new_binding; - } - - return binding->dirname; -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__bindtextdomain, bindtextdomain); -#endif diff --git a/glabels1/intl/cat-compat.c b/glabels1/intl/cat-compat.c deleted file mode 100644 index 867d901..0000000 --- a/glabels1/intl/cat-compat.c +++ /dev/null @@ -1,262 +0,0 @@ -/* Compatibility code for gettext-using-catgets interface. - Copyright (C) 1995, 1997 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <string.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# endif -#endif - -#ifdef HAVE_NL_TYPES_H -# include <nl_types.h> -#endif - -#include "libgettext.h" - -/* @@ end of prolog @@ */ - -/* 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. And even worse: POSIX - defines this not at all. So we can use this feature only on selected - system (e.g. those using GNU C Library). */ -#ifdef _LIBC -# define HAVE_LOCALE_NULL -#endif - -/* The catalog descriptor. */ -static nl_catd catalog = (nl_catd) -1; - -/* Name of the default catalog. */ -static const char default_catalog_name[] = "messages"; - -/* Name of currently used catalog. */ -static const char *catalog_name = default_catalog_name; - -/* Get ID for given string. If not found return -1. */ -static int msg_to_cat_id PARAMS ((const char *msg)); - -/* Substitution for systems lacking this function in their C library. */ -#if !_LIBC && !HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); -#endif - - -/* Set currently used domain/catalog. */ -char * -textdomain (domainname) - const char *domainname; -{ - nl_catd new_catalog; - char *new_name; - size_t new_name_len; - char *lang; - -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ - && defined HAVE_LOCALE_NULL - lang = setlocale (LC_MESSAGES, NULL); -#else - lang = getenv ("LC_ALL"); - if (lang == NULL || lang[0] == '\0') - { - lang = getenv ("LC_MESSAGES"); - if (lang == NULL || lang[0] == '\0') - lang = getenv ("LANG"); - } -#endif - if (lang == NULL || lang[0] == '\0') - lang = "C"; - - /* See whether name of currently used domain is asked. */ - if (domainname == NULL) - return (char *) catalog_name; - - if (domainname[0] == '\0') - domainname = default_catalog_name; - - /* Compute length of added path element. */ - new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) - + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 - + sizeof (".cat"); - - new_name = (char *) malloc (new_name_len); - if (new_name == NULL) - return NULL; - - strcpy (new_name, PACKAGE); - new_catalog = catopen (new_name, 0); - - if (new_catalog == (nl_catd) -1) - { - /* NLSPATH search didn't work, try absolute path */ - sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, - PACKAGE); - new_catalog = catopen (new_name, 0); - - if (new_catalog == (nl_catd) -1) - { - free (new_name); - return (char *) catalog_name; - } - } - - /* Close old catalog. */ - if (catalog != (nl_catd) -1) - catclose (catalog); - if (catalog_name != default_catalog_name) - free ((char *) catalog_name); - - catalog = new_catalog; - catalog_name = new_name; - - return (char *) catalog_name; -} - -char * -bindtextdomain (domainname, dirname) - const char *domainname; - const char *dirname; -{ -#if HAVE_SETENV || HAVE_PUTENV - char *old_val, *new_val, *cp; - size_t new_val_len; - - /* This does not make much sense here but to be compatible do it. */ - if (domainname == NULL) - return NULL; - - /* Compute length of added path element. If we use setenv we don't need - the first byts for NLSPATH=, but why complicate the code for this - peanuts. */ - new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) - + sizeof ("/%L/LC_MESSAGES/%N.cat"); - - old_val = getenv ("NLSPATH"); - if (old_val == NULL || old_val[0] == '\0') - { - old_val = NULL; - new_val_len += 1 + sizeof (LOCALEDIR) - 1 - + sizeof ("/%L/LC_MESSAGES/%N.cat"); - } - else - new_val_len += strlen (old_val); - - new_val = (char *) malloc (new_val_len); - if (new_val == NULL) - return NULL; - -# if HAVE_SETENV - cp = new_val; -# else - cp = stpcpy (new_val, "NLSPATH="); -# endif - - cp = stpcpy (cp, dirname); - cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); - - if (old_val == NULL) - { -# if __STDC__ - stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); -# else - - cp = stpcpy (cp, LOCALEDIR); - stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); -# endif - } - else - stpcpy (cp, old_val); - -# if HAVE_SETENV - setenv ("NLSPATH", new_val, 1); - free (new_val); -# else - putenv (new_val); - /* Do *not* free the environment entry we just entered. It is used - from now on. */ -# endif - -#endif - - return (char *) domainname; -} - -#undef gettext -char * -gettext (msg) - const char *msg; -{ - int msgid; - - if (msg == NULL || catalog == (nl_catd) -1) - return (char *) msg; - - /* Get the message from the catalog. We always use set number 1. - The message ID is computed by the function `msg_to_cat_id' - which works on the table generated by `po-to-tbl'. */ - msgid = msg_to_cat_id (msg); - if (msgid == -1) - return (char *) msg; - - return catgets (catalog, 1, msgid, (char *) msg); -} - -/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries - for the one equal to msg. If it is found return the ID. In case when - the string is not found return -1. */ -static int -msg_to_cat_id (msg) - const char *msg; -{ - int cnt; - - for (cnt = 0; cnt < _msg_tbl_length; ++cnt) - if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) - return _msg_tbl[cnt]._msg_number; - - return -1; -} - - -/* @@ 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 diff --git a/glabels1/intl/dcgettext.c b/glabels1/intl/dcgettext.c deleted file mode 100644 index c4c7a2c..0000000 --- a/glabels1/intl/dcgettext.c +++ /dev/null @@ -1,624 +0,0 @@ -/* Implementation of the dcgettext(3) function. - Copyright (C) 1995, 1996, 1997, 1998 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. */ - -#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 - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif -#include "hash-string.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 getcwd __getcwd -# ifndef stpcpy -# define stpcpy __stpcpy -# endif -#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 -#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 - -/* 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. And even worse: POSIX - defines this not at all. So we can use this feature only on selected - system (e.g. those using GNU C Library). */ -#ifdef _LIBC -# define HAVE_LOCALE_NULL -#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[] = "messages"; - -/* Value used as the default domain for gettext(3). */ -const char *_nl_current_default_domain = _nl_default_default_domain; - -/* Contains the default location of the message catalogs. */ -const char _nl_default_dirname[] = GNULOCALEDIR; - -/* List with bindings of specific domains created by bindtextdomain() - calls. */ -struct binding *_nl_domain_bindings; - -/* Prototypes for local functions. */ -static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, - const char *msgid)) 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 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); \ - } \ - } while (0) -# undef alloca -# define alloca(size) (malloc (size)) -#endif /* have alloca */ - - -/* 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 -#else -# define DCGETTEXT dcgettext__ -#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; -{ -#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; - int saved_errno = errno; - - /* If no real MSGID is given return NULL. */ - if (msgid == NULL) - return NULL; - - /* 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 - defintion left this undefined. */ - if (domainname == NULL) - domainname = _nl_current_default_domain; - - /* 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 (binding->dirname[0] == '/') - 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) PATH_MAX; - path_max += 2; /* The getcwd docs say to do this. */ - - dirname = (char *) alloca (path_max + dirname_len); - ADD_BLOCK (block_list, dirname); - - __set_errno (0); - while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) - { - path_max += PATH_INCR; - dirname = (char *) alloca (path_max + dirname_len); - ADD_BLOCK (block_list, dirname); - __set_errno (0); - } - - 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); - __set_errno (saved_errno); - return (char *) msgid; - } - - 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); - - xdomainname = (char *) alloca (strlen (categoryname) - + strlen (domainname) + 5); - ADD_BLOCK (block_list, xdomainname); - - stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), - domainname), - ".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 th 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'; - } - - /* 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); - __set_errno (saved_errno); - return (char *) msgid; - } - - - /* Find structure describing the message catalog matching the - DOMAINNAME and CATEGORY. */ - domain = _nl_find_domain (dirname, single_locale, xdomainname); - - if (domain != NULL) - { - retval = find_msg (domain, msgid); - - if (retval == NULL) - { - int cnt; - - for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) - { - retval = find_msg (domain->successor[cnt], msgid); - - if (retval != NULL) - break; - } - } - - if (retval != NULL) - { - FREE_BLOCKS (block_list); - __set_errno (saved_errno); - return retval; - } - } - } - /* NOTREACHED */ -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__dcgettext, dcgettext); -#endif - - -static char * -internal_function -find_msg (domain_file, msgid) - struct loaded_l10nfile *domain_file; - const char *msgid; -{ - size_t top, act, bottom; - struct loaded_domain *domain; - - if (domain_file->decided == 0) - _nl_load_domain (domain_file); - - if (domain_file->data == NULL) - return NULL; - - domain = (struct loaded_domain *) domain_file->data; - - /* Locate the MSGID and its translation. */ - if (domain->hash_size > 2 && 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)); - nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); - - if (nstr == 0) - /* Hash table entry is empty. */ - return NULL; - - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len - && strcmp (msgid, - domain->data + W (domain->must_swap, - domain->orig_tab[nstr - 1].offset)) == 0) - return (char *) domain->data + W (domain->must_swap, - domain->trans_tab[nstr - 1].offset); - - while (1) - { - if (idx >= domain->hash_size - incr) - idx -= domain->hash_size - incr; - else - idx += incr; - - nstr = W (domain->must_swap, domain->hash_tab[idx]); - if (nstr == 0) - /* Hash table entry is empty. */ - return NULL; - - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len - && strcmp (msgid, - domain->data + W (domain->must_swap, - domain->orig_tab[nstr - 1].offset)) - == 0) - return (char *) domain->data - + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); - } - /* NOTREACHED */ - } - - /* Now we try the default method: binary search in the sorted - array of messages. */ - bottom = 0; - top = domain->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 - break; - } - - /* If an translation is found return this. */ - return bottom >= top ? NULL : (char *) domain->data - + W (domain->must_swap, - domain->trans_tab[act].offset); -} - - -/* 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 *retval; - - /* The highest priority value is the `LANGUAGE' environment - variable. This is a GNU extension. */ - retval = getenv ("LANGUAGE"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* `LANGUAGE' is not set. So 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. */ -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - return setlocale (category, NULL); -#else - /* Setting of LC_ALL overwrites all other. */ - retval = getenv ("LC_ALL"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* Next comes the name of the desired category. */ - retval = getenv (categoryname); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* Last possibility is the LANG environment variable. */ - retval = getenv ("LANG"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* We use C as the default domain. POSIX says this is implementation - defined. */ - return "C"; -#endif -} - -/* @@ 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 - - -#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) -{ - struct binding *runp; - - for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) - { - free (runp->domainname); - if (runp->dirname != _nl_default_dirname) - /* Yes, this is a pointer comparison. */ - free (runp->dirname); - } - - if (_nl_current_default_domain != _nl_default_default_domain) - /* Yes, again a pointer comparison. */ - free ((char *) _nl_current_default_domain); -} - -text_set_element (__libc_subfreeres, free_mem); -#endif diff --git a/glabels1/intl/dgettext.c b/glabels1/intl/dgettext.c deleted file mode 100644 index 0510c2b..0000000 --- a/glabels1/intl/dgettext.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Implementation of the dgettext(3) function - Copyright (C) 1995, 1996, 1997 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined HAVE_LOCALE_H || defined _LIBC -# include <locale.h> -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.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 __dcgettext -#else -# define DGETTEXT dgettext__ -# define DCGETTEXT 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 diff --git a/glabels1/intl/explodename.c b/glabels1/intl/explodename.c deleted file mode 100644 index 8066dc2..0000000 --- a/glabels1/intl/explodename.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -#endif -#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 @@ */ - -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; - while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' - && cp[0] != '+' && cp[0] != ',') - ++cp; - - 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; -} diff --git a/glabels1/intl/finddomain.c b/glabels1/intl/finddomain.c deleted file mode 100644 index 81ea29b..0000000 --- a/glabels1/intl/finddomain.c +++ /dev/null @@ -1,216 +0,0 @@ -/* Handle list of needed message catalogs - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <ctype.h> -#include <errno.h> -#include <stdio.h> -#include <sys/types.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.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) - const char *dirname; - char *locale; - const char *domainname; -{ - 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); - - 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]); - - 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); - 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]); - if (retval->successor[cnt]->data != NULL) - break; - } - } - - /* The room for an alias was dynamically allocated. Free it now. */ - if (alias_value != NULL) - free (locale); - - 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 (here); - } -} - -text_set_element (__libc_subfreeres, free_mem); -#endif diff --git a/glabels1/intl/gettext.c b/glabels1/intl/gettext.c deleted file mode 100644 index d929f98..0000000 --- a/glabels1/intl/gettext.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Implementation of gettext(3) function. - Copyright (C) 1995, 1997 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#ifdef _LIBC -# define __need_NULL -# include <stddef.h> -#else -# ifdef STDC_HEADERS -# include <stdlib.h> /* Just for NULL. */ -# else -# ifdef HAVE_STRING_H -# include <string.h> -# else -# define NULL ((void *) 0) -# endif -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.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 DGETTEXT __dgettext -#else -# define GETTEXT gettext__ -# define DGETTEXT dgettext__ -#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 DGETTEXT (NULL, msgid); -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__gettext, gettext); -#endif diff --git a/glabels1/intl/gettext.h b/glabels1/intl/gettext.h deleted file mode 100644 index 3cd23d7..0000000 --- a/glabels1/intl/gettext.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Internal header for GNU gettext internationalization functions. - Copyright (C) 1995, 1997 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 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. */ - -#ifndef _GETTEXT_H -#define _GETTEXT_H 1 - -#include <stdio.h> - -#if HAVE_LIMITS_H || _LIBC -# include <limits.h> -#endif - -/* @@ 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 - doing that would require that the configure script compile and *run* - the resulting executable. Locally running cross-compiled executables - is usually not possible. */ - -#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 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 translation strings. */ - nls_uint32 trans_tab_offset; - /* Size of hashing table. */ - nls_uint32 hash_tab_size; - /* Offset of first hashing entry. */ - nls_uint32 hash_tab_offset; -}; - -struct string_desc -{ - /* Length of addressed string. */ - nls_uint32 length; - /* Offset of string in file. */ - nls_uint32 offset; -}; - -/* @@ begin of epilog @@ */ - -#endif /* gettext.h */ diff --git a/glabels1/intl/gettextP.h b/glabels1/intl/gettextP.h deleted file mode 100644 index 00c5203..0000000 --- a/glabels1/intl/gettextP.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Header describing internals of gettext library - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifndef _GETTEXTP_H -#define _GETTEXTP_H - -#include "loadinfo.h" - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - -#ifndef internal_function -# define internal_function -#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 nls_uint32 SWAP PARAMS ((nls_uint32 i)); - -static inline nls_uint32 -SWAP (i) - nls_uint32 i; -{ - return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); -} -#endif - - -struct loaded_domain -{ - const char *data; - int use_mmap; - size_t mmap_size; - int must_swap; - nls_uint32 nstrings; - struct string_desc *orig_tab; - struct string_desc *trans_tab; - nls_uint32 hash_size; - nls_uint32 *hash_tab; -}; - -struct binding -{ - struct binding *next; - char *domainname; - char *dirname; -}; - -struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, - char *__locale, - const char *__domainname)) - internal_function; -void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) - internal_function; -void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) - internal_function; - -/* @@ begin of epilog @@ */ - -#endif /* gettextP.h */ diff --git a/glabels1/intl/hash-string.h b/glabels1/intl/hash-string.h deleted file mode 100644 index cacb38e..0000000 --- a/glabels1/intl/hash-string.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Implements a string hashing function. - Copyright (C) 1995, 1997 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 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. */ - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ -# 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 hash_string PARAMS ((const char *__str_param)); - -static inline unsigned long -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) *str++; - g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - return hval; -} diff --git a/glabels1/intl/intl-compat.c b/glabels1/intl/intl-compat.c deleted file mode 100644 index 503efa0..0000000 --- a/glabels1/intl/intl-compat.c +++ /dev/null @@ -1,76 +0,0 @@ -/* intl-compat.c - Stub functions to call gettext functions from GNU gettext - Library. - Copyright (C) 1995 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include "libgettext.h" - -/* @@ end of prolog @@ */ - - -#undef gettext -#undef dgettext -#undef dcgettext -#undef textdomain -#undef bindtextdomain - - -char * -bindtextdomain (domainname, dirname) - const char *domainname; - const char *dirname; -{ - return bindtextdomain__ (domainname, dirname); -} - - -char * -dcgettext (domainname, msgid, category) - const char *domainname; - const char *msgid; - int category; -{ - return dcgettext__ (domainname, msgid, category); -} - - -char * -dgettext (domainname, msgid) - const char *domainname; - const char *msgid; -{ - return dgettext__ (domainname, msgid); -} - - -char * -gettext (msgid) - const char *msgid; -{ - return gettext__ (msgid); -} - - -char * -textdomain (domainname) - const char *domainname; -{ - return textdomain__ (domainname); -} diff --git a/glabels1/intl/l10nflist.c b/glabels1/intl/l10nflist.c deleted file mode 100644 index 9c7dc18..0000000 --- a/glabels1/intl/l10nflist.c +++ /dev/null @@ -1,411 +0,0 @@ -/* Handle list of needed message catalogs - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined _LIBC || defined HAVE_ARGZ_H -# include <argz.h> -#endif -#include <ctype.h> -#include <sys/types.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#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 - -/* 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) -#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) -#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 *last = NULL; - struct loaded_l10nfile *retval; - char *cp; - size_t entries; - int cnt; - - /* 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) + 1 : 0) - + ((mask & CEN_REVISION) != 0 - ? strlen (revision) + 1 : 0)) : 0) - + 1 + strlen (filename) + 1); - - if (abs_filename == NULL) - return NULL; - - retval = NULL; - last = NULL; - - /* Construct file name. */ - memcpy (abs_filename, dirlist, dirlist_len); - __argz_stringify (abs_filename, dirlist_len, ':'); - cp = abs_filename + (dirlist_len - 1); - *cp++ = '/'; - 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. */ - last = NULL; - 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; - } - - last = retval; - } - - if (retval != NULL || do_allocate == 0) - { - free (abs_filename); - return retval; - } - - retval = (struct loaded_l10nfile *) - malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) - * (1 << pop (mask)) - * sizeof (struct loaded_l10nfile *))); - if (retval == NULL) - return NULL; - - retval->filename = abs_filename; - retval->decided = (__argz_count (dirlist, dirlist_len) != 1 - || ((mask & XPG_CODESET) != 0 - && (mask & XPG_NORM_CODESET) != 0)); - retval->data = NULL; - - if (last == NULL) - { - retval->next = *l10nfile_list; - *l10nfile_list = retval; - } - else - { - retval->next = last->next; - last->next = retval; - } - - entries = 0; - /* If the DIRLIST is a real list the RETVAL entry corresponds not to - a real file. So we have to use the DIRLIST separation mechanism - of the inner loop. */ - cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; - for (; cnt >= 0; --cnt) - if ((cnt & ~mask) == 0 - && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) - && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) - { - /* 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); - } - 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. */ -const char * -_nl_normalize_codeset (codeset, name_len) - const unsigned 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 (codeset[cnt])) - { - ++len; - - if (isalpha (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 (codeset[cnt])) - *wp++ = tolower (codeset[cnt]); - else if (isdigit (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 diff --git a/glabels1/intl/libgettext.h b/glabels1/intl/libgettext.h deleted file mode 100644 index 3a92960..0000000 --- a/glabels1/intl/libgettext.h +++ /dev/null @@ -1,182 +0,0 @@ -/* Message catalogs for internationalization. - Copyright (C) 1995, 1996, 1997, 1998 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. */ - -/* Because on some systems (e.g. Solaris) we sometimes have to include - the systems libintl.h as well as this file we have more complex - include protection above. But the systems header might perhaps also - define _LIBINTL_H and therefore we have to protect the definition here. */ - -#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H -#ifndef _LIBINTL_H -# define _LIBINTL_H 1 -#endif -#define _LIBGETTEXT_H 1 - -/* We define an additional symbol to signal that we use the GNU - implementation of gettext. */ -#define __USE_GNU_GETTEXT 1 - -#include <sys/types.h> - -#if HAVE_LOCALE_H -# include <locale.h> -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -/* @@ end of prolog @@ */ - -#ifndef PARAMS -# if __STDC__ || defined __cplusplus -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - -#ifndef NULL -# if !defined __cplusplus || defined __GNUC__ -# define NULL ((void *) 0) -# else -# define NULL (0) -# endif -#endif - -#if !HAVE_LC_MESSAGES -/* This value determines the behaviour of the gettext() and dgettext() - function. But some system does not have this defined. Define it - to a default value. */ -# define LC_MESSAGES (-1) -#endif - - -/* Declarations for gettext-using-catgets interface. Derived from - Jim Meyering's libintl.h. */ -struct _msg_ent -{ - const char *_msg; - int _msg_number; -}; - - -#if HAVE_CATGETS -/* These two variables are defined in the automatically by po-to-tbl.sed - generated file `cat-id-tbl.c'. */ -extern const struct _msg_ent _msg_tbl[]; -extern int _msg_tbl_length; -#endif - - -/* For automatical extraction of messages sometimes no real - translation is needed. Instead the string itself is the result. */ -#define gettext_noop(Str) (Str) - -/* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -extern char *gettext PARAMS ((const char *__msgid)); -extern char *gettext__ PARAMS ((const char *__msgid)); - -/* Look up MSGID in the DOMAINNAME message catalog for the current - LC_MESSAGES locale. */ -extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); -extern char *dgettext__ PARAMS ((const char *__domainname, - const char *__msgid)); - -/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, - int __category)); -extern char *dcgettext__ PARAMS ((const char *__domainname, - const char *__msgid, int __category)); - - -/* 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". */ -extern char *textdomain PARAMS ((const char *__domainname)); -extern char *textdomain__ PARAMS ((const char *__domainname)); - -/* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -extern char *bindtextdomain PARAMS ((const char *__domainname, - const char *__dirname)); -extern char *bindtextdomain__ PARAMS ((const char *__domainname, - const char *__dirname)); - -#if ENABLE_NLS - -/* Solaris 2.3 has the gettext function but dcgettext is missing. - So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 - has dcgettext. */ -# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) - -# define gettext(Msgid) \ - dgettext (NULL, Msgid) - -# define dgettext(Domainname, Msgid) \ - dcgettext (Domainname, Msgid, LC_MESSAGES) - -# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 -/* This global variable is defined in loadmsgcat.c. We need a sign, - whether a new catalog was loaded, which can be associated with all - translations. */ -extern int _nl_msg_cat_cntr; - -# define dcgettext(Domainname, Msgid, Category) \ - (__extension__ \ - ({ \ - char *__result; \ - if (__builtin_constant_p (Msgid)) \ - { \ - static char *__translation__; \ - static int __catalog_counter__; \ - if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ - { \ - __translation__ = \ - dcgettext__ (Domainname, Msgid, Category); \ - __catalog_counter__ = _nl_msg_cat_cntr; \ - } \ - __result = __translation__; \ - } \ - else \ - __result = dcgettext__ (Domainname, Msgid, Category); \ - __result; \ - })) -# endif -# endif - -#else - -# define gettext(Msgid) (Msgid) -# define dgettext(Domainname, Msgid) (Msgid) -# define dcgettext(Domainname, Msgid, Category) (Msgid) -# define textdomain(Domainname) ((char *) Domainname) -# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) - -#endif - -/* @@ begin of epilog @@ */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/glabels1/intl/linux-msg.sed b/glabels1/intl/linux-msg.sed deleted file mode 100644 index 5918e72..0000000 --- a/glabels1/intl/linux-msg.sed +++ /dev/null @@ -1,100 +0,0 @@ -# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# 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. -# -# -# The first directive in the .msg should be the definition of the -# message set number. We use always set number 1. -# -1 { - i\ -$set 1 # Automatically created by po2msg.sed - h - s/.*/0/ - x -} -# -# Mitch's old catalog format does not allow comments. -# -# We copy the original message as a comment into the .msg file. -# -/^msgid/ { - s/msgid[ ]*"// -# -# This does not work now with the new format. -# /"$/! { -# s/\\$// -# s/$/ ... (more lines following)"/ -# } - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x - G - s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p -} -# -# The .msg file contains, other then the .po file, only the translations -# but each given a unique ID. Starting from 1 and incrementing by 1 for -# each message we assign them to the messages. -# It is important that the .po file used to generate the cat-id-tbl.c file -# (with po-to-tbl) is the same as the one used here. (At least the order -# of declarations must not be changed.) -# -/^msgstr/ { - s/msgstr[ ]*"\(.*\)"/# \1/ -# Clear substitution flag. - tb -# Append the next line. - :b - N -# Look whether second part is continuation line. - s/\(.*\n\)"\(.*\)"/\1\2/ -# Yes, then branch. - ta - P - D -# Note that D includes a jump to the start!! -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ - P -# We cannot use D here. - s/.*\n\(.*\)/\1/ - tb -} -d diff --git a/glabels1/intl/loadinfo.h b/glabels1/intl/loadinfo.h deleted file mode 100644 index f4ebf6d..0000000 --- a/glabels1/intl/loadinfo.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 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, 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. */ - -#ifndef PARAMS -# if __STDC__ -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#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]; -}; - - -extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, - size_t name_len)); - -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)); - - -extern const char *_nl_expand_alias PARAMS ((const char *name)); - -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)); diff --git a/glabels1/intl/loadmsgcat.c b/glabels1/intl/loadmsgcat.c deleted file mode 100644 index 515892d..0000000 --- a/glabels1/intl/loadmsgcat.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Load needed message catalogs. - Copyright (C) 1995, 1996, 1997, 1998 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <fcntl.h> -#include <sys/types.h> -#include <sys/stat.h> - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include <unistd.h> -#endif - -#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC -# include <sys/mman.h> -#endif - -#include "gettext.h" -#include "gettextP.h" - -/* @@ 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 - -/* 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 = 0; - - -/* Load the message catalogs specified by FILENAME. If it is no valid - message catalog do nothing. */ -void -internal_function -_nl_load_domain (domain_file) - struct loaded_l10nfile *domain_file; -{ - int fd; - size_t size; - struct stat st; - struct mo_file_header *data = (struct mo_file_header *) -1; -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - int use_mmap = 0; -#endif - struct loaded_domain *domain; - - domain_file->decided = 1; - domain_file->data = NULL; - - /* 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); - if (fd == -1) - return; - - /* We must know about the size of the file. */ - if (fstat (fd, &st) != 0 - || (size = (size_t) st.st_size) != st.st_size - || size < sizeof (struct mo_file_header)) - { - /* Something went wrong. */ - close (fd); - return; - } - -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - /* 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 (data != (struct mo_file_header *) -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 == -1) - { - 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 (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) - { - /* The magic number is wrong: not a message catalog file. */ -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - if (use_mmap) - munmap ((caddr_t) data, size); - else -#endif - free (data); - return; - } - - domain_file->data - = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); - if (domain_file->data == NULL) - return; - - domain = (struct loaded_domain *) domain_file->data; - domain->data = (char *) data; -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - domain->use_mmap = use_mmap; -#endif - domain->mmap_size = size; - domain->must_swap = data->magic != _MAGIC; - - /* Fill in the information about the available tables. */ - switch (W (domain->must_swap, data->revision)) - { - case 0: - domain->nstrings = W (domain->must_swap, data->nstrings); - domain->orig_tab = (struct string_desc *) - ((char *) data + W (domain->must_swap, data->orig_tab_offset)); - domain->trans_tab = (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 = (nls_uint32 *) - ((char *) data + W (domain->must_swap, data->hash_tab_offset)); - break; - default: - /* This is an illegal revision. */ -#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ - || defined _LIBC - if (use_mmap) - munmap ((caddr_t) data, size); - else -#endif - free (data); - free (domain); - domain_file->data = NULL; - return; - } - - /* Show that one domain is changed. This might make some cached - translations invalid. */ - ++_nl_msg_cat_cntr; -} - - -#ifdef _LIBC -void -internal_function -_nl_unload_domain (domain) - struct loaded_domain *domain; -{ - if (domain->use_mmap) - munmap ((caddr_t) domain->data, domain->mmap_size); - else - free ((void *) domain->data); - - free (domain); -} -#endif diff --git a/glabels1/intl/localealias.c b/glabels1/intl/localealias.c deleted file mode 100644 index bca555a..0000000 --- a/glabels1/intl/localealias.c +++ /dev/null @@ -1,424 +0,0 @@ -/* Handle aliases for locale names. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <ctype.h> -#include <stdio.h> -#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 - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#include "gettext.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 - -# define mempcpy __mempcpy -# define HAVE_MEMPCPY 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 - - -/* 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 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); \ - } \ - } while (0) -# undef alloca -# define alloca(size) (malloc (size)) -#endif /* have alloca */ - - -struct alias_map -{ - const char *alias; - const char *value; -}; - - -static char *string_space = NULL; -static size_t string_space_act = 0; -static size_t string_space_max = 0; -static struct alias_map *map; -static size_t nmap = 0; -static size_t maxmap = 0; - - -/* Prototypes for local functions. */ -static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) - internal_function; -static void 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 = LOCALE_ALIAS_PATH; - struct alias_map *retval; - const char *result = NULL; - size_t added; - -#ifdef _LIBC - __libc_lock_lock (lock); -#endif - - 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] == ':') - ++locale_alias_path; - start = locale_alias_path; - - while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') - ++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; -{ -#ifndef HAVE_ALLOCA - struct block_list *block_list = NULL; -#endif - FILE *fp; - char *full_fname; - size_t added; - static const char aliasfile[] = "/locale.alias"; - - full_fname = (char *) alloca (fname_len + sizeof aliasfile); - ADD_BLOCK (block_list, full_fname); -#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"); - if (fp == NULL) - { - FREE_BLOCKS (block_list); - return 0; - } - - 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 - */ - unsigned char buf[BUFSIZ]; - unsigned char *alias; - unsigned char *value; - unsigned 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 (cp[0])) - ++cp; - - /* A leading '#' signals a comment line. */ - if (cp[0] != '\0' && cp[0] != '#') - { - alias = cp++; - while (cp[0] != '\0' && !isspace (cp[0])) - ++cp; - /* Terminate alias name. */ - if (cp[0] != '\0') - *cp++ = '\0'; - - /* Now look for the beginning of the value. */ - while (isspace (cp[0])) - ++cp; - - if (cp[0] != '\0') - { - size_t alias_len; - size_t value_len; - - value = cp++; - while (cp[0] != '\0' && !isspace (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) - extend_alias_table (); - - 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) - { - FREE_BLOCKS (block_list); - return added; - } - 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); - - FREE_BLOCKS (block_list); - return added; -} - - -static void -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; - - map = new_map; - maxmap = new_size; -} - - -#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 -} diff --git a/glabels1/intl/po2tbl.sed.in b/glabels1/intl/po2tbl.sed.in deleted file mode 100644 index b3bcca4..0000000 --- a/glabels1/intl/po2tbl.sed.in +++ /dev/null @@ -1,102 +0,0 @@ -# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# 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. -# -1 { - i\ -/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ -\ -#if HAVE_CONFIG_H\ -# include <config.h>\ -#endif\ -\ -#include "libgettext.h"\ -\ -const struct _msg_ent _msg_tbl[] = { - h - s/.*/0/ - x -} -# -# Write msgid entries in C array form. -# -/^msgid/ { - s/msgid[ ]*\(".*"\)/ {\1/ - tb -# Append the next line - :b - N -# Look whether second part is continuation line. - s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ -# Yes, then branch. - ta -# Because we assume that the input file correctly formed the line -# just read cannot be again be a msgid line. So it's safe to ignore -# it. - s/\(.*\)\n.*/\1/ - bc -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ - P -# We cannot use D here. - s/.*\n\(.*\)/\1/ -# Some buggy seds do not clear the `successful substitution since last ``t''' -# flag on `N', so we do a `t' here to clear it. - tb -# Not reached - :c - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x - G - s/\(.*\)\n\([0-9]*\)/\1, \2},/ - s/\(.*\)"$/\1/ - p -} -# -# Last line. -# -$ { - i\ -};\ - - g - s/0*\(.*\)/int _msg_tbl_length = \1;/p -} -d diff --git a/glabels1/intl/textdomain.c b/glabels1/intl/textdomain.c deleted file mode 100644 index 8855746..0000000 --- a/glabels1/intl/textdomain.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Implementation of the textdomain(3) function. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. - - 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. */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include <stdlib.h> -#endif - -#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC -# include <string.h> -#else -# include <strings.h> -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include <libintl.h> -#else -# include "libgettext.h" -#endif - -/* @@ end of prolog @@ */ - -/* Name of the default text domain. */ -extern const char _nl_default_default_domain[]; - -/* Default text domain in which entries for gettext(3) are to be found. */ -extern const char *_nl_current_default_domain; - - -/* 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 textdomain__ -#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". */ -char * -TEXTDOMAIN (domainname) - const char *domainname; -{ - char *old; - - /* A NULL pointer requests the current setting. */ - if (domainname == NULL) - return (char *) _nl_current_default_domain; - - old = (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; - 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 - _nl_current_default_domain = strdup (domainname); -#else - size_t len = strlen (domainname) + 1; - char *cp = (char *) malloc (len); - if (cp != NULL) - memcpy (cp, domainname, len); - _nl_current_default_domain = cp; -#endif - } - - if (old != _nl_default_default_domain) - free (old); - - return (char *) _nl_current_default_domain; -} - -#ifdef _LIBC -/* Alias for function name in GNU C Library. */ -weak_alias (__textdomain, textdomain); -#endif diff --git a/glabels1/intl/xopen-msg.sed b/glabels1/intl/xopen-msg.sed deleted file mode 100644 index b19c0bb..0000000 --- a/glabels1/intl/xopen-msg.sed +++ /dev/null @@ -1,104 +0,0 @@ -# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file -# Copyright (C) 1995 Free Software Foundation, Inc. -# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -# -# 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. -# -# -# The first directive in the .msg should be the definition of the -# message set number. We use always set number 1. -# -1 { - i\ -$set 1 # Automatically created by po2msg.sed - h - s/.*/0/ - x -} -# -# We copy all comments into the .msg file. Perhaps they can help. -# -/^#/ s/^#[ ]*/$ /p -# -# We copy the original message as a comment into the .msg file. -# -/^msgid/ { -# Does not work now -# /"$/! { -# s/\\$// -# s/$/ ... (more lines following)"/ -# } - s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ - p -} -# -# The .msg file contains, other then the .po file, only the translations -# but each given a unique ID. Starting from 1 and incrementing by 1 for -# each message we assign them to the messages. -# It is important that the .po file used to generate the cat-id-tbl.c file -# (with po-to-tbl) is the same as the one used here. (At least the order -# of declarations must not be changed.) -# -/^msgstr/ { - s/msgstr[ ]*"\(.*\)"/\1/ - x -# The following nice solution is by -# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> - td -# Increment a decimal number in pattern space. -# First hide trailing `9' digits. - :d - s/9\(_*\)$/_\1/ - td -# Assure at least one digit is available. - s/^\(_*\)$/0\1/ -# Increment the last digit. - s/8\(_*\)$/9\1/ - s/7\(_*\)$/8\1/ - s/6\(_*\)$/7\1/ - s/5\(_*\)$/6\1/ - s/4\(_*\)$/5\1/ - s/3\(_*\)$/4\1/ - s/2\(_*\)$/3\1/ - s/1\(_*\)$/2\1/ - s/0\(_*\)$/1\1/ -# Convert the hidden `9' digits to `0's. - s/_/0/g - x -# Bring the line in the format `<number> <message>' - G - s/^[^\n]*$/& / - s/\(.*\)\n\([0-9]*\)/\2 \1/ -# Clear flag from last substitution. - tb -# Append the next line. - :b - N -# Look whether second part is a continuation line. - s/\(.*\n\)"\(.*\)"/\1\2/ -# Yes, then branch. - ta - P - D -# Note that `D' includes a jump to the start!! -# We found a continuation line. But before printing insert '\'. - :a - s/\(.*\)\(\n.*\)/\1\\\2/ - P -# We cannot use the sed command `D' here - s/.*\n\(.*\)/\1/ - tb -} -d diff --git a/glabels1/macros/Makefile.am b/glabels1/macros/Makefile.am deleted file mode 100644 index e03dbee..0000000 --- a/glabels1/macros/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -## Please update this variable if any new macros are created -MACROS= \ - aclocal-include.m4 \ - compiler-flags.m4 \ - curses.m4 \ - gnome-bonobo-check.m4 \ - gnome-fileutils.m4 \ - gnome-gettext.m4 \ - gnome-ghttp-check.m4 \ - gnome-gnorba-check.m4 \ - gnome-guile-checks.m4 \ - gnome-libgtop-check.m4 \ - gnome-objc-checks.m4 \ - gnome-orbit-check.m4 \ - gnome-print-check.m4 \ - gnome-pthread-check.m4 \ - gnome-support.m4 \ - gnome-undelfs.m4 \ - gnome-vfs.m4 \ - gnome-x-checks.m4 \ - gnome-xml-check.m4 \ - gnome.m4 \ - linger.m4 \ - need-declaration.m4 - -EXTRA_DIST=$(MACROS) gnome-common.m4 autogen.sh -MAINTAINERCLEANFILES=macros.dep - -@MAINT@macros.dep: Makefile.am -@MAINT@ @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@ - -if INSIDE_GNOME_COMMON -gnome_aclocaldir = $(datadir)/aclocal/gnome - -gnome-macros.dep: Makefile.am - @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@ - -gnome_aclocal_DATA = $(MACROS) gnome-macros.dep gnome-common.m4 autogen.sh - -endif diff --git a/glabels1/macros/Makefile.in b/glabels1/macros/Makefile.in deleted file mode 100644 index f1d35e3..0000000 --- a/glabels1/macros/Makefile.in +++ /dev/null @@ -1,283 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 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 = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ -GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ -GENCAT = @GENCAT@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ -GNOMEUI_LIBS = @GNOMEUI_LIBS@ -GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ -GNOME_CANVAS_PIXBUF_CFLAGS = @GNOME_CANVAS_PIXBUF_CFLAGS@ -GNOME_CANVAS_PIXBUF_LIBS = @GNOME_CANVAS_PIXBUF_LIBS@ -GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ -GNOME_CONFIG = @GNOME_CONFIG@ -GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ -GNOME_LIBDIR = @GNOME_LIBDIR@ -GNOME_LIBS = @GNOME_LIBS@ -GNOME_PRINT_CFLAGS = @GNOME_PRINT_CFLAGS@ -GNOME_PRINT_LIBS = @GNOME_PRINT_LIBS@ -GNOME_XML_CFLAGS = @GNOME_XML_CFLAGS@ -GNOME_XML_LIBS = @GNOME_XML_LIBS@ -GNORBA_CFLAGS = @GNORBA_CFLAGS@ -GNORBA_LIBS = @GNORBA_LIBS@ -GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_CONFIG = @GTK_CONFIG@ -GTK_LIBS = @GTK_LIBS@ -GT_NO = @GT_NO@ -GT_YES = @GT_YES@ -INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -ORBIT_CFLAGS = @ORBIT_CFLAGS@ -ORBIT_CONFIG = @ORBIT_CONFIG@ -ORBIT_IDL = @ORBIT_IDL@ -ORBIT_LIBS = @ORBIT_LIBS@ -PACKAGE = @PACKAGE@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PTHREAD_LIB = @PTHREAD_LIB@ -RANLIB = @RANLIB@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XPM_LIBS = @XPM_LIBS@ -ZVT_LIBS = @ZVT_LIBS@ -cflags_set = @cflags_set@ -cxxflags_set = @cxxflags_set@ -l = @l@ - -MACROS = \ - aclocal-include.m4 \ - compiler-flags.m4 \ - curses.m4 \ - gnome-bonobo-check.m4 \ - gnome-fileutils.m4 \ - gnome-gettext.m4 \ - gnome-ghttp-check.m4 \ - gnome-gnorba-check.m4 \ - gnome-guile-checks.m4 \ - gnome-libgtop-check.m4 \ - gnome-objc-checks.m4 \ - gnome-orbit-check.m4 \ - gnome-print-check.m4 \ - gnome-pthread-check.m4 \ - gnome-support.m4 \ - gnome-undelfs.m4 \ - gnome-vfs.m4 \ - gnome-x-checks.m4 \ - gnome-xml-check.m4 \ - gnome.m4 \ - linger.m4 \ - need-declaration.m4 - - -EXTRA_DIST = $(MACROS) gnome-common.m4 autogen.sh -MAINTAINERCLEANFILES = macros.dep - -@INSIDE_GNOME_COMMON_TRUE@gnome_aclocaldir = @INSIDE_GNOME_COMMON_TRUE@$(datadir)/aclocal/gnome - -@INSIDE_GNOME_COMMON_TRUE@gnome_aclocal_DATA = @INSIDE_GNOME_COMMON_TRUE@$(MACROS) gnome-macros.dep gnome-common.m4 autogen.sh -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -DATA = $(gnome_aclocal_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu macros/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -install-gnome_aclocalDATA: $(gnome_aclocal_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) - @list='$(gnome_aclocal_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ - fi; fi; \ - done - -uninstall-gnome_aclocalDATA: - @$(NORMAL_UNINSTALL) - list='$(gnome_aclocal_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(gnome_aclocaldir)/$$p; \ - done -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = macros - -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 macros/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-gnome_aclocalDATA -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-gnome_aclocalDATA -uninstall: uninstall-am -all-am: Makefile $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) - - -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: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -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: uninstall-gnome_aclocalDATA install-gnome_aclocalDATA 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 - - -@MAINT@macros.dep: Makefile.am -@MAINT@ @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@ - -@INSIDE_GNOME_COMMON_TRUE@gnome-macros.dep: Makefile.am -@INSIDE_GNOME_COMMON_TRUE@ @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@ - -# 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: diff --git a/glabels1/macros/aclocal-include.m4 b/glabels1/macros/aclocal-include.m4 deleted file mode 100644 index abf6533..0000000 --- a/glabels1/macros/aclocal-include.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# aclocal-include.m4 -# -# This macro adds the name macrodir to the set of directories -# that `aclocal' searches for macros. - -# serial 1 - -dnl AM_ACLOCAL_INCLUDE(macrodir) -AC_DEFUN([AM_ACLOCAL_INCLUDE], -[ - AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) - - test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - - for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done -]) diff --git a/glabels1/macros/autogen.sh b/glabels1/macros/autogen.sh deleted file mode 100644 index 7027391..0000000 --- a/glabels1/macros/autogen.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -DIE=0 - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to compile Gnome." - 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 to compile Gnome." - 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 to compile Gnome." - 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 to compile Gnome." - 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 to compile Gnome." - 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 - 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 - 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 || exit 1 -else - echo Skipping configure process. -fi diff --git a/glabels1/macros/compiler-flags.m4 b/glabels1/macros/compiler-flags.m4 deleted file mode 100644 index 278d509..0000000 --- a/glabels1/macros/compiler-flags.m4 +++ /dev/null @@ -1,109 +0,0 @@ -dnl GNOME_COMPILE_WARNINGS -dnl Turn on many useful compiler warnings -dnl For now, only works on GCC -AC_DEFUN([GNOME_COMPILE_WARNINGS],[ - AC_ARG_ENABLE(compile-warnings, - [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum) - - AC_MSG_CHECKING(what warning flags to pass to the C compiler) - warnCFLAGS= - if test "x$GCC" != xyes; then - enable_compile_warnings=no - fi - - if test "x$enable_compile_warnings" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[\ \ ]-Wall[\ \ ]*) ;; - *) warnCFLAGS="-Wall -Wunused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_compile_warnings" = "xyes"; then - warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" - fi - fi - fi - AC_MSG_RESULT($warnCFLAGS) - - AC_ARG_ENABLE(iso-c, - [ --enable-iso-c Try to warn if code is not ISO C ],, - enable_iso_c=no) - - AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) - complCFLAGS= - if test "x$enable_iso_c" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -ansi" ;; - esac - - case " $CFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCFLAGS="$complCFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCFLAGS) - if test "x$cflags_set" != "xyes"; then - CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" - cflags_set=yes - AC_SUBST(cflags_set) - fi -]) - -dnl For C++, do basically the same thing. - -AC_DEFUN([GNOME_CXX_WARNINGS],[ - AC_ARG_ENABLE(cxx-warnings, - [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) - - AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) - warnCXXFLAGS= - if test "x$GCC" != xyes; then - enable_compile_warnings=no - fi - if test "x$enable_cxx_warnings" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-Wall[\ \ ]*) ;; - *) warnCXXFLAGS="-Wall -Wno-unused" ;; - esac - - ## -W is not all that useful. And it cannot be controlled - ## with individual -Wno-xxx flags, unlike -Wall - if test "x$enable_cxx_warnings" = "xyes"; then - warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wshadow -Woverloaded-virtual" - fi - fi - fi - AC_MSG_RESULT($warnCXXFLAGS) - - AC_ARG_ENABLE(iso-cxx, - [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, - enable_iso_cxx=no) - - AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) - complCXXFLAGS= - if test "x$enable_iso_cxx" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CXXFLAGS " in - *[\ \ ]-ansi[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; - esac - - case " $CXXFLAGS " in - *[\ \ ]-pedantic[\ \ ]*) ;; - *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; - esac - fi - fi - AC_MSG_RESULT($complCXXFLAGS) - if test "x$cxxflags_set" != "xyes"; then - CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" - cxxflags_set=yes - AC_SUBST(cxxflags_set) - fi -]) diff --git a/glabels1/macros/curses.m4 b/glabels1/macros/curses.m4 deleted file mode 100644 index 3dd4ffa..0000000 --- a/glabels1/macros/curses.m4 +++ /dev/null @@ -1,318 +0,0 @@ -dnl Curses detection: Munged from Midnight Commander's configure.in -dnl -dnl What it does: -dnl ============= -dnl -dnl - Determine which version of curses is installed on your system -dnl and set the -I/-L/-l compiler entries and add a few preprocessor -dnl symbols -dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that -dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in -dnl Makefile.in's -dnl - Modify the following configure variables (these are the only -dnl curses.m4 variables you can access from within configure.in) -dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if -dnl an ncurses.h that's been renamed to curses.h -dnl is found. -dnl CURSES_LIBS - sets -L and -l's appropriately -dnl CFLAGS - if --with-sco, add -D_SVID3 -dnl has_curses - exports result of tests to rest of configure -dnl -dnl Usage: -dnl ====== -dnl 1) Add lines indicated below to acconfig.h -dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in -dnl 3) Instead of #include <curses.h> you should use the following to -dnl properly locate ncurses or curses header file -dnl -dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) -dnl #include <ncurses.h> -dnl #else -dnl #include <curses.h> -dnl #endif -dnl -dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags -dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS -dnl -dnl Notes with automake: -dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from -dnl configure.in -dnl - your Makefile.am can look something like this -dnl ----------------------------------------------- -dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) -dnl if HAS_CURSES -dnl CURSES_TARGETS=name_of_curses_prog -dnl endif -dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) -dnl other_programs_SOURCES = blah blah blah -dnl name_of_curses_prog_SOURCES = blah blah blah -dnl other_programs_LDADD = blah -dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) -dnl ----------------------------------------------- -dnl -dnl -dnl The following lines should be added to acconfig.h: -dnl ================================================== -dnl -dnl /*=== Curses version detection defines ===*/ -dnl /* Found some version of curses that we're going to use */ -dnl #undef HAS_CURSES -dnl -dnl /* Use SunOS SysV curses? */ -dnl #undef USE_SUNOS_CURSES -dnl -dnl /* Use old BSD curses - not used right now */ -dnl #undef USE_BSD_CURSES -dnl -dnl /* Use SystemV curses? */ -dnl #undef USE_SYSV_CURSES -dnl -dnl /* Use Ncurses? */ -dnl #undef USE_NCURSES -dnl -dnl /* If you Curses does not have color define this one */ -dnl #undef NO_COLOR_CURSES -dnl -dnl /* Define if you want to turn on SCO-specific code */ -dnl #undef SCO_FLAVOR -dnl -dnl /* Set to reflect version of ncurses * -dnl * 0 = version 1.* -dnl * 1 = version 1.9.9g -dnl * 2 = version 4.0/4.1 */ -dnl #undef NCURSES_970530 -dnl -dnl /*=== End new stuff for acconfig.h ===*/ -dnl - - -AC_DEFUN(AC_CHECK_CURSES,[ - search_ncurses=true - screen_manager="" - has_curses=false - - CFLAGS=${CFLAGS--O} - - AC_SUBST(CURSES_LIBS) - AC_SUBST(CURSES_INCLUDEDIR) - - AC_ARG_WITH(sco, - [ --with-sco Use this to turn on SCO-specific code],[ - if test x$withval = xyes; then - AC_DEFINE(SCO_FLAVOR) - CFLAGS="$CFLAGS -D_SVID3" - fi - ]) - - AC_ARG_WITH(sunos-curses, - [ --with-sunos-curses Used to force SunOS 4.x curses],[ - if test x$withval = xyes; then - AC_USE_SUNOS_CURSES - fi - ]) - - AC_ARG_WITH(osf1-curses, - [ --with-osf1-curses Used to force OSF/1 curses],[ - if test x$withval = xyes; then - AC_USE_OSF1_CURSES - fi - ]) - - AC_ARG_WITH(vcurses, - [ --with-vcurses[=incdir] Used to force SysV curses], - if test x$withval != xyes; then - CURSES_INCLUDEDIR="-I$withval" - fi - AC_USE_SYSV_CURSES - ) - - AC_ARG_WITH(ncurses, - [ --with-ncurses[=dir] Compile with ncurses/locate base dir], - if test x$withval = xno ; then - search_ncurses=false - elif test x$withval != xyes ; then - CURSES_LIBS="$LIBS -L$withval/lib -lncurses" - CURSES_INCLUDEDIR="-I$withval/include" - search_ncurses=false - screen_manager="ncurses" - AC_DEFINE(USE_NCURSES) - AC_DEFINE(HAS_CURSES) - has_curses=true - fi - ) - - if $search_ncurses - then - AC_SEARCH_NCURSES() - fi - - -]) - - -AC_DEFUN(AC_USE_SUNOS_CURSES, [ - search_ncurses=false - screen_manager="SunOS 4.x /usr/5include curses" - AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) - AC_DEFINE(USE_SUNOS_CURSES) - AC_DEFINE(HAS_CURSES) - has_curses=true - AC_DEFINE(NO_COLOR_CURSES) - AC_DEFINE(USE_SYSV_CURSES) - CURSES_INCLUDEDIR="-I/usr/5include" - CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" - AC_MSG_RESULT(Please note that some screen refreshs may fail) -]) - -AC_DEFUN(AC_USE_OSF1_CURSES, [ - AC_MSG_RESULT(Using OSF1 curses) - search_ncurses=false - screen_manager="OSF1 curses" - AC_DEFINE(HAS_CURSES) - has_curses=true - AC_DEFINE(NO_COLOR_CURSES) - AC_DEFINE(USE_SYSV_CURSES) - CURSES_LIBS="-lcurses" -]) - -AC_DEFUN(AC_USE_SYSV_CURSES, [ - AC_MSG_RESULT(Using SysV curses) - AC_DEFINE(HAS_CURSES) - has_curses=true - AC_DEFINE(USE_SYSV_CURSES) - search_ncurses=false - screen_manager="SysV/curses" - CURSES_LIBS="-lcurses" -]) - -dnl AC_ARG_WITH(bsd-curses, -dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], -dnl search_ncurses=false -dnl screen_manager="Ultrix/cursesX" -dnl if test $system = ULTRIX -dnl then -dnl THIS_CURSES=cursesX -dnl else -dnl THIS_CURSES=curses -dnl fi -dnl -dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" -dnl AC_DEFINE(HAS_CURSES) -dnl has_curses=true -dnl AC_DEFINE(USE_BSD_CURSES) -dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) -dnl AC_WARN(Use of the bsdcurses extension has some) -dnl AC_WARN(display/input problems.) -dnl AC_WARN(Reconsider using xcurses) -dnl) - - -dnl -dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename -dnl -AC_DEFUN(AC_NCURSES, [ - if $search_ncurses - then - if test -f $1/$2 - then - AC_MSG_RESULT(Found ncurses on $1/$2) - CURSES_LIBS="$3" - CURSES_INCLUDEDIR="$4" - search_ncurses=false - screen_manager=$5 - AC_DEFINE(HAS_CURSES) - has_curses=true - AC_DEFINE(USE_NCURSES) - fi - fi -]) - -AC_DEFUN(AC_SEARCH_NCURSES, [ - AC_CHECKING("location of ncurses.h file") - - AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") - AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") - AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") - AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") - - AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") - - AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") - - dnl - dnl We couldn't find ncurses, try SysV curses - dnl - if $search_ncurses - then - AC_EGREP_HEADER(init_color, /usr/include/curses.h, - AC_USE_SYSV_CURSES) - AC_EGREP_CPP(USE_NCURSES,[ -#include <curses.h> -#ifdef __NCURSES_H -#undef USE_NCURSES -USE_NCURSES -#endif -],[ - CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" - AC_DEFINE(HAS_CURSES) - has_curses=true - AC_DEFINE(USE_NCURSES) - search_ncurses=false - screen_manager="ncurses installed as curses" -]) - fi - - dnl - dnl Try SunOS 4.x /usr/5{lib,include} ncurses - dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES - dnl should be replaced by a more fine grained selection routine - dnl - if $search_ncurses - then - if test -f /usr/5include/curses.h - then - AC_USE_SUNOS_CURSES - fi - else - # check for ncurses version, to properly ifdef mouse-fix - AC_MSG_CHECKING(for ncurses version) - ncurses_version=unknown -cat > conftest.$ac_ext <<EOF -[#]line __oline__ "configure" -#include "confdefs.h" -#ifdef RENAMED_NCURSES -#include <curses.h> -#else -#include <ncurses.h> -#endif -#undef VERSION -VERSION:NCURSES_VERSION -EOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | - egrep "VERSION:" >conftest.out 2>&1; then -changequote(,)dnl - ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` -changequote([,])dnl - fi - rm -rf conftest* - AC_MSG_RESULT($ncurses_version) - case "$ncurses_version" in -changequote(,)dnl - 4.[01]) -changequote([,])dnl - AC_DEFINE(NCURSES_970530,2) - ;; - 1.9.9g) - AC_DEFINE(NCURSES_970530,1) - ;; - 1*) - AC_DEFINE(NCURSES_970530,0) - ;; - esac - fi -]) - - - - - diff --git a/glabels1/macros/gnome-bonobo-check.m4 b/glabels1/macros/gnome-bonobo-check.m4 deleted file mode 100644 index 65e272c..0000000 --- a/glabels1/macros/gnome-bonobo-check.m4 +++ /dev/null @@ -1,150 +0,0 @@ -# Configure paths for Bonobo -# Miguel de Icaza, 99-04-12 -# Stolen from Chris Lahey 99-2-5 -# stolen from Manish Singh again -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_BONOBO ([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for Bonobo, and define BONOBO_CFLAGS and BONOBO_LIBS -dnl -AC_DEFUN([AM_PATH_BONOBO], -[ -dnl -dnl Get the cflags and libraries from the gnome-config script -dnl -AC_ARG_WITH(bonobo-prefix,[ --with-bonobo-prefix=PFX Prefix where Bonobo is installed (optional)], - bonobo_prefix="$withval", bonobo_prefix="") -AC_ARG_WITH(bonobo-exec-prefix,[ --with-bonobo-exec-prefix=PFX Exec prefix where Bonobo is installed (optional)], - bonobo_exec_prefix="$withval", bonobo_exec_prefix="") -AC_ARG_ENABLE(bonobotest, [ --disable-bonobotest Do not try to compile and run a test Bonobo program], - , enable_bonobotest=yes) - - if test x$bonobo_exec_prefix != x ; then - bonobo_args="$bonobo_args --exec-prefix=$bonobo_exec_prefix" - if test x${GNOME_CONFIG+set} != xset ; then - GNOME_CONFIG=$bonobo_exec_prefix/bin/gnome-config - fi - fi - if test x$bonobo_prefix != x ; then - bonobo_args="$bonobo_args --prefix=$bonobo_prefix" - if test x${GNOME_CONFIG+set} != xset ; then - GNOME_CONFIG=$bonobo_prefix/bin/gnome-config - fi - fi - - AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) - min_bonobo_version=ifelse([$1], ,0.1.0,$1) - AC_MSG_CHECKING(for BONOBO - version >= $min_bonobo_version) - no_bonobo="" - if test "$GNOME_CONFIG" = "no" ; then - no_bonobo=yes - else - BONOBO_CFLAGS=`$GNOME_CONFIG $bonoboconf_args --cflags bonobo` - BONOBO_LIBS=`$GNOME_CONFIG $bonoboconf_args --libs bonobo` - - bonobo_major_version=`$GNOME_CONFIG $bonobo_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - bonobo_minor_version=`$GNOME_CONFIG $bonobo_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - bonobo_micro_version=`$GNOME_CONFIG $bonobo_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_bonobotest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $BONOBO_CFLAGS" - LIBS="$LIBS $BONOBO_LIBS" -dnl -dnl Now check if the installed BONOBO is sufficiently new. (Also sanity -dnl checks the results of gnome-config to some extent -dnl - rm -f conf.bonobotest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <bonobo/gnome-object.h> - -static char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.bonobotest"); - gnome_object_get_type (); - return 0; -} - -],, no_bonobo=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_bonobo" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GNOME_CONFIG" = "no" ; then - echo "*** The gnome-config script installed by GNOME-LIBS could not be found" - echo "*** If BONOBO was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GNOME_CONFIG environment variable to the" - echo "*** full path to gnome-config." - else - if test -f conf.bonobotest ; then - : - else - echo "*** Could not run BONOBO test program, checking why..." - CFLAGS="$CFLAGS $BONOBO_CFLAGS" - LIBS="$LIBS $BONOBO_LIBS" - AC_TRY_LINK([ -#include <stdio.h> -#include <bonobo/gnome-object.h> -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding BONOBO or finding the wrong" - echo "*** version of BONOBO. If it is not finding BONOBO, 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 "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means BONOBO was incorrectly installed" - echo "*** or that you have moved BONOBO since it was installed. In the latter case, you" - echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - BONOBO_CFLAGS="" - BONOBO_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(BONOBO_CFLAGS) - AC_SUBST(BONOBO_LIBS) - rm -f conf.bonobotest -]) - -AC_DEFUN([BONOBO_CHECK], [ - AM_PATH_BONOBO(0.1.0,,[AC_MSG_ERROR(BONOBO not found)]) -]) - diff --git a/glabels1/macros/gnome-common.m4 b/glabels1/macros/gnome-common.m4 deleted file mode 100644 index b723829..0000000 --- a/glabels1/macros/gnome-common.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# gnome-common.m4 -# -# This only for packages that are not in the GNOME CVS tree. - -dnl GNOME_COMMON_INIT - -AC_DEFUN([GNOME_COMMON_INIT], -[ - GNOME_ACLOCAL_DIR=`$ACLOCAL --print-ac-dir`/gnome - AC_SUBST(GNOME_ACLOCAL_DIR) - - ACLOCAL="$ACLOCAL -I $GNOME_ACLOCAL_DIR" -]) - diff --git a/glabels1/macros/gnome-fileutils.m4 b/glabels1/macros/gnome-fileutils.m4 deleted file mode 100644 index 7c11a78..0000000 --- a/glabels1/macros/gnome-fileutils.m4 +++ /dev/null @@ -1,414 +0,0 @@ -dnl -dnl GNOME_FILEUTILS_CHECKS -dnl -dnl checks that are needed for the diskusage applet. -dnl - -AC_DEFUN([GNOME_FILEUTILS_CHECKS], -[ -AC_CHECK_HEADERS(fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \ -mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \ -sys/filsys.h sys/fs_types.h sys/fs/s5param.h) - -AC_CHECK_FUNCS(bcopy endgrent endpwent fchdir ftime ftruncate \ -getcwd getmntinfo gettimeofday isascii lchown \ -listmntent memcpy mkfifo strchr strerror strrchr vprintf) - -dnl Set some defaults when cross-compiling - -if test x$cross_compiling = xyes ; then - case "$host_os" in - linux*) - fu_cv_sys_mounted_getmntent1=yes - fu_cv_sys_stat_statfs2_bsize=yes - ;; - sunos*) - fu_cv_sys_stat_statfs4=yes - ;; - freebsd*) - fu_cv_sys_stat_statfs2_bsize=yes - ;; - osf*) - fu_cv_sys_stat_statfs3_osf1=yes - ;; - esac -fi - -# Determine how to get the list of mounted filesystems. -list_mounted_fs= - -# If the getmntent function is available but not in the standard library, -# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). -AC_FUNC_GETMNTENT - -# This test must precede the ones for getmntent because Unicos-9 is -# reported to have the getmntent function, but its support is incompatible -# with other getmntent implementations. - -# NOTE: Normally, I wouldn't use a check for system type as I've done for -# `CRAY' below since that goes against the whole autoconf philosophy. But -# I think there is too great a chance that some non-Cray system has a -# function named listmntent to risk the false positive. - -if test -z "$list_mounted_fs"; then -# Cray UNICOS 9 -AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) -AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent, -[fu_cv_sys_mounted_cray_listmntent=no -AC_EGREP_CPP(yes, -[#ifdef _CRAY -yes -#endif -], [test $ac_cv_func_listmntent = yes \ -&& fu_cv_sys_mounted_cray_listmntent=yes] -) -] -) -AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) -if test $fu_cv_sys_mounted_cray_listmntent = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_LISTMNTENT) -fi -fi - -if test $ac_cv_func_getmntent = yes; then - -# This system has the getmntent function. -# Determine whether it's the one-argument variant or the two-argument one. - -if test -z "$list_mounted_fs"; then -# 4.3BSD, SunOS, HP-UX, Dynix, Irix -AC_MSG_CHECKING([for one-argument getmntent function]) -AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, -[test $ac_cv_header_mntent_h = yes \ -&& fu_cv_sys_mounted_getmntent1=yes \ -|| fu_cv_sys_mounted_getmntent1=no]) -AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) -if test $fu_cv_sys_mounted_getmntent1 = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_GETMNTENT1) -fi -fi - -if test -z "$list_mounted_fs"; then -# SVR4 -AC_MSG_CHECKING([for two-argument getmntent function]) -AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, -[AC_EGREP_HEADER(getmntent, sys/mnttab.h, -fu_cv_sys_mounted_getmntent2=yes, -fu_cv_sys_mounted_getmntent2=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) -if test $fu_cv_sys_mounted_getmntent2 = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_GETMNTENT2) -fi -fi - -if test -z "$list_mounted_fs"; then -AC_MSG_ERROR([could not determine how to read list of mounted filesystems]) -fi - -fi - -if test -z "$list_mounted_fs"; then -# DEC Alpha running OSF/1. -AC_MSG_CHECKING([for getfsstat function]) -AC_CACHE_VAL(fu_cv_sys_mounted_getsstat, -[AC_TRY_LINK([ -#include <sys/types.h> -#include <sys/mount.h> -#include <sys/fs_types.h>], -[struct statfs *stats; -int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ], -fu_cv_sys_mounted_getsstat=yes, -fu_cv_sys_mounted_getsstat=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_getsstat) -if test $fu_cv_sys_mounted_getsstat = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_GETFSSTAT) -fi -fi - -if test -z "$list_mounted_fs"; then -# AIX. -AC_MSG_CHECKING([for mntctl function and struct vmount]) -AC_CACHE_VAL(fu_cv_sys_mounted_vmount, -[AC_TRY_CPP([#include <fshelp.h>], -fu_cv_sys_mounted_vmount=yes, -fu_cv_sys_mounted_vmount=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_vmount) -if test $fu_cv_sys_mounted_vmount = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_VMOUNT) -fi -fi - -if test -z "$list_mounted_fs"; then -# SVR3 -AC_MSG_CHECKING([for FIXME existence of three headers]) -AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, -[AC_TRY_CPP([ -#include <sys/statfs.h> -#include <sys/fstyp.h> -#include <mnttab.h>], -fu_cv_sys_mounted_fread_fstyp=yes, -fu_cv_sys_mounted_fread_fstyp=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) -if test $fu_cv_sys_mounted_fread_fstyp = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_FREAD_FSTYP) -fi -fi - -if test -z "$list_mounted_fs"; then -# 4.4BSD and DEC OSF/1. -AC_MSG_CHECKING([for getmntinfo function]) -AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, -[ -ok= -if test $ac_cv_func_getmntinfo = yes; then -AC_EGREP_HEADER(f_type;, sys/mount.h, -ok=yes) -fi -test -n "$ok" \ -&& fu_cv_sys_mounted_getmntinfo=yes \ -|| fu_cv_sys_mounted_getmntinfo=no -]) -AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) -if test $fu_cv_sys_mounted_getmntinfo = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_GETMNTINFO) -fi -fi - -# FIXME: add a test for netbsd-1.1 here - -if test -z "$list_mounted_fs"; then -# Ultrix -AC_MSG_CHECKING([for getmnt function]) -AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, -[AC_TRY_CPP([ -#include <sys/fs_types.h> -#include <sys/mount.h>], -fu_cv_sys_mounted_getmnt=yes, -fu_cv_sys_mounted_getmnt=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) -if test $fu_cv_sys_mounted_getmnt = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_GETMNT) -fi -fi - -if test -z "$list_mounted_fs"; then -# SVR2 -AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) -AC_CACHE_VAL(fu_cv_sys_mounted_fread, -[AC_TRY_CPP([#include <mnttab.h>], -fu_cv_sys_mounted_fread=yes, -fu_cv_sys_mounted_fread=no)]) -AC_MSG_RESULT($fu_cv_sys_mounted_fread) -if test $fu_cv_sys_mounted_fread = yes; then -list_mounted_fs=found -AC_DEFINE(MOUNTED_FREAD) -fi -fi - -if test -z "$list_mounted_fs"; then -AC_MSG_ERROR([could not determine how to read list of mounted filesystems]) -# FIXME -- no need to abort building the whole package -# Can't build mountlist.c or anything that needs its functions -fi - -AC_CHECKING(how to get filesystem space usage) -space=no - -# Perform only the link test since it seems there are no variants of the -# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) -# because that got a false positive on SCO OSR5. Adding the declaration -# of a `struct statvfs' causes this test to fail (as it should) on such -# systems. That system is reported to work fine with STAT_STATFS4 which -# is what it gets when this test fails. -if test $space = no; then -# SVR4 -AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, -[AC_TRY_LINK([#include <sys/types.h> -#include <sys/statvfs.h>], -[struct statvfs fsd; statvfs (0, &fsd);], -fu_cv_sys_stat_statvfs=yes, -fu_cv_sys_stat_statvfs=no)]) -if test $fu_cv_sys_stat_statvfs = yes; then -space=yes -AC_DEFINE(STAT_STATVFS) -fi -fi - -if test $space = no; then -# DEC Alpha running OSF/1 -AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) -AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, -[AC_TRY_RUN([ -#include <sys/param.h> -#include <sys/types.h> -#include <sys/mount.h> -main () -{ -struct statfs fsd; -fsd.f_fsize = 0; -exit (statfs (".", &fsd, sizeof (struct statfs))); -}], -fu_cv_sys_stat_statfs3_osf1=yes, -fu_cv_sys_stat_statfs3_osf1=no, -fu_cv_sys_stat_statfs3_osf1=no)]) -AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) -if test $fu_cv_sys_stat_statfs3_osf1 = yes; then -space=yes -AC_DEFINE(STAT_STATFS3_OSF1) -fi -fi - -if test $space = no; then -# AIX -AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl -member (AIX, 4.3BSD)]) -AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, -[AC_TRY_RUN([ -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -#ifdef HAVE_SYS_VFS_H -#include <sys/vfs.h> -#endif -main () -{ -struct statfs fsd; -fsd.f_bsize = 0; -exit (statfs (".", &fsd)); -}], -fu_cv_sys_stat_statfs2_bsize=yes, -fu_cv_sys_stat_statfs2_bsize=no, -fu_cv_sys_stat_statfs2_bsize=no)]) -AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) -if test $fu_cv_sys_stat_statfs2_bsize = yes; then -space=yes -AC_DEFINE(STAT_STATFS2_BSIZE) -fi -fi - -if test $space = no; then -# SVR3 -AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) -AC_CACHE_VAL(fu_cv_sys_stat_statfs4, -[AC_TRY_RUN([#include <sys/types.h> -#include <sys/statfs.h> -main () -{ -struct statfs fsd; -exit (statfs (".", &fsd, sizeof fsd, 0)); -}], -fu_cv_sys_stat_statfs4=yes, -fu_cv_sys_stat_statfs4=no, -fu_cv_sys_stat_statfs4=no)]) -AC_MSG_RESULT($fu_cv_sys_stat_statfs4) -if test $fu_cv_sys_stat_statfs4 = yes; then -space=yes -AC_DEFINE(STAT_STATFS4) -fi -fi - -if test $space = no; then -# 4.4BSD and NetBSD -AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl -member (4.4BSD and NetBSD)]) -AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, -[AC_TRY_RUN([#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -main () -{ -struct statfs fsd; -fsd.f_fsize = 0; -exit (statfs (".", &fsd)); -}], -fu_cv_sys_stat_statfs2_fsize=yes, -fu_cv_sys_stat_statfs2_fsize=no, -fu_cv_sys_stat_statfs2_fsize=no)]) -AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) -if test $fu_cv_sys_stat_statfs2_fsize = yes; then -space=yes -AC_DEFINE(STAT_STATFS2_FSIZE) -fi -fi - -if test $space = no; then -# Ultrix -AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) -AC_CACHE_VAL(fu_cv_sys_stat_fs_data, -[AC_TRY_RUN([#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -#ifdef HAVE_SYS_FS_TYPES_H -#include <sys/fs_types.h> -#endif -main () -{ -struct fs_data fsd; -/* Ultrix's statfs returns 1 for success, -0 for not mounted, -1 for failure. */ -exit (statfs (".", &fsd) != 1); -}], -fu_cv_sys_stat_fs_data=yes, -fu_cv_sys_stat_fs_data=no, -fu_cv_sys_stat_fs_data=no)]) -AC_MSG_RESULT($fu_cv_sys_stat_fs_data) -if test $fu_cv_sys_stat_fs_data = yes; then -space=yes -AC_DEFINE(STAT_STATFS2_FS_DATA) -fi -fi - -if test $space = no; then -# SVR2 -AC_TRY_CPP([#include <sys/filsys.h>], -AC_DEFINE(STAT_READ_FILSYS) space=yes) -fi - -if test -n "$list_mounted_fs" && test $space != no; then -DF_PROG="df" -# LIBOBJS="$LIBOBJS fsusage.o" -# LIBOBJS="$LIBOBJS mountlist.o" -fi - -# Check for SunOS statfs brokenness wrt partitions 2GB and larger. -# If <sys/vfs.h> exists and struct statfs has a member named f_spare, -# enable the work-around code in fsusage.c. -AC_MSG_CHECKING([for statfs that truncates block counts]) -AC_CACHE_VAL(fu_cv_sys_truncating_statfs, -[AC_TRY_COMPILE([ -#if !defined(sun) && !defined(__sun) -choke -- this is a workaround for a Sun-specific problem -#endif -#include <sys/types.h> -#include <sys/vfs.h>], -[struct statfs t; long c = *(t.f_spare);], -fu_cv_sys_truncating_statfs=yes, -fu_cv_sys_truncating_statfs=no, -)]) -if test $fu_cv_sys_truncating_statfs = yes; then -AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS) -fi -AC_MSG_RESULT($fu_cv_sys_truncating_statfs) - -AC_CHECKING(for AFS) -test -d /afs && AC_DEFINE(AFS) -]) diff --git a/glabels1/macros/gnome-gettext.m4 b/glabels1/macros/gnome-gettext.m4 deleted file mode 100644 index 1dac989..0000000 --- a/glabels1/macros/gnome-gettext.m4 +++ /dev/null @@ -1,336 +0,0 @@ -# Macro to add for using GNU gettext. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# Modified to never use included libintl. -# Owen Taylor <otaylor@redhat.com>, 12/15/1998 -# -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 5 - -AC_DEFUN(AM_GNOME_WITH_NLS, - [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) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS) -# 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_force_use_gnu_gettext="no" - - 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 gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_CHECK_LIB(intl, gettext, - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)], - gt_cv_func_gettext_libintl=no)]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - - # Added by Martin Baulig 12/15/98 for libc5 systems - if test "$gt_cv_func_gettext_libc" != "yes" \ - && test "$gt_cv_func_gettext_libintl" = "yes"; then - INTLLIBS=-lintl - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - fi - ]) - - if test "$CATOBJEXT" = "NONE"; then - AC_MSG_CHECKING([whether catgets can be used]) - AC_ARG_WITH(catgets, - [ --with-catgets use catgets functions if available], - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) - AC_MSG_RESULT($nls_cv_use_catgets) - - if test "$nls_cv_use_catgets" = "yes"; then - dnl No gettext in C library. Try catgets next. - AC_CHECK_LIB(i, main) - AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) - INTLOBJS="\$(CATOBJS)" - AC_PATH_PROG(GENCAT, gencat, no)dnl -# if test "$GENCAT" != "no"; then -# AC_PATH_PROG(GMSGFMT, gmsgfmt, no) -# if test "$GMSGFMT" = "no"; then -# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) -# fi -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.cat -# INSTOBJEXT=.cat -# DATADIRNAME=lib -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h -# fi - ]) - fi - fi - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" != "yes"; then - AC_DEFINE(ENABLE_NLS) - else - # Unset this variable since we use the non-zero value as a flag. - CATOBJEXT= -# dnl Mark actions used to generate GNU NLS library. -# INTLOBJS="\$(GETTOBJS)" -# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) -# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) -# AC_SUBST(MSGFMT) -# USE_INCLUDED_LIBINTL=yes -# CATOBJEXT=.gmo -# INSTOBJEXT=.mo -# DATADIRNAME=share -# INTLDEPS='$(top_builddir)/intl/libintl.a' -# INTLLIBS=$INTLDEPS -# LIBS=`echo $LIBS | sed -e 's/-lintl//'` -# nls_cv_header_intl=intl/libintl.h -# nls_cv_header_libgt=intl/libgettext.h - fi - - 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 /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) - AC_OUTPUT_COMMANDS( - [case "$CONFIG_FILES" in *po/Makefile.in*) - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile - esac]) - - -# # If this is used in GNU gettext we have to set USE_NLS to `yes' -# # because some of the sources are only built for this goal. -# if test "$PACKAGE" = gettext; then -# USE_NLS=yes -# USE_INCLUDED_LIBINTL=yes -# fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(AM_GNOME_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])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_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -strdup __argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY) - fi - - AM_LC_MESSAGES - AM_GNOME_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - if test "x$LINGUAS" = "x"; then - LINGUAS=$ALL_LINGUAS - fi - for lang in $LINGUAS; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to <locale.h> in the installed <libintl.h> file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include <locale.h>" - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header <locale.h>. Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - test -d intl || mkdir intl - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - 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 *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - ]) - diff --git a/glabels1/macros/gnome-ghttp-check.m4 b/glabels1/macros/gnome-ghttp-check.m4 deleted file mode 100644 index 1fc8578..0000000 --- a/glabels1/macros/gnome-ghttp-check.m4 +++ /dev/null @@ -1,14 +0,0 @@ -AC_DEFUN([GNOME_GHTTP_CHECK],[ - AC_REQUIRE([GNOME_INIT_HOOK]) - GHTTP_LIB= - AC_CHECK_FUNC(connect,,[ - AC_CHECK_LIB(socket,connect, - GHTTP_LIB="-lsocket $GHTTP_LIB",,$GHTTP_LIB)]) - AC_CHECK_FUNC(gethostbyname,,[ - AC_CHECK_LIB(nsl,gethostbyname, - GHTTP_LIB="-lnsl $GHTTP_LIB",,$GHTTP_LIB)]) - AC_CHECK_LIB(ghttp, ghttp_request_new, - GHTTP_LIB="-lghttp $GHTTP_LIB",,-L$gnome_prefix $GHTTP_LIB) - AC_SUBST(GHTTP_LIB) - AC_PROVIDE([GNOME_GHTTP_CHECK]) -]) diff --git a/glabels1/macros/gnome-gnorba-check.m4 b/glabels1/macros/gnome-gnorba-check.m4 deleted file mode 100644 index dbac0a6..0000000 --- a/glabels1/macros/gnome-gnorba-check.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl -dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) -dnl -dnl if failflag is "failure" it aborts if gnorba is not found. -dnl - -AC_DEFUN([GNOME_GNORBA_HOOK],[ - GNOME_ORBIT_HOOK([],$2) - AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ - gnome_cv_gnorba_found=no - if test x$gnome_cv_orbit_found = xyes; then - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - if test -n "$GNORBA_LIBS"; then - gnome_cv_gnorba_found=yes - fi - fi - ]) - AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - AC_SUBST(GNORBA_CFLAGS) - AC_SUBST(GNORBA_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(gnorba library not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_GNORBA_CHECK], [ - GNOME_GNORBA_HOOK([],failure) -]) diff --git a/glabels1/macros/gnome-guile-checks.m4 b/glabels1/macros/gnome-guile-checks.m4 deleted file mode 100644 index 1086d30..0000000 --- a/glabels1/macros/gnome-guile-checks.m4 +++ /dev/null @@ -1,119 +0,0 @@ -dnl -dnl GNOME_CHECK_GUILE (failflag) -dnl -dnl if failflag is "fail" then GNOME_CHECK_GUILE will abort if guile is not found. -dnl - -AC_DEFUN([GNOME_CHECK_GUILE], -[ - saved_ldflags="$LDFLAGS" - saved_cppflags="$CPPFLAGS" - LDFLAGS="$LDFLAGS $GNOME_LIBDIR" - - AC_CHECK_LIB(qthreads,qt_null,[ - QTTHREADS_LIB="-lqthreads" - ],[ - AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt") - ],$LIBS) - AC_SUBST(QTTHREADS_LIB) - - AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap") - AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline",,$TERMCAP_LIB) - - AC_SUBST(TERMCAP_LIB) - AC_SUBST(READLINE_LIB) - - if test "x$cross_compiling" = "xyes" ; then - name_build_guile="$target_alias-guile-config" - else - name_build_guile="guile-config" - fi - - AC_CHECK_PROG(BUILD_GUILE, $name_build_guile, yes, no) - - if test "x$BUILD_GUILE" = "xyes"; then - AC_MSG_CHECKING(whether $name_build_guile works) - if test x`$name_build_guile --version >/dev/null 2>&1 || \ - echo no` = xno; then - BUILD_GUILE=no - fi - AC_MSG_RESULT($BUILD_GUILE) - else - - if test "x$cross_compiling" = "xyes" ; then - name_build_guile="$target_alias-build-guile" - else - name_build_guile="build-guile" - fi - - AC_CHECK_PROG(BUILD_GUILE, $name_build_guile, yes, no) - - if test "x$BUILD_GUILE" = "xyes"; then - AC_MSG_CHECKING(whether $name_build_guile works) - if test x`$name_build_guile --version >/dev/null 2>&1 || \ - echo no` = xno; then - BUILD_GUILE=no - fi - AC_MSG_RESULT($BUILD_GUILE) - fi - fi - - AC_CHECK_LIB(m, sin) - - if test "x$BUILD_GUILE" = "xyes"; then - AC_MSG_CHECKING(for guile libraries) - GUILE_LIBS="`$name_build_guile link`" - AC_MSG_RESULT($GUILE_LIBS) - AC_MSG_CHECKING(for guile headers) - GUILE_INCS="`$name_build_guile compile`" - AC_MSG_RESULT($GUILE_INCS) - else - GUILE_LIBS="$GNOME_LIBDIR" - GUILE_INCS="$GNOME_INCLUDEDIR" - AC_CHECK_LIB(rx, main, GUILE_LIBS="-lrx $GUILE_LIBS") - AC_CHECK_LIB(qt, qt_null, GUILE_LIBS="-lqt $GUILE_LIBS") - AC_CHECK_LIB(dl, dlopen, GUILE_LIBS="-ldl $GUILE_LIBS") - AC_CHECK_LIB(nsl, t_accept, GUILE_LIBS="$GUILE_LIBS -lnsl") - AC_CHECK_LIB(socket, socket, GUILE_LIBS="$GUILE_LIBS -lsocket") - GUILE_LIBS="-lguile $GUILE_LIBS $QTTHREADS_LIB $READLINE_LIB $TERMCAP_LIB" - fi - - AC_SUBST(GUILE_LIBS) - AC_SUBST(GUILE_INCS) - - saved_LIBS="$LIBS" - LIBS="$LIBS $GUILE_LIBS" - CPPFLAGS="$saved_cppflags $GUILE_INCS" - - AC_MSG_CHECKING(whether guile works) - AC_TRY_LINK([ - #include <libguile.h> - #include <guile/gh.h> - ],[ - gh_eval_str("(newline)"); - scm_boot_guile(0,NULL,NULL,NULL); - ],[ - ac_cv_guile_found=yes - AC_DEFINE(HAVE_GUILE) - ],[ - ac_cv_guile_found=no - ]) - AC_MSG_RESULT($ac_cv_guile_found) - - if test x$ac_cv_guile_found = xno ; then - if test x$1 = xfail ; then - AC_MSG_ERROR(Can not find Guile on this system) - else - AC_MSG_WARN(Can not find Guile on this system) - fi - ac_cv_guile_found=no - GUILE_LIBS= GUILE_INCS= - fi - - LIBS="$saved_LIBS" - LDFLAGS="$saved_ldflags" - CPPFLAGS="$saved_cppflags" - - AC_SUBST(GUILE_LIBS) - AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes) -]) diff --git a/glabels1/macros/gnome-libgtop-check.m4 b/glabels1/macros/gnome-libgtop-check.m4 deleted file mode 100644 index 81fbb60..0000000 --- a/glabels1/macros/gnome-libgtop-check.m4 +++ /dev/null @@ -1,182 +0,0 @@ -dnl -dnl GNOME_LIBGTOP_TYPES -dnl -dnl some typechecks for libgtop. -dnl - -AC_DEFUN([GNOME_LIBGTOP_TYPES], -[ - AC_CHECK_TYPE(u_int64_t, unsigned long long int) - AC_CHECK_TYPE(int64_t, long long int) -]) - -dnl -dnl GNOME_LIBGTOP_HOOK (minversion, script-if-libgtop-enabled, failflag) -dnl -dnl if failflag is "fail" then GNOME_LIBGTOP_HOOK will abort if LibGTop -dnl is not found. -dnl - -AC_DEFUN([GNOME_LIBGTOP_HOOK], -[ - AC_REQUIRE([GNOME_LIBGTOP_TYPES]) - - AC_SUBST(LIBGTOP_LIBDIR) - AC_SUBST(LIBGTOP_INCLUDEDIR) - AC_SUBST(LIBGTOP_EXTRA_LIBS) - AC_SUBST(LIBGTOP_LIBS) - AC_SUBST(LIBGTOP_INCS) - AC_SUBST(LIBGTOP_NAMES_LIBS) - AC_SUBST(LIBGTOP_NAMES_INCS) - AC_SUBST(LIBGTOP_GUILE_INCS) - AC_SUBST(LIBGTOP_GUILE_LIBS) - AC_SUBST(LIBGTOP_GUILE_NAMES_INCS) - AC_SUBST(LIBGTOP_GUILE_NAMES_LIBS) - AC_SUBST(LIBGTOP_MAJOR_VERSION) - AC_SUBST(LIBGTOP_MINOR_VERSION) - AC_SUBST(LIBGTOP_MICRO_VERSION) - AC_SUBST(LIBGTOP_VERSION) - AC_SUBST(LIBGTOP_VERSION_CODE) - AC_SUBST(LIBGTOP_SERVER_VERSION) - AC_SUBST(LIBGTOP_INTERFACE_AGE) - AC_SUBST(LIBGTOP_BINARY_AGE) - AC_SUBST(LIBGTOP_BINDIR) - AC_SUBST(LIBGTOP_SERVER) - - dnl Get the cflags and libraries from the libgtop-config script - dnl - AC_ARG_WITH(libgtop, - [ --with-libgtop=PFX Prefix where LIBGTOP is installed (optional)], - libgtop_config_prefix="$withval", libgtop_config_prefix="") - AC_ARG_WITH(libgtop-exec, - [ --with-libgtop-exec=PFX Exec prefix where LIBGTOP is installed (optional)], - libgtop_config_exec_prefix="$withval", libgtop_config_exec_prefix="") - - if test x$libgtop_config_exec_prefix != x ; then - libgtop_config_args="$libgtop_config_args --exec-prefix=$libgtop_config_exec_prefix" - if test x${LIBGTOP_CONFIG+set} != xset ; then - LIBGTOP_CONFIG=$libgtop_config_exec_prefix/bin/libgtop-config - fi - fi - if test x$libgtop_config_prefix != x ; then - libgtop_config_args="$libgtop_config_args --prefix=$libgtop_config_prefix" - if test x${LIBGTOP_CONFIG+set} != xset ; then - LIBGTOP_CONFIG=$libgtop_config_prefix/bin/libgtop-config - fi - fi - - AC_PATH_PROG(LIBGTOP_CONFIG, libgtop-config, no) - dnl IMPORTANT NOTICE: - dnl If you increase this number here, this means that *ALL* - dnl modules will require the new version, even if they explicitly - dnl give a lower number in their `configure.in' !!! - real_min_libgtop_version=1.0.0 - min_libgtop_version=ifelse([$1], ,$real_min_libgtop_version,$1) - dnl I know, the following code looks really ugly, but if you want - dnl to make changes, please test it with a brain-dead /bin/sh and - dnl with a brain-dead /bin/test (not all shells/tests support the - dnl `<' operator to compare strings, that's why I convert everything - dnl into numbers and test them). - min_libgtop_major=`echo $min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - min_libgtop_minor=`echo $min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - min_libgtop_micro=`echo $min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - test x$min_libgtop_micro = x && min_libgtop_micro=0 - real_min_libgtop_major=`echo $real_min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - real_min_libgtop_minor=`echo $real_min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - real_min_libgtop_micro=`echo $real_min_libgtop_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - test x$real_min_libgtop_micro = x && real_min_libgtop_micro=0 - dnl You cannot require a version less then $real_min_libgtop_version, - dnl so you don't need to update each `configure.in' when it's increased. - if test $real_min_libgtop_major -gt $min_libgtop_major ; then - min_libgtop_major=$real_min_libgtop_major - min_libgtop_minor=$real_min_libgtop_minor - min_libgtop_micro=$real_min_libgtop_micro - elif test $real_min_libgtop_major = $min_libgtop_major ; then - if test $real_min_libgtop_minor -gt $min_libgtop_minor ; then - min_libgtop_minor=$real_min_libgtop_minor - min_libgtop_micro=$real_min_libgtop_micro - elif test $real_min_libgtop_minor = $min_libgtop_minor ; then - if test $real_min_libgtop_micro -gt $min_libgtop_micro ; then - min_libgtop_micro=$real_min_libgtop_micro - fi - fi - fi - min_libgtop_version="$min_libgtop_major.$min_libgtop_minor.$min_libgtop_micro" - AC_MSG_CHECKING(for libgtop - version >= $min_libgtop_version) - no_libgtop="" - if test "$LIBGTOP_CONFIG" = "no" ; then - no_libgtop=yes - else - configfile=`$LIBGTOP_CONFIG --config` - libgtop_major_version=`$LIBGTOP_CONFIG --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - libgtop_minor_version=`$LIBGTOP_CONFIG --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - libgtop_micro_version=`$LIBGTOP_CONFIG --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - test $libgtop_major_version != $min_libgtop_major && no_libgtop=yes - test $libgtop_minor_version -lt $min_libgtop_minor && no_libgtop=yes - if test $libgtop_minor_version = $min_libgtop_minor ; then - test $libgtop_micro_version -lt $min_libgtop_micro && no_libgtop=yes - fi - . $configfile - fi - if test x$no_libgtop = x ; then - AC_DEFINE(HAVE_LIBGTOP) - AC_DEFINE_UNQUOTED(LIBGTOP_VERSION, "$LIBGTOP_VERSION") - AC_DEFINE_UNQUOTED(LIBGTOP_VERSION_CODE, $LIBGTOP_VERSION_CODE) - AC_DEFINE_UNQUOTED(LIBGTOP_MAJOR_VERSION, $LIBGTOP_MAJOR_VERSION) - AC_DEFINE_UNQUOTED(LIBGTOP_MINOR_VERSION, $LIBGTOP_MINOR_VERSION) - AC_DEFINE_UNQUOTED(LIBGTOP_MICRO_VERSION, $LIBGTOP_MICRO_VERSION) - AC_DEFINE_UNQUOTED(LIBGTOP_SERVER_VERSION, $LIBGTOP_SERVER_VERSION) - AC_MSG_RESULT(yes) - dnl Note that an empty true branch is not valid sh syntax. - ifelse([$2], [], :, [$2]) - else - AC_MSG_RESULT(no) - if test "x$3" = "xfail"; then - AC_MSG_ERROR(LibGTop >= $min_libgtop_version not found) - else - AC_MSG_WARN(LibGTop >= $min_libgtop_version not found) - fi - fi - - AM_CONDITIONAL(HAVE_LIBGTOP, test x$no_libgtop != xyes) -]) - -AC_DEFUN([GNOME_INIT_LIBGTOP],[ - GNOME_LIBGTOP_HOOK($1,[ifelse([$3], [], :, [$3])],$2) -]) - -dnl -dnl GNOME_LIBGTOP_DOCU -dnl -dnl checks whether the documentation of LibGTop is installed -dnl - -AC_DEFUN([GNOME_LIBGTOP_DOCU], -[ - AC_REQUIRE([GNOME_LIBGTOP_HOOK]) - - helpdir="$LIBGTOP_DATADIR/gnome/help/libgtop" - - AC_MSG_CHECKING(whether you have the LibGTop Documentation) - - if test -f "$helpdir/C/topic.dat" ; then - have_libgtop_docu=yes - AC_DEFINE(HAVE_LIBGTOP_DOCU) - else - have_libgtop_docu=no - fi - - AC_MSG_RESULT($have_libgtop_docu) - - AM_CONDITIONAL(HAVE_LIBGTOP_DOCU, test x$have_libgtop_docu = xyes) -]) - diff --git a/glabels1/macros/gnome-objc-checks.m4 b/glabels1/macros/gnome-objc-checks.m4 deleted file mode 100644 index dc9691c..0000000 --- a/glabels1/macros/gnome-objc-checks.m4 +++ /dev/null @@ -1,79 +0,0 @@ -AC_DEFUN([GNOME_CHECK_OBJC], -[ -dnl Look for an ObjC compiler. -dnl FIXME: extend list of possible names of ObjC compilers. - AC_CHECK_PROGS(OBJC, $OBJC egcs, "") - if test "x$OBJC" = "x" ; then - AC_CHECK_PROGS(OBJC, $OBJC egcc, "") - if test "x$OBJC" = "x" ; then - AC_CHECK_PROGS(OBJC, $OBJC gcc, "") - fi - fi - - AC_REQUIRE([GNOME_PTHREAD_CHECK]) - - OBJC_LIBS="-lobjc $PTHREAD_LIB" - AC_CHECK_FUNC(sched_yield,,[ - AC_CHECK_LIB(posix4,sched_yield, - OBJC_LIBS="$OBJC_LIBS -lposix4",, $OBJC_LIBS)]) - AC_SUBST(OBJC_LIBS) - - AC_CACHE_CHECK([if Objective C compiler ($OBJC) works], - ac_cv_prog_objc_works, [ - if test -n "$OBJC"; then - cat > conftest.m <<EOF -#include <objc/Object.h> -@interface myRandomObj : Object -{ -} -@end -@implementation myRandomObj -@end -int main () { - /* No, you are not seeing double. Remember that square brackets - are the autoconf m4 quotes. */ - id myid = [[myRandomObj alloc]]; - [[myid free]]; - return 0; -} -EOF - - $OBJC $CFLAGS -o conftest $LDFLAGS conftest.m $OBJC_LIBS 1>&AC_FD_CC 2>&1 - result=$? - rm -f conftest* - - if test $result -eq 0; then - ac_cv_prog_objc_works=yes - fi - else - ac_cv_prog_objc_works=no - fi - ]) - - AM_CONDITIONAL(OBJECTIVE_C, test x$ac_cv_prog_objc_works = xyes) - dnl Also set the shell variable OBJECTIVE_C to "yes" or "no". - OBJECTIVE_C=$ac_cv_prog_objc_works -]) - -AC_DEFUN([GNOME_INIT_OBJC], -[ - AC_MSG_CHECKING(for an obGnomeConf.sh) - my_gnome_libdir=`$GNOME_CONFIG --libdir` - if test -f $my_gnome_libdir/obGnomeConf.sh; then - . $my_gnome_libdir/obGnomeConf.sh - AC_MSG_RESULT(found $my_gnome_libdir) - ac_cv_have_gnome_objc=yes - else - AC_MSG_RESULT(not found) - AC_MSG_WARN(Could not find the obGnomeConf.sh file that is generated by gnome-objc install) - ac_cv_have_gnome_objc=no - fi - - dnl Add a conditional on whether or not we have gnome-objc - AM_CONDITIONAL(HAVE_GNOME_OBJC, test x$ac_cv_have_gnome_objc = xyes) - HAVE_GNOME_OBJC=$ac_cv_have_gnome_objc - - AC_SUBST(OBGNOME_INCLUDEDIR) - AC_SUBST(OBGNOME_LIBS) - AC_SUBST(OBGTK_LIBS) -]) diff --git a/glabels1/macros/gnome-orbit-check.m4 b/glabels1/macros/gnome-orbit-check.m4 deleted file mode 100644 index 54bf33a..0000000 --- a/glabels1/macros/gnome-orbit-check.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) -dnl -dnl if failflag is "failure" it aborts if orbit is not found. -dnl - -AC_DEFUN([GNOME_ORBIT_HOOK],[ - AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) - AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) - AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ - if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then - gnome_cv_orbit_found=no - else - gnome_cv_orbit_found=yes - fi - ]) - AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - ORBIT_CFLAGS=`orbit-config --cflags client server` - ORBIT_LIBS=`orbit-config --use-service=name --libs client server` - AC_SUBST(ORBIT_CFLAGS) - AC_SUBST(ORBIT_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(ORBit not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_ORBIT_CHECK], [ - GNOME_ORBIT_HOOK([],failure) -]) diff --git a/glabels1/macros/gnome-print-check.m4 b/glabels1/macros/gnome-print-check.m4 deleted file mode 100644 index 7d98281..0000000 --- a/glabels1/macros/gnome-print-check.m4 +++ /dev/null @@ -1,171 +0,0 @@ -# Configure paths for GNOME-PRINT -# Chris Lahey 99-2-5 -# stolen from Manish Singh again -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_GNOME_PRINT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GNOME-PRINT, and define GNOME_PRINT_CFLAGS and GNOME_PRINT_LIBS -dnl -AC_DEFUN(AM_PATH_GNOME_PRINT, -[dnl -dnl Get the cflags and libraries from the gnome-config script -dnl -AC_ARG_WITH(gnome-print-prefix,[ --with-gnome-print-prefix=PFX Prefix where GNOME-PRINT is installed (optional)], - gnome_print_prefix="$withval", gnome_print_prefix="") -AC_ARG_WITH(gnome-print-exec-prefix,[ --with-gnome-print-exec-prefix=PFX Exec prefix where GNOME-PRINT is installed (optional)], - gnome_print_exec_prefix="$withval", gnome_print_exec_prefix="") -AC_ARG_ENABLE(gnome-printtest, [ --disable-gnome-printtest Do not try to compile and run a test GNOME-PRINT program], - , enable_gnome_printtest=yes) - - if test x$gnome_print_exec_prefix != x ; then - gnome_print_args="$gnome_print_args --exec-prefix=$gnome_print_exec_prefix" - if test x${GNOME_CONFIG+set} != xset ; then - GNOME_CONFIG=$gnome_print_exec_prefix/bin/gnome-config - fi - fi - if test x$gnome_print_prefix != x ; then - gnome_print_args="$gnome_print_args --prefix=$gnome_print_prefix" - if test x${GNOME_CONFIG+set} != xset ; then - GNOME_CONFIG=$gnome_print_prefix/bin/gnome-config - fi - fi - - AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) - min_gnome_print_version=ifelse([$1], ,0.1.0,$1) - AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_gnome_print_version) - no_gnome_print="" - if test "$GNOME_CONFIG" = "no" ; then - no_gnome_print=yes - else - GNOME_PRINT_CFLAGS=`$GNOME_CONFIG $gnome_printconf_args --cflags print` - GNOME_PRINT_LIBS=`$GNOME_CONFIG $gnome_printconf_args --libs print` - - gnome_print_major_version=`$GNOME_CONFIG $gnome_print_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gnome_print_minor_version=`$GNOME_CONFIG $gnome_print_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gnome_print_micro_version=`$GNOME_CONFIG $gnome_print_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gnome_printtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS" - LIBS="$LIBS $GNOME_PRINT_LIBS" -dnl -dnl Now check if the installed GNOME-PRINT is sufficiently new. (Also sanity -dnl checks the results of gnome-config to some extent -dnl - rm -f conf.gnome_printtest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <libgnomeprint/gnome-print.h> - -static char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gnome_printtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_gnome_print_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gnome_print_version"); - exit(1); - } - return 0; -#if 0 - if (($gnome_print_major_version > major) || - (($gnome_print_major_version == major) && ($gnome_print_minor_version > minor)) || - (($gnome_print_major_version == major) && ($gnome_print_minor_version == minor) && ($gnome_print_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'gnome-config print --version' returned %d.%d.%d, but the minimum version\n", $gnome_print_major_version, $gnome_print_minor_version, $gnome_print_micro_version); - printf("*** of GNOME-PRINT required is %d.%d.%d. If gnome-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If gnome-config was wrong, set the environment variable GNOME_CONFIG\n"); - printf("*** to point to the correct copy of gnome-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -#endif -} - -],, no_gnome_print=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gnome_print" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GNOME_CONFIG" = "no" ; then - echo "*** The gnome-config script installed by GNOME-LIBS could not be found" - echo "*** If GNOME-PRINT was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GNOME_CONFIG environment variable to the" - echo "*** full path to gnome-config." - else - if test -f conf.gnome_printtest ; then - : - else - echo "*** Could not run GNOME-PRINT test program, checking why..." - CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS" - LIBS="$LIBS $GNOME_PRINT_LIBS" - AC_TRY_LINK([ -#include <stdio.h> -#include <libgnomeprint/gnome-print.h> -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GNOME-PRINT or finding the wrong" - echo "*** version of GNOME-PRINT. If it is not finding GNOME-PRINT, 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 "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GNOME-PRINT was incorrectly installed" - echo "*** or that you have moved GNOME-PRINT since it was installed. In the latter case, you" - echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GNOME_PRINT_CFLAGS="" - GNOME_PRINT_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GNOME_PRINT_CFLAGS) - AC_SUBST(GNOME_PRINT_LIBS) - rm -f conf.gnome_printtest -]) - -AC_DEFUN([GNOME_PRINT_CHECK], [ - AM_PATH_GNOME_PRINT(0.1.0,,[AC_MSG_ERROR(GNOME-PRINT not found)]) -]) diff --git a/glabels1/macros/gnome-pthread-check.m4 b/glabels1/macros/gnome-pthread-check.m4 deleted file mode 100644 index a4eb3b4..0000000 --- a/glabels1/macros/gnome-pthread-check.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl -dnl And better, use gthreads instead... -dnl - -AC_DEFUN([GNOME_PTHREAD_CHECK],[ - PTHREAD_LIB="" - AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", - [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", - [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", - [AC_CHECK_FUNC(pthread_create)] - )] - )] - ) - AC_SUBST(PTHREAD_LIB) - AC_PROVIDE([GNOME_PTHREAD_CHECK]) -]) diff --git a/glabels1/macros/gnome-support.m4 b/glabels1/macros/gnome-support.m4 deleted file mode 100644 index 2c1d049..0000000 --- a/glabels1/macros/gnome-support.m4 +++ /dev/null @@ -1,68 +0,0 @@ -dnl GNOME_SUPPORT_CHECKS -dnl Check for various support functions needed by the standard -dnl Gnome libraries. Sets LIBOBJS, might define some macros. -dnl This should only be used when building the Gnome libs; -dnl Gnome clients should not need this macro. -AC_DEFUN([GNOME_SUPPORT_CHECKS],[ - # we need an `awk' to build `gnomesupport.h' - AC_REQUIRE([AC_PROG_AWK]) - - # this should go away soon - need_gnome_support=yes - - save_LIBOBJS="$LIBOBJS" - LIBOBJS= - - AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o") - - # for `scandir' - AC_HEADER_DIRENT - - # copied from `configure.in' of `libiberty' - vars="program_invocation_short_name program_invocation_name sys_errlist" - for v in $vars; do - AC_MSG_CHECKING([for $v]) - AC_CACHE_VAL(gnome_cv_var_$v, - [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;], - [eval "gnome_cv_var_$v=yes"], - [eval "gnome_cv_var_$v=no"])]) - if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then - AC_MSG_RESULT(yes) - n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - AC_DEFINE_UNQUOTED($n) - else - AC_MSG_RESULT(no) - fi - done - - AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen) - AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf) - - AC_CHECK_FUNCS(realpath,,LIBOBJS="$LIBOBJS canonicalize.o") - - # to include `error.c' error.c has some HAVE_* checks - AC_CHECK_FUNCS(vprintf doprnt strerror_r) - AM_FUNC_ERROR_AT_LINE - - # This is required if we declare setreuid () and setregid (). - AC_TYPE_UID_T - - # see if we need to declare some functions. Solaris is notorious for - # putting functions into the `libc' but not listing them in the headers - AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h) - GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize) - GCC_NEED_DECLARATION(scandir,[ -#ifdef HAVE_DIRENT_H -#include <dirent.h> -#endif -]) - - # Turn our LIBOBJS into libtool objects. This is gross, but it - # requires changes to autoconf before it goes away. - LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` - AC_SUBST(need_gnome_support) - AC_SUBST(LTLIBOBJS) - - LIBOBJS="$save_LIBOBJS" - AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes) -]) diff --git a/glabels1/macros/gnome-undelfs.m4 b/glabels1/macros/gnome-undelfs.m4 deleted file mode 100644 index c8ea6f4..0000000 --- a/glabels1/macros/gnome-undelfs.m4 +++ /dev/null @@ -1,20 +0,0 @@ -dnl GNOME_UNDELFS_CHECKS -dnl Check for ext2fs undel support. -dnl Set shell variable ext2fs_undel to "yes" if we have it, -dnl "no" otherwise. May define USE_EXT2FSLIB for cpp. -dnl Will set EXT2FS_UNDEL_LIBS to required libraries. - -AC_DEFUN([GNOME_UNDELFS_CHECKS], [ - AC_CHECK_HEADERS(ext2fs/ext2fs.h linux/ext2_fs.h) - ext2fs_undel=no - EXT2FS_UNDEL_LIBS= - if test x$ac_cv_header_ext2fs_ext2fs_h = xyes - then - if test x$ac_cv_header_linux_ext2_fs_h = xyes - then - AC_DEFINE(USE_EXT2FSLIB) - ext2fs_undel=yes - EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err" - fi - fi -]) diff --git a/glabels1/macros/gnome-vfs.m4 b/glabels1/macros/gnome-vfs.m4 deleted file mode 100644 index 8ca361f..0000000 --- a/glabels1/macros/gnome-vfs.m4 +++ /dev/null @@ -1,120 +0,0 @@ -dnl GNOME_VFS_CHECKS -dnl Check for various functions needed by libvfs. -dnl This has various effects: -dnl Sets GNOME_VFS_LIBS to libraries required -dnl Sets termnet to true or false depending on whether it is required. -dnl If yes, defines USE_TERMNET. -dnl Sets vfs_flags to "pretty" list of vfs implementations we include. -dnl Sets shell variable use_vfs to yes (default, --with-vfs) or -dnl "no" (--without-vfs). -dnl Calls AC_SUBST(mcserv), which is either empty or "mcserv". - -dnl Private define -AC_DEFUN([GNOME_WITH_VFS],[ - dnl FIXME: network checks should probably be in their own macro. - AC_CHECK_LIB(nsl, t_accept) - AC_CHECK_LIB(socket, socket) - - have_socket=no - AC_CHECK_FUNCS(socket, have_socket=yes) - if test $have_socket = no; then - # socket is not in the default libraries. See if it's in some other. - for lib in bsd socket inet; do - AC_CHECK_LIB($lib, socket, [ - LIBS="$LIBS -l$lib" - have_socket=yes - AC_DEFINE(HAVE_SOCKET) - break]) - done - fi - - have_gethostbyname=no - AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes) - if test $have_gethostbyname = no; then - # gethostbyname is not in the default libraries. See if it's in some other. - for lib in bsd socket inet; do - AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break]) - done - fi - - vfs_flags="tarfs" - use_net_code=false - if test $have_socket = yes; then - AC_STRUCT_LINGER - AC_CHECK_FUNCS(pmap_set, , [ - AC_CHECK_LIB(rpc, pmap_set, [ - LIBS="-lrpc $LIBS" - AC_DEFINE(HAVE_PMAP_SET) - ])]) - AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport) - dnl add for source routing support setsockopt - AC_CHECK_HEADERS(rpc/pmap_clnt.h) - vfs_flags="$vfs_flags, mcfs, ftpfs, fish" - use_net_code=true - fi - - dnl - dnl Samba support - dnl - smbfs="" - SAMBAFILES="" - AC_ARG_WITH(samba, - [--with-samba Support smb virtual file system],[ - if test "x$withval" != "xno"; then - AC_DEFINE(WITH_SMBFS) - vfs_flags="$vfs_flags, smbfs" - smbfs="smbfs.o" - SAMBAFILES="\$(SAMBAFILES)" - fi - ]) - AC_SUBST(smbfs) - AC_SUBST(SAMBAFILES) - - dnl - dnl The termnet support - dnl - termnet=false - AC_ARG_WITH(termnet, - [--with-termnet If you want a termified net support],[ - if test x$withval = xyes; then - AC_DEFINE(USE_TERMNET) - termnet=true - fi - ]) - - TERMNET="" - AC_DEFINE(USE_VFS) - if $use_net_code; then - AC_DEFINE(USE_NETCODE) - fi - mcserv= - if test $have_socket = yes; then - mcserv="mcserv" - if $termnet; then - TERMNET="-ltermnet" - fi - fi - - AC_SUBST(TERMNET) - AC_SUBST(mcserv) - -dnl FIXME: -dnl GNOME_VFS_LIBS= - -]) - -AC_DEFUN([GNOME_VFS_CHECKS],[ - use_vfs=yes - AC_ARG_WITH(vfs, - [--with-vfs Compile with the VFS code], - use_vfs=$withval - ) - case $use_vfs in - yes) GNOME_WITH_VFS;; - no) use_vfs=no;; - *) use_vfs=no;; - dnl Should we issue a warning? - esac -]) - - diff --git a/glabels1/macros/gnome-x-checks.m4 b/glabels1/macros/gnome-x-checks.m4 deleted file mode 100644 index 1e397ef..0000000 --- a/glabels1/macros/gnome-x-checks.m4 +++ /dev/null @@ -1,80 +0,0 @@ -dnl GNOME_X_CHECKS -dnl -dnl Basic X11 related checks for X11. At the end, the following will be -dnl defined/changed: -dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK -dnl CPPFLAGS Will include $X_CFLAGS -dnl GNOME_HAVE_SM `true' or `false' depending on whether session -dnl management is available. It is available if -dnl both -lSM and X11/SM/SMlib.h exist. (Some -dnl Solaris boxes have the library but not the header) -dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" -dnl -dnl The following configure cache variables are defined (but not used): -dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} -dnl -AC_DEFUN([GNOME_X_CHECKS], -[ - AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) - dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could - dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" - dnl - dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses - dnl CPPFLAGS, not CFLAGS - CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" - - saved_ldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS $GTK_LIBS" - - gnome_cv_passdown_x_libs="$GTK_LIBS" - gnome_cv_passdown_X_LIBS="$GTK_LIBS" - gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" - gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" - - LDFLAGS="$saved_ldflags $GTK_LIBS" - -dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. - USE_DEVGTK=true - -dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) -dnl AC_EGREP_CPP(answer_affirmatively, -dnl [#include <gtk/gtkfeatures.h> -dnl #ifdef GTK_HAVE_FEATURES_1_1_0 -dnl answer_affirmatively -dnl #endif -dnl ], dev_gtk=yes, dev_gtk=no) -dnl if test "$dev_gtk" = "yes"; then -dnl USE_DEVGTK=true -dnl fi -dnl AC_MSG_RESULT("$dev_gtk") - - GNOME_HAVE_SM=true - case "$GTK_LIBS" in - *-lSM*) - dnl Already found it. - ;; - *) - dnl Assume that if we have -lSM then we also have -lICE. - AC_CHECK_LIB(SM, SmcSaveYourselfDone, - [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, - $x_libs -lICE) - ;; - esac - - if test "$GNOME_HAVE_SM" = true; then - AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) - fi - - if test "$GNOME_HAVE_SM" = true; then - AC_DEFINE(HAVE_LIBSM) - fi - - XPM_LIBS="" - AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) - AC_SUBST(XPM_LIBS) - - AC_REQUIRE([GNOME_PTHREAD_CHECK]) - LDFLAGS="$saved_ldflags" - - AC_PROVIDE([GNOME_X_CHECKS]) -]) diff --git a/glabels1/macros/gnome-xml-check.m4 b/glabels1/macros/gnome-xml-check.m4 deleted file mode 100644 index 1caad10..0000000 --- a/glabels1/macros/gnome-xml-check.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl GNOME_XML_HOOK (script-if-xml-found, failflag) -dnl -dnl If failflag is "failure", script aborts due to lack of XML -dnl -dnl Check for availability of the libxml library -dnl the XML parser uses libz if available too -dnl - -AC_DEFUN([GNOME_XML_HOOK],[ - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = no; then - if test x$2 = xfailure; then - AC_MSG_ERROR(Could not find gnome-config) - fi - fi - GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml` - AC_SUBST(GNOME_XML_CFLAGS) - AC_CHECK_LIB(xml, xmlNewDoc, [ - $1 - GNOME_XML_LIB=`$GNOME_CONFIG --libs xml` - ], [ - if test x$2 = xfailure; then - AC_MSG_ERROR(Could not link sample xml program) - fi - ], `$GNOME_CONFIG --libs xml`) - AC_SUBST(GNOME_XML_LIB) -]) - -AC_DEFUN([GNOME_XML_CHECK], [ - GNOME_XML_HOOK([],failure) -]) diff --git a/glabels1/macros/gnome.m4 b/glabels1/macros/gnome.m4 deleted file mode 100644 index a3a9ca7..0000000 --- a/glabels1/macros/gnome.m4 +++ /dev/null @@ -1,124 +0,0 @@ -dnl -dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) -dnl -dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh -dnl is not found. -dnl - -AC_DEFUN([GNOME_INIT_HOOK],[ - AC_SUBST(GNOME_LIBS) - AC_SUBST(GNOMEUI_LIBS) - AC_SUBST(GNOMEGNORBA_LIBS) - AC_SUBST(GTKXMHTML_LIBS) - AC_SUBST(ZVT_LIBS) - AC_SUBST(GNOME_LIBDIR) - AC_SUBST(GNOME_INCLUDEDIR) - - AC_ARG_WITH(gnome-includes, - [ --with-gnome-includes Specify location of GNOME headers],[ - CFLAGS="$CFLAGS -I$withval" - ]) - - AC_ARG_WITH(gnome-libs, - [ --with-gnome-libs Specify location of GNOME libs],[ - LDFLAGS="$LDFLAGS -L$withval" - gnome_prefix=$withval - ]) - - AC_ARG_WITH(gnome, - [ --with-gnome Specify prefix for GNOME files], - if test x$withval = xyes; then - want_gnome=yes - dnl Note that an empty true branch is not - dnl valid sh syntax. - ifelse([$1], [], :, [$1]) - else - if test "x$withval" = xno; then - want_gnome=no - else - want_gnome=yes - LDFLAGS="$LDFLAGS -L$withval/lib" - CFLAGS="$CFLAGS -I$withval/include" - gnome_prefix=$withval/lib - fi - fi, - want_gnome=yes) - - if test "x$want_gnome" = xyes; then - - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_GNORBA_HOOK([],$2) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" - GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" - GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" - GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" - ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - fi - - if test -n "$3"; then - n="$3" - for i in $n; do - AC_MSG_CHECKING(extra library \"$i\") - case $i in - applets) - AC_SUBST(GNOME_APPLETS_LIBS) - GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` - AC_MSG_RESULT($GNOME_APPLETS_LIBS);; - capplet) - AC_SUBST(GNOME_CAPPLET_LIBS) - GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` - AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; - *) - AC_MSG_RESULT(unknown library) - esac - done - fi -]) - -dnl -dnl GNOME_INIT ([additional-inits]) -dnl - -AC_DEFUN([GNOME_INIT],[ - GNOME_INIT_HOOK([],fail,$1) -]) diff --git a/glabels1/macros/linger.m4 b/glabels1/macros/linger.m4 deleted file mode 100644 index dfa7c8a..0000000 --- a/glabels1/macros/linger.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl -dnl Check for struct linger -dnl -AC_DEFUN(AC_STRUCT_LINGER, [ -av_struct_linger=no -AC_MSG_CHECKING(struct linger is available) -AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/socket.h> - -struct linger li; - -main () -{ - li.l_onoff = 1; - li.l_linger = 120; - exit (0); -} -],[ -AC_DEFINE(HAVE_STRUCT_LINGER) -av_struct_linger=yes -],[ -av_struct_linger=no -],[ -av_struct_linger=no -]) -AC_MSG_RESULT($av_struct_linger) -]) diff --git a/glabels1/macros/need-declaration.m4 b/glabels1/macros/need-declaration.m4 deleted file mode 100644 index d5b7bc6..0000000 --- a/glabels1/macros/need-declaration.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl See whether we need a declaration for a function. -dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES]) -AC_DEFUN(GCC_NEED_DECLARATION, -[AC_MSG_CHECKING([whether $1 must be declared]) -AC_CACHE_VAL(gcc_cv_decl_needed_$1, -[AC_TRY_COMPILE([ -#include <stdio.h> -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -$2], -[char *(*pfn) = (char *(*)) $1], -eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")]) -if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then - AC_MSG_RESULT(yes) - gcc_need_declarations="$gcc_need_declarations $1" - gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - AC_DEFINE_UNQUOTED($gcc_tr_decl) -else - AC_MSG_RESULT(no) -fi -])dnl - -dnl Check multiple functions to see whether each needs a declaration. -dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES]) -AC_DEFUN(GCC_NEED_DECLARATIONS, -[for ac_func in $1 -do -GCC_NEED_DECLARATION($ac_func, $2) -done -] -) diff --git a/glabels1/missing b/glabels1/missing deleted file mode 100755 index 7789652..0000000 --- a/glabels1/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard <pinard@iro.umontreal.ca>, 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, 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/glabels1/mkinstalldirs b/glabels1/mkinstalldirs deleted file mode 100755 index 6b3b5fc..0000000 --- a/glabels1/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Public domain - -# $Id$ - -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 diff --git a/glabels1/pixmaps/glabels-about-logo.png b/glabels1/pixmaps/glabels-about-logo.png Binary files differdeleted file mode 100644 index 0f15c0c..0000000 --- a/glabels1/pixmaps/glabels-about-logo.png +++ /dev/null diff --git a/glabels1/pixmaps/glabels-icon.png b/glabels1/pixmaps/glabels-icon.png Binary files differdeleted file mode 100644 index 298ea89..0000000 --- a/glabels1/pixmaps/glabels-icon.png +++ /dev/null diff --git a/glabels1/pixmaps/glabels-logo.png b/glabels1/pixmaps/glabels-logo.png Binary files differdeleted file mode 100644 index 40189b9..0000000 --- a/glabels1/pixmaps/glabels-logo.png +++ /dev/null diff --git a/glabels1/po/ChangeLog b/glabels1/po/ChangeLog deleted file mode 100644 index bd1b32e..0000000 --- a/glabels1/po/ChangeLog +++ /dev/null @@ -1,23 +0,0 @@ -2002-08-24 gettextize <bug-gnu-gettext@gnu.org> - - * Makefile.in.in: Upgrade to gettext-0.11.1. - * boldquot.sed: New file, from gettext-0.11.1. - * en@boldquot.header: New file, from gettext-0.11.1. - * en@quot.header: New file, from gettext-0.11.1. - * insert-header.sin: New file, from gettext-0.11.1. - * quot.sed: New file, from gettext-0.11.1. - * remove-potcdate.sin: New file, from gettext-0.11.1. - * Rules-quot: New file, from gettext-0.11.1. - * cat-id-tbl.c: Remove file. - * stamp-cat-id: Remove file. - -2002-06-29 Olivier Berger <oberger@gnu.org> - - * fr.po: updated translation for 0.4.4 - -2002-06-27 gettextize <bug-gnu-utils@gnu.org> - - * Makefile.in.in: Upgrade to gettext-0.10.38. - * cat-id-tbl.c: Remove file. - * stamp-cat-id: Remove file. - diff --git a/glabels1/po/Makefile.in.in b/glabels1/po/Makefile.in.in deleted file mode 100644 index 32b7376..0000000 --- a/glabels1/po/Makefile.in.in +++ /dev/null @@ -1,196 +0,0 @@ -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu> -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -SHELL = /bin/sh -@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` - -CC = @CC@ -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -MSGMERGE = msgmerge - -DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ - -INCLUDES = -I.. -I$(top_srcdir)/intl - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ -$(POFILES) $(GMOFILES) - -POTFILES = \ - -CATALOGS = @CATALOGS@ - -.SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo .mo - -.c.o: - $(COMPILE) $< - -.po.pox: - $(MAKE) $(PACKAGE).pot - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox - -.po.mo: - $(MSGFMT) -o $@ $< - -.po.gmo: - file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) --statistics -o $$file $< - - -all: all-@USE_NLS@ - -all-yes: $(CATALOGS) -all-no: - -# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in - $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=$(srcdir)/POTFILES.in \ - && test ! -f $(PACKAGE).po \ - || ( rm -f $(srcdir)/$(PACKAGE).pot \ - && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) - - -install: install-exec install-data -install-exec: -install-data: install-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ - $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - 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 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - echo "installing $(srcdir)/$$cat as" \ - "$(DESTDIR)$$dir/$(PACKAGE).mo"; \ - fi; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\.gmo$$//'`; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ - done - if test "$(PACKAGE)" = "gettext"; then \ - rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - else \ - : ; \ - fi - -check: all - -dvi info tags TAGS ID: - -mostlyclean: - rm -f core core.* *.pox $(PACKAGE).po *.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)"; \ - for file in $$dists; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - cp -p $$dir/$$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(PACKAGE).pot - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ - cd $(srcdir); \ - catalogs='$(GMOFILES)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\.gmo$$//'`; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \ - mv -f $$lang.new.po $$lang.po; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.new.po; \ - fi; \ - done - $(MAKE) update-gmo - -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 - -# 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: diff --git a/glabels1/po/POTFILES.in b/glabels1/po/POTFILES.in deleted file mode 100644 index 71ca27f..0000000 --- a/glabels1/po/POTFILES.in +++ /dev/null @@ -1,100 +0,0 @@ -# List of source files containing translatable strings. - -src/glabels.c -src/glabels_batch.c -src/splash.h -src/splash.c -src/mdi.h -src/mdi.c -src/display.c -src/display.h -src/item.c -src/item.h -src/item_text.c -src/item_text.h -src/item_line.c -src/item_line.h -src/item_box.c -src/item_box.h -src/item_ellipse.c -src/item_ellipse.h -src/item_image.c -src/item_image.h -src/item_barcode.c -src/item_barcode.h -src/highlight.c -src/highlight.h -src/prop_size.c -src/prop_size.h -src/prop_position.c -src/prop_position.h -src/prop_line.c -src/prop_line.h -src/prop_fill.c -src/prop_fill.h -src/prop_text.c -src/prop_text.h -src/prop_text_entry.c -src/prop_text_entry.h -src/prop_vector.c -src/prop_vector.h -src/prop_bc.c -src/prop_bc.h -src/prop_bc_style.c -src/prop_bc_style.h -src/prop_bc_data.c -src/prop_bc_data.h -src/propertybox.c -src/propertybox.h -src/label.h -src/label.c -src/template.h -src/template.c -src/text_node.h -src/text_node.c -src/merge_properties.c -src/merge_properties.h -src/merge.c -src/merge.h -src/merge_text.c -src/merge_text.h -src/merge_ui.c -src/merge_ui.h -src/merge_ui_text.c -src/merge_ui_text.h -src/bc.c -src/bc.h -src/bc_postnet.c -src/bc_postnet.h -src/bc_gnubarcode.c -src/bc_gnubarcode.h -src/tools.h -src/tools.c -src/stock.h -src/stock.c -src/menu.h -src/menu.c -src/file.c -src/file.h -src/media_select.c -src/media_select.h -src/rotate_select.c -src/rotate_select.h -src/print.c -src/print.h -src/print_dialog.c -src/print_dialog.h -src/print_copies.c -src/print_copies.h -src/print_merge.c -src/print_merge.h -src/mini_preview.c -src/mini_preview.h -src/edit.c -src/edit.h -src/prefs.h -src/prefs.c -src/util.c -src/util.h -src/hack.c -src/hack.h diff --git a/glabels1/po/cat-id-tbl.c b/glabels1/po/cat-id-tbl.c deleted file mode 100644 index e69de29..0000000 --- a/glabels1/po/cat-id-tbl.c +++ /dev/null diff --git a/glabels1/po/de.po b/glabels1/po/de.po deleted file mode 100644 index 60c51fe..0000000 --- a/glabels1/po/de.po +++ /dev/null @@ -1,767 +0,0 @@ -# French translation of glabels. -# Copyright (C) 2001 Jim Evins <evins@snaught.com> -# Marcus Bauer <m@7n7.de>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.2.0\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2001-10-15 15:31+0200\n" -"Last-Translator: Marcus Bauer <m@7n7.de>\n" -"Language-Team: German <>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "" - -#: src/glabels_batch.c:55 -#, fuzzy -msgid "sheets" -msgstr "Seiten:" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "" - -#: src/glabels_batch.c:57 -#, fuzzy -msgid "copies" -msgstr "Kopien" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "Begrenzungen drucken (um Druckausrichtung zu testen)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "Spiegelbildlich drucken" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "" - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "" - -#: src/glabels_batch.c:139 -#, fuzzy, c-format -msgid "cannot open glabels file %s\n" -msgstr "Datei kann nicht geöffnet werden" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "Gespeicherte Kopie von %s wiederherstellen?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "Unbekannter Medientyp. Nehme daher Standardeinstellung." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"``%s'' wurde geändert \n" -"\n" -"Wollen Sie speichern?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "Nicht speichern." - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "Kann Datei nicht speichern" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "Speichern unter..." - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Schließen / Speichern des Etikett als" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "Etikett nicht mehr gültig!" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "Dateinamen angeben" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "Fehler beim Schreiben der Datei" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "Löschen" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Ganz nach vorne" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "Ganz nach hinten" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "Einstellungen ändern..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "Text Objekt bearbeiten" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "Text" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "Erscheinungsbild" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -#, fuzzy -msgid "Text Properties" -msgstr "Text Einstellungen" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "Position" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "Linienobjekt bearbeiten..." - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "Linie" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "Position/Breite" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "Breite" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "Rechteck bearbeiten..." - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "Outline" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Füllen" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "Ellipse bearbeiten..." - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "Bildeinstellungen bearbeiten..." - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "Bild" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "Reset Bildgröße" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "Bildformat wird zur Zeit nicht unterstützt" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "Barcode bearbeiten..." - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "Wert" - -#: src/item_barcode.c:299 -#, fuzzy -msgid "Barcode data" -msgstr "Barcode Wert" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "Allgemeine Einstellungen" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "Stil" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "Ungültiger Barcode-Wert" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -#, fuzzy -msgid "Width:" -msgstr "Länge der Linie" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "Höhe" - -#: src/prop_size.c:222 -#, fuzzy -msgid "Maintain current aspect ratio" -msgstr "Seitenverhältnis beibehalten" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -#, fuzzy -msgid "points" -msgstr "Punkt" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -#, fuzzy -msgid "Color:" -msgstr "Farbe" - -#. Font label -#: src/prop_text.c:181 -#, fuzzy -msgid "Font:" -msgstr "Font:" - -#. Alignment label -#: src/prop_text.c:248 -#, fuzzy -msgid "Alignment:" -msgstr "Textanordnung:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "Key:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "Datenfeld einfügen" - -#. Length label -#: src/prop_vector.c:183 -#, fuzzy -msgid "Length:" -msgstr "Länge" - -#. Angle label -#: src/prop_vector.c:207 -#, fuzzy -msgid "Angle:" -msgstr "Winkel" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "Grad" - -#. Scale Label -#: src/prop_bc.c:168 -#, fuzzy -msgid "Scale:" -msgstr "Skalierung" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Zeige Text mit Barcode" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "Literale:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "Fehler: xmlParseFile error" - -#: src/label.c:228 -msgid "No document root" -msgstr "Kein document root" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "Fehlerhafter Dokument-Typ, glabels Namespace nicht gefunden" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Fehlerhafter root node = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "fehlerhafter node = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Problem beim Speichern der xml-Datei." - -#: src/template.c:224 -msgid "No template files found!" -msgstr "Keine Dateivorlagen gefunden!" - -#: src/merge_properties.c:82 -#, fuzzy -msgid "Edit document-merge properties" -msgstr "Dokumenten Mischerei bearbeiten..." - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "Quelle" - -#: src/merge_properties.c:143 -#, fuzzy -msgid "Format:" -msgstr "Font" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "Ort:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Felder" - -#: src/merge.c:78 -msgid "None" -msgstr "Keine" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "Text mit Tabulatoren als Trennern" - -#: src/merge.c:94 -#, fuzzy -msgid "Text with comma separators (CSV)" -msgstr "Text mit Kommata als Separatoren" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "Text mit Doppelpunkten als Separatoren" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "Nicht verfügbar" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "Wählen Sie die einzumischende Datenquelle" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Spalte" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "Benutzerdefinierter Feldschlüssel" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "Beispiel Daten" - -#: src/menu.c:50 -msgid "_New" -msgstr "_Neu" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "Erzeuge neues, leeres Etikett" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "A_uswahl aufheben" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "Alle Auswahlen aufheben" - -#: src/menu.c:94 -#, fuzzy -msgid "Select" -msgstr "Löschen" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "Objekte auswählen, bewegen, ändern" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "Textobjekt erzeugen" - -#: src/menu.c:103 -msgid "Box" -msgstr "Box" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "Rechteck-Objekt erzeugen" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "Linienobjekt erzeugen" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Ellipse" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Ellipsenobjekt erzeugen" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "Bildobjekt erzeugen" - -#: src/menu.c:116 -#, fuzzy -msgid "Barcode" -msgstr "Barcode Wert" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "Barcodeobjekt erzeugen" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "vergrößern" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "verkleinern" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "Zoom 1:1" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "Maßstab auf 1:1 einstellen" - -#: src/menu.c:132 src/menu.c:223 -#, fuzzy -msgid "Merge properties" -msgstr "Einstellungen ändern..." - -#: src/menu.c:133 -#, fuzzy -msgid "Edit merge properties" -msgstr "Bildeinstellungen bearbeiten..." - -#: src/menu.c:157 -msgid "_Tools" -msgstr "_Werkzeuge" - -#: src/menu.c:168 -msgid " New " -msgstr " Neu " - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "Neues Etikett/Neue Karte" - -#: src/menu.c:170 -msgid " Open " -msgstr " Öffnen " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "Datei öffnen" - -#: src/menu.c:172 -msgid " Save " -msgstr " Speichern " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "Aktuelle Datei speichern" - -#: src/menu.c:175 -msgid " Print " -msgstr " Drucken " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "Aktuelle Datei drucken" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"Ein GNOME-Programm zur Erstellung von Etiketten und Visitenkarten.\n" -" \n" -"Glabels ist freie Software; Sie können sie weiterverteilen und/oder ändern " -"unter den Bedingungen der GNU General Public License, veröffentlicht von der " -"Free Software Foundation, entweder Version 2 der Lizenz oder (optional) " -"jeder späteren Version.\n" -" \n" -"Dieses Programm wird verteilt in der Hoffnung, dass es nützlich ist, aber " -"OHNE JEDE GARANTIE; Weitere Details in der GNU General Public License.\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "Funktion noch nicht implementiert!" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "Neues Etikett oder neue Karte" - -#: src/file.c:98 -msgid "Media Type" -msgstr "Medien Typ" - -#: src/file.c:109 -#, fuzzy -msgid "Label orientation" -msgstr "Ausrichtung ändern" - -#: src/file.c:211 -msgid "Open" -msgstr "Öffnen" - -#: src/file.c:213 -msgid "Open label" -msgstr "Öffnen Etikett" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "Datei kann nicht geöffnet werden" - -#: src/file.c:316 -msgid "Save label as" -msgstr "Datei speichern unter" - -#: src/media_select.c:222 -#, fuzzy -msgid "Description:" -msgstr "Position" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "Seiten Format:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "Etikett Format:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "Layout:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d pro Seite)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "Rotieren" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "Drucken" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "Kopien" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "Kontrolle der Mischung mit Datenquelle (Serienfunktion)" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "Optionen" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "Druckvorschau" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "Seiten:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "Labels" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "von:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "bis:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "Start bei Etikett" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "auf erster Seite" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "Zuordnen" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "Kopien:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels : Einstellungen" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Anzeige Einheiten" - -#: src/prefs.c:231 -#, fuzzy -msgid "Points" -msgstr "Punkt" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "Inch" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "Millimeter" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "Standard Papierformat" - -#: src/prefs.c:450 -msgid "inches" -msgstr "Inch" - -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" - -#~ msgid "Function is not yet implemented!" -#~ msgstr "Funktion noch nicht implementiert!" - -#~ msgid "w" -#~ msgstr "w" - -#~ msgid "h" -#~ msgstr "h" - -#~ msgid "x" -#~ msgstr "x" - -#~ msgid "y" -#~ msgstr "y" - -#~ msgid "Startup" -#~ msgstr "Programmstart" - -#~ msgid "Under construction" -#~ msgstr "Hier wird noch eifrig gebaut..." - -#, fuzzy -#~ msgid "Maintain original aspect ratio" -#~ msgstr "Seitenverhältnis beibehalten" - -#~ msgid "Text color" -#~ msgstr "Textfarbe" - -#~ msgid "Line Color" -#~ msgstr "Linienfarbe" - -#~ msgid "Fill Color" -#~ msgstr "Füllfarbe" diff --git a/glabels1/po/es.po b/glabels1/po/es.po deleted file mode 100644 index 44f00dd..0000000 --- a/glabels1/po/es.po +++ /dev/null @@ -1,704 +0,0 @@ -# LANGUAGE translation of glabels. -# Copyright (C) 2002 Free Software Foundation, Inc. -# victor <victor@pasmao.net>, 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.2.0\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2002-04-16 12:19+0200\n" -"Last-Translator: victor <victor@pasmao.net>\n" -"Language-Team: Spanish/Spain <es@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "" - -#: src/glabels_batch.c:55 -#, fuzzy -msgid "sheets" -msgstr "Hojas:" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "" - -#: src/glabels_batch.c:57 -#, fuzzy -msgid "copies" -msgstr "Copias" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "Imprimir un esbozo (para verificar la alineación de la impresora)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "Impresión invertida (imagen espejo)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "" - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "" - -#: src/glabels_batch.c:139 -#, fuzzy, c-format -msgid "cannot open glabels file %s\n" -msgstr "No puedo abrir el archivo" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "¿ Recuperar la copia salvada de %s ?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "Tipo de papel desconocido. Utilizando el tipo por omisión." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"\"%s\" ha sido modificado.\n" -"\n" -"¿ Desea salvarlo ?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "No salvar" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "No puedo salvar el archivo" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "Salva como" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Cerrar / Salvar etiqueta como" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "¡ La etiqueta ya no es válida !" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "Debe proporcionar un nombre de archivo" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "Error salvando el archivo" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "Borrar" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Traer al frente" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "Enviar al fondo" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "Modificar propiedades" - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "Modificar las propiedades del objeto texto" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "Texto" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "Apariencia" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "Propiedades del texto" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "Posición" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "Modificar las propiedades del objeto línea" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "Línea" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "Posición/Tamaño" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "Tamaño" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "Modificar propiedades del objeto caja" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "Contorno" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Relleno" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "Modificar las propiedades del objeto elipse" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "Modificar las propiedades del objeto imagen" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "Imagen" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "Restablecer el tamaño de la imagen" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "Formato de imagen no soportado actualmente" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "Modificar las propiedades del objeto código de barras" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "Datos" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "Datos del código de barras" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "General" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "Estilo" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "Código de barras no válido" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Ancho" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "Alto" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "Mantener la proporción actual del aspecto" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "puntos" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "Color" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "Fuente:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "Alineación:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "Clave:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "Insertar campo para fusionar" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "Longitud:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "Ángulo:" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "grados" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "Escala:" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Mostrar texto con código de barras" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "Literal:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "error xmlParseFile" - -#: src/label.c:228 -msgid "No document root" -msgstr "No hay documento raíz" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "documento de tipo erróneo, glabels Espacio de nombres no encontrado" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Nodo raíz erróneo = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "Nodo erróneo = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Problemas salvando archivo xml" - -#: src/template.c:224 -msgid "No template files found!" -msgstr "No he encontrado archivos de plantilla" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "Modificar las propiedades del documento de fusión" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "Fuente" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "Formato:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "Localización:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Campos" - -#: src/merge.c:78 -msgid "None" -msgstr "Ninguno" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "Texto separado con tabuladores" - -#: src/merge.c:94 -#, fuzzy -msgid "Text with comma separators (CSV)" -msgstr "Texto separado con commas" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "Texto separado con caracteres dos puntos" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "N/A" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "Seleccione la fuente de datos para fusionar" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Columna" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "Campo clave personalizable" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "Datos de ejemplo" - -#: src/menu.c:50 -msgid "_New" -msgstr "_Nuevo" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "Crear una etiqueta vacía nueva" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "_Deseleccionar todo" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "Eliminar todas las selecciones" - -#: src/menu.c:94 -msgid "Select" -msgstr "Seleccionar" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "Seleccionar, mover y modificar objetos" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "Crear un objeto de texto" - -#: src/menu.c:103 -msgid "Box" -msgstr "Caja" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "Crear un objeto tipo caja/rectángulo" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "Crear un objeto línea" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Elipse" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Crear un objeto circular/elíptico" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "Crear un objeto imagen" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "Código de barras" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "Crear un objeto código de barras" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "Agrandar " - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "Reducir" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "Vista 1:1" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "Vista a 1:1" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "Propiedades de fusión de datos" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "Modificar propiedades de fusión de datos" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "_Herramientas" - -#: src/menu.c:168 -msgid " New " -msgstr "Nuevo" - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "Nueva tarjeta/etiqueta" - -#: src/menu.c:170 -msgid " Open " -msgstr " Abrir " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "Abrir un archivo" - -#: src/menu.c:172 -msgid " Save " -msgstr " Guardar " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "Guardar el archivo en uso" - -#: src/menu.c:175 -msgid " Print " -msgstr " Imprimir " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "Imprimir el archivo en uso" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "¡ La funcionalidad no está aún implementada !" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "Nueva etiqueta o tarjeta" - -#: src/file.c:98 -msgid "Media Type" -msgstr "Tipo de papel" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "Orientación de la etiqueta" - -#: src/file.c:211 -msgid "Open" -msgstr "Abrir" - -#: src/file.c:213 -msgid "Open label" -msgstr "Abrir etiqueta" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "No puedo abrir el archivo" - -#: src/file.c:316 -msgid "Save label as" -msgstr "Guardar la etiqueta como" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "Descripción:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "Tamaño de la página:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "Tamaño de la etiqueta:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "Disposición:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d por hoja)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "Rotar" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "Imprimir" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "Copias" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "Control de la fusión de documentos" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "Opciones" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "Previsualizar la impresión" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "Hojas:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "Etiquetas" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "desde:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "hasta:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "Comenzar en la etiqueta" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "en la primera hoja" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "Copias:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: Preferencias" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Mostrar unidades de medida" - -#: src/prefs.c:231 -msgid "Points" -msgstr "Puntos" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "Pulgadas" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "Milímetros" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "Tamaño de página por omisión" - -#: src/prefs.c:450 -msgid "inches" -msgstr "pulgadas" - -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" diff --git a/glabels1/po/fr.po b/glabels1/po/fr.po deleted file mode 100644 index bcceafa..0000000 --- a/glabels1/po/fr.po +++ /dev/null @@ -1,1321 +0,0 @@ -# French translation of glabels. -# Copyright (C) 2001 Jim Evins <evins@snaught.com> -# Olivier Berger <oberger@gnu.org>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.4\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2001-10-15 15:31+0200\n" -"Last-Translator: Olivier Berger <oberger@gnu.org>\n" -"Language-Team: French <gnomefr@traduc.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "imprimer ce message" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "imprimer la version de glabels-batch utilisée" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "définit le fichier de sortie (défaut=\"output.ps\")" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "nom de fichier" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "nombre de pages (défaut=1)" - -# src/print_copies.c:193 -# src/print_copies.c:193 -# src/print_copies.c:171 -# src/print_copies.c:170 -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "feuilles" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "nombre de copies (défaut=1)" - -# src/print.c:153 -# src/print.c:153 -# src/print.c:146 -# src/print_dialog.c:104 -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "copies" - -# src/print.c:180 -# src/print.c:180 -# src/print.c:196 -# src/print_dialog.c:152 -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "imprimer des bordures (pour tester l'alignement de l'imprimante)" - -# src/print_dialog.c:160 -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "imprimer à l'envers (i.e. une image miroir)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPTION...] FICHIER_GLABELS..." - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "fichier glabels manquant\n" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "impossible d'ouvrir le fichier glabels %s\n" - -# src/mdi.c:190 -# src/mdi.c:189 -# src/mdi.c:169 -# src/mdi.c:169 -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "Rétablir la version sauvegardée de %s ?" - -# src/mdi.c:219 -# src/mdi.c:207 -# src/mdi.c:207 -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "Type de media inconnu. Utilisation de celui par défaut." - -# src/mdi.c:477 -# src/mdi.c:483 -# src/mdi.c:455 -# src/mdi.c:455 -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"``%s'' a été modifié \n" -"\n" -"Voulez-vous l'enregistrer ?" - -# src/mdi.c:482 -# src/mdi.c:488 -# src/mdi.c:459 -# src/mdi.c:459 -#: src/mdi.c:459 -msgid "Don't save" -msgstr "Ne pas sauver" - -# src/file.c:248 src/mdi.c:635 -# src/file.c:248 src/mdi.c:641 -# src/file.c:288 src/mdi.c:601 -# src/file.c:288 src/mdi.c:601 -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "Impossible d'enregistrer le fichier" - -# src/file.c:271 src/mdi.c:660 -# src/file.c:271 src/mdi.c:666 -# src/file.c:311 src/mdi.c:623 -# src/file.c:311 src/mdi.c:623 -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "Enregistrer sous" - -# src/mdi.c:663 -# src/mdi.c:669 -# src/mdi.c:626 -# src/mdi.c:626 -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Fermer / Enregistrer l'étiquette sous" - -# src/file.c:309 src/mdi.c:716 -# src/file.c:309 src/mdi.c:722 -# src/file.c:352 src/mdi.c:680 -# src/file.c:352 src/mdi.c:680 -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "Etiquette plus valide !" - -# src/file.c:319 src/mdi.c:729 -# src/file.c:319 src/mdi.c:735 -# src/file.c:362 src/mdi.c:693 -# src/file.c:362 src/mdi.c:693 -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "Vous devez donner un nom de fichier" - -# src/file.c:330 src/mdi.c:740 -# src/file.c:330 src/mdi.c:746 -# src/file.c:374 src/mdi.c:705 -# src/file.c:374 src/mdi.c:705 -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "Erreur d'écriture du fichier" - -# src/display.c:1157 src/display.c:1205 -# src/display.c:1160 src/display.c:1208 -# src/display.c:1171 src/display.c:1219 -# src/display.c:1186 src/display.c:1234 -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "Supprimer" - -# src/display.c:1167 src/display.c:1215 -# src/display.c:1170 src/display.c:1218 -# src/display.c:1181 src/display.c:1229 -# src/display.c:1196 src/display.c:1244 -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Avancer au premier plan" - -# src/display.c:1173 src/display.c:1221 -# src/display.c:1176 src/display.c:1224 -# src/display.c:1187 src/display.c:1235 -# src/display.c:1202 src/display.c:1250 -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "Reculer à l'arrière-plan" - -# src/display.c:1194 -# src/display.c:1197 -# src/display.c:1208 -# src/display.c:1223 -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "Editer les propriétés..." - -# src/item_text.c:432 -# src/item_text.c:432 -# src/item_text.c:450 -# src/item_text.c:450 -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "Editer les propriétés de l'objet texte..." - -# src/item_text.c:442 src/item_text.c:627 -# src/item_text.c:442 src/item_text.c:627 -# src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -# src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "Texte" - -# src/item_barcode.c:334 src/item_box.c:261 src/item_ellipse.c:266 -# src/item_line.c:268 src/item_text.c:464 -# src/item_barcode.c:340 src/item_box.c:261 src/item_ellipse.c:266 -# src/item_line.c:268 src/item_text.c:464 -# src/item_barcode.c:317 src/item_box.c:245 src/item_ellipse.c:247 -# src/item_line.c:253 src/item_text.c:479 -# src/item_barcode.c:317 src/item_box.c:245 src/item_ellipse.c:247 -# src/item_line.c:253 src/item_text.c:479 -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "Apparence" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "Propriétés du texte" - -# src/item_barcode.c:362 src/item_barcode.c:365 src/item_box.c:291 -# src/item_ellipse.c:296 src/item_image.c:315 src/item_line.c:289 -# src/item_text.c:487 src/item_text.c:490 -# src/item_barcode.c:368 src/item_barcode.c:371 src/item_box.c:291 -# src/item_ellipse.c:296 src/item_image.c:315 src/item_line.c:289 -# src/item_text.c:487 src/item_text.c:490 -# src/item_barcode.c:345 src/item_barcode.c:348 src/item_box.c:275 -# src/item_ellipse.c:277 src/item_image.c:318 src/item_line.c:274 -# src/item_text.c:500 src/item_text.c:503 -# src/item_barcode.c:345 src/item_barcode.c:348 src/item_box.c:275 -# src/item_ellipse.c:277 src/item_image.c:318 src/item_line.c:274 -# src/item_text.c:500 src/item_text.c:503 -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "Position" - -# src/item_line.c:258 -# src/item_line.c:258 -# src/item_line.c:243 -# src/item_line.c:243 -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "Editer les propriétés de l'objet ligne..." - -# src/item_line.c:271 -# src/item_line.c:271 -# src/item_line.c:256 src/menu.c:106 -# src/item_line.c:256 src/menu.c:106 -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "Ligne" - -# src/item_box.c:288 src/item_ellipse.c:293 src/item_image.c:312 -# src/item_line.c:286 -# src/item_box.c:288 src/item_ellipse.c:293 src/item_image.c:312 -# src/item_line.c:286 -# src/item_box.c:272 src/item_ellipse.c:274 src/item_image.c:315 -# src/item_line.c:271 -# src/item_box.c:272 src/item_ellipse.c:274 src/item_image.c:315 -# src/item_line.c:271 -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "Position/Taille" - -# src/item_box.c:302 src/item_ellipse.c:307 src/item_image.c:326 -# src/item_line.c:300 -# src/item_box.c:302 src/item_ellipse.c:307 src/item_image.c:326 -# src/item_line.c:300 -# src/item_box.c:286 src/item_ellipse.c:288 src/item_image.c:329 -# src/item_line.c:285 -# src/item_box.c:286 src/item_ellipse.c:288 src/item_image.c:329 -# src/item_line.c:285 -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "Taille" - -# src/item_box.c:251 -# src/item_box.c:251 -# src/item_box.c:235 -# src/item_box.c:235 -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "Editer les propriétés de l'objet boîte..." - -# src/item_box.c:264 src/item_ellipse.c:269 -# src/item_box.c:264 src/item_ellipse.c:269 -# src/item_box.c:248 src/item_ellipse.c:250 -# src/item_box.c:248 src/item_ellipse.c:250 -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "Bordure" - -# src/item_box.c:274 src/item_ellipse.c:279 -# src/item_box.c:274 src/item_ellipse.c:279 -# src/item_box.c:258 src/item_ellipse.c:260 -# src/item_box.c:258 src/item_ellipse.c:260 -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Remplissage" - -# src/item_ellipse.c:256 -# src/item_ellipse.c:256 -# src/item_ellipse.c:237 -# src/item_ellipse.c:237 -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "Editer les propriétés de l'objet ellipse..." - -# src/item_image.c:272 -# src/item_image.c:272 -# src/item_image.c:257 -# src/item_image.c:257 -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "Editer les propriétés de l'objet image..." - -# src/item_image.c:283 -# src/item_image.c:283 -# src/item_image.c:268 src/menu.c:113 -# src/item_image.c:268 src/menu.c:113 -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "Image" - -# src/item_image.c:341 -# src/item_image.c:340 -# src/item_image.c:342 -# src/item_image.c:342 -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "Restaurer la taille d'image" - -# src/item_image.c:389 src/item_image.c:444 -# src/item_image.c:388 src/item_image.c:442 -# src/item_image.c:389 src/item_image.c:454 -# src/item_image.c:389 src/item_image.c:454 -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "Format d'image non supporté actuellement" - -# src/item_barcode.c:299 -# src/item_barcode.c:299 -# src/item_barcode.c:287 -# src/item_barcode.c:287 -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "Editer les propriétés de l'objet code-barre..." - -# src/item_barcode.c:309 -# src/item_barcode.c:308 -# src/item_barcode.c:297 -# src/item_barcode.c:297 -#: src/item_barcode.c:297 -msgid "Data" -msgstr "Données" - -# src/item_barcode.c:316 -# src/item_barcode.c:317 -# src/item_barcode.c:299 -# src/item_barcode.c:299 -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "Données de code-barre" - -# src/item_barcode.c:337 -# src/item_barcode.c:343 src/prefs.c:243 -# src/item_barcode.c:320 src/prefs.c:221 -# src/item_barcode.c:320 src/prefs.c:215 -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "Général" - -# src/item_barcode.c:347 -# src/item_barcode.c:353 -# src/item_barcode.c:330 -# src/item_barcode.c:330 -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "Style" - -# src/item_barcode.c:564 src/item_barcode.c:588 src/print.c:641 -# src/item_barcode.c:570 src/item_barcode.c:594 src/print.c:641 -# src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:799 -# src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:600 -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "Code-barre invalide" - -# src/prop_line.c:188 -# src/prop_line.c:187 src/prop_size.c:202 -# src/prop_line.c:169 src/prop_size.c:182 -# src/prop_line.c:169 src/prop_size.c:182 -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Largeur :" - -# src/prop_size.c:220 -# src/prop_size.c:198 -# src/prop_size.c:198 -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "Hauteur :" - -# src/prop_size.c:215 -# src/prop_size.c:247 -# src/prop_size.c:222 -# src/prop_size.c:222 -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "Conserver le rapport d'échelle actuel" - -# src/prop_position.c:192 -# src/prop_position.c:173 -# src/prop_position.c:173 -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X :" - -# src/prop_position.c:212 -# src/prop_position.c:191 -# src/prop_position.c:191 -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y :" - -# src/print.c:171 -# src/prefs.c:463 src/prefs.c:470 src/prop_line.c:202 -# src/prefs.c:445 src/prefs.c:452 src/prop_line.c:183 -# src/prefs.c:448 src/prefs.c:455 src/prop_line.c:183 -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "points" - -# src/prop_bc.c:204 src/prop_fill.c:186 src/prop_line.c:203 -# src/prop_text.c:263 -# src/prop_bc.c:210 src/prop_fill.c:184 src/prop_line.c:209 -# src/prop_text.c:247 -# src/prop_bc.c:188 src/prop_fill.c:166 src/prop_line.c:189 -# src/prop_text.c:234 -# src/prop_bc.c:188 src/prop_fill.c:166 src/prop_line.c:189 -# src/prop_text.c:234 -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "Couleur :" - -# src/prop_text.c:214 -# src/prop_text.c:199 -# src/prop_text.c:181 -# src/prop_text.c:181 -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "Police :" - -# src/prop_text.c:277 -# src/prop_text.c:264 -# src/prop_text.c:248 -# src/prop_text.c:248 -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "Alignement :" - -# src/prop_bc_data.c:196 src/prop_text_entry.c:180 -# src/prop_bc_data.c:196 src/prop_text_entry.c:180 -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "Clé :" - -# src/prop_text_entry.c:196 -# src/prop_text_entry.c:196 -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "Insérer champ de fusion" - -# src/prop_vector.c:196 -# src/prop_vector.c:202 -# src/prop_vector.c:183 -# src/prop_vector.c:183 -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "Longueur :" - -# src/prop_vector.c:207 -# src/prop_vector.c:228 -# src/prop_vector.c:207 -# src/prop_vector.c:207 -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "Angle :" - -# src/prop_vector.c:245 -# src/prop_vector.c:224 -# src/prop_vector.c:224 -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "degrés" - -# src/prop_bc.c:189 -# src/prop_bc.c:187 -# src/prop_bc.c:168 -# src/prop_bc.c:168 -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "Echelle :" - -# src/prop_bc.c:202 -# src/prop_bc.c:182 -# src/prop_bc.c:182 -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -# src/prop_bc_style.c:328 -# src/prop_bc_style.c:328 -# src/prop_bc_style.c:313 -# src/prop_bc_style.c:313 -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Afficher du texte avec le code-barre" - -# src/prop_bc_data.c:176 -# src/prop_bc_data.c:176 -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "Littéral :" - -# src/label.c:186 src/label.c:211 -# src/label.c:186 src/label.c:211 -# src/label.c:170 src/label.c:194 -# src/label.c:168 src/label.c:192 -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "erreur xmlParseFile" - -# src/label.c:243 -# src/label.c:244 -# src/label.c:225 -# src/label.c:223 -#: src/label.c:228 -msgid "No document root" -msgstr "Pas de racine de document" - -# src/label.c:248 -# src/label.c:249 -# src/label.c:236 -# src/label.c:234 -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "document de type erroné, aucun espace de noms glabels trouvé" - -# src/label.c:253 -# src/label.c:254 -# src/label.c:241 -# src/label.c:239 -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Mauvais noeud racine = \"%s\"" - -# src/label.c:298 -# src/label.c:301 -# src/label.c:294 -# src/label.c:290 -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "mauvais noeud = \"%s\"" - -# src/label.c:487 -# src/label.c:493 -# src/label.c:589 -# src/label.c:587 -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Problème de sauvegarde du fichier xml." - -# src/template.c:179 -# src/template.c:178 -# src/template.c:223 -#: src/template.c:224 -msgid "No template files found!" -msgstr "Aucun fichier de patron trouvé !" - -# src/item_box.c:251 -# src/item_box.c:251 -# src/merge_properties.c:82 -# src/merge_properties.c:82 -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "Editer les propriétés de fusion de document" - -# src/merge_properties.c:131 -# src/merge_properties.c:131 -#: src/merge_properties.c:131 -msgid "Source" -msgstr "Source" - -# src/prop_text.c:214 -# src/prop_text.c:199 -# src/merge_properties.c:143 -# src/merge_properties.c:143 -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "Format :" - -# src/merge_properties.c:158 -# src/merge_properties.c:158 -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "Emplacement :" - -# src/item_box.c:274 src/item_ellipse.c:279 -# src/item_box.c:274 src/item_ellipse.c:279 -# src/merge_properties.c:168 -# src/merge_properties.c:168 -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Champs" - -# src/merge.c:80 -# src/merge.c:78 -#: src/merge.c:78 -msgid "None" -msgstr "Aucun" - -# src/merge.c:89 -# src/merge.c:86 -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "Texte avec séparateurs de tabulation" - -# src/merge.c:98 -# src/merge.c:94 -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "Texte séparé par des virgules (CSV)" - -# src/merge.c:107 -# src/merge.c:102 -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "Texte séparé par des deux-points" - -# src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -# src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "Non défini" - -# src/merge_ui_text.c:170 -# src/merge_ui_text.c:170 -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "Sélection de la base de données source de la fusion" - -# src/merge_ui_text.c:330 -# src/merge_ui_text.c:330 -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Colonne" - -# src/merge_ui_text.c:334 -# src/merge_ui_text.c:334 -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "Clé de champ spécifique" - -# src/merge_ui_text.c:338 -# src/merge_ui_text.c:338 -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "Exemple de données" - -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -#: src/menu.c:50 -msgid "_New" -msgstr "_Nouveau" - -# src/menu.c:51 -# src/menu.c:51 -# src/menu.c:51 -# src/menu.c:51 -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "Créer une nouvelle étiquette vide" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "_Désélectionne tout" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "Supprime toutes les sélections" - -# src/display.c:1157 src/display.c:1205 -# src/display.c:1160 src/display.c:1208 -# src/menu.c:94 -# src/menu.c:94 -#: src/menu.c:94 -msgid "Select" -msgstr "Sélectionner" - -# src/tools.c:59 -# src/tools.c:59 -# src/menu.c:95 src/menu.c:186 -# src/menu.c:95 src/menu.c:186 -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "Sélectionner, déplacer et modifier les objets" - -# src/tools.c:64 -# src/tools.c:64 -# src/menu.c:100 src/menu.c:191 -# src/menu.c:100 src/menu.c:191 -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "Créer un objet texte" - -# src/menu.c:103 -# src/menu.c:103 -#: src/menu.c:103 -msgid "Box" -msgstr "Boîte" - -# src/tools.c:67 -# src/tools.c:67 -# src/menu.c:103 src/menu.c:194 -# src/menu.c:103 src/menu.c:194 -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "Créer un objet boîte/rectangle" - -# src/tools.c:70 -# src/tools.c:70 -# src/menu.c:106 src/menu.c:197 -# src/menu.c:106 src/menu.c:197 -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "Créer un objet ligne" - -# src/menu.c:109 -# src/menu.c:109 -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Ellipse" - -# src/tools.c:73 -# src/tools.c:73 -# src/menu.c:110 src/menu.c:200 -# src/menu.c:110 src/menu.c:200 -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Créer un objet ellipse/cercle" - -# src/tools.c:76 -# src/tools.c:76 -# src/menu.c:113 src/menu.c:203 -# src/menu.c:113 src/menu.c:203 -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "Créer un objet image" - -# src/item_barcode.c:316 -# src/item_barcode.c:317 -# src/menu.c:116 -# src/menu.c:116 -#: src/menu.c:116 -msgid "Barcode" -msgstr "Code-barre" - -# src/tools.c:79 -# src/tools.c:79 -# src/menu.c:116 src/menu.c:206 -# src/menu.c:116 src/menu.c:206 -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "Créer un objet code-barre" - -# src/tools.c:84 -# src/tools.c:84 -# src/menu.c:121 src/menu.c:211 -# src/menu.c:121 src/menu.c:211 -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "Zoom supérieur" - -# src/tools.c:87 -# src/tools.c:87 -# src/menu.c:124 src/menu.c:214 -# src/menu.c:124 src/menu.c:214 -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "Zoom inférieur" - -# src/tools.c:90 -# src/tools.c:90 -# src/menu.c:127 -# src/menu.c:127 -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "Zoom 1:1" - -# src/tools.c:90 -# src/tools.c:90 -# src/menu.c:127 src/menu.c:217 -# src/menu.c:127 src/menu.c:217 -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "Zoomer à 1:1" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/menu.c:132 src/menu.c:223 -# src/menu.c:132 src/menu.c:223 -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "Propriétés de fusion" - -# src/item_image.c:272 -# src/item_image.c:272 -# src/menu.c:133 -# src/menu.c:133 -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "Editer les propriétés de fusion" - -# src/menu.c:157 -# src/menu.c:157 -#: src/menu.c:157 -msgid "_Tools" -msgstr "_Outils" - -# src/menu.c:138 -# src/menu.c:138 -# src/menu.c:168 -# src/menu.c:168 -#: src/menu.c:168 -msgid " New " -msgstr " Nouveau " - -# src/menu.c:138 -# src/menu.c:138 -# src/menu.c:168 -# src/menu.c:168 -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "Nouvelle étiquette/carte" - -# src/menu.c:140 -# src/menu.c:140 -# src/menu.c:170 -# src/menu.c:170 -#: src/menu.c:170 -msgid " Open " -msgstr " Ouvrir " - -# src/menu.c:140 -# src/menu.c:140 -# src/menu.c:170 -# src/menu.c:170 -#: src/menu.c:170 -msgid "Open a file" -msgstr "Ouvrir un fichier" - -# src/menu.c:142 -# src/menu.c:142 -# src/menu.c:172 -# src/menu.c:172 -#: src/menu.c:172 -msgid " Save " -msgstr " Enregistrer " - -# src/menu.c:142 -# src/menu.c:142 -# src/menu.c:172 -# src/menu.c:172 -#: src/menu.c:172 -msgid "Save current file" -msgstr "Sauvegarder le fichier en cours" - -# src/menu.c:145 -# src/menu.c:145 -# src/menu.c:175 -# src/menu.c:175 -#: src/menu.c:175 -msgid " Print " -msgstr " Imprimer " - -# src/menu.c:145 -# src/menu.c:145 -# src/menu.c:175 -# src/menu.c:175 -#: src/menu.c:175 -msgid "Print current file" -msgstr "Imprimer le fichier en cours" - -# src/menu.c:185 -# src/menu.c:185 -# src/menu.c:290 -# src/menu.c:290 -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"Un programme de création d'étiquettes et de cartes de visite pour GNOME.\n" -" \n" -"Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le " -"modifier conformément aux dispositions de la Licence Publique Générale GNU, " -"telle que publiée par la Free Software Foundation ; version 2 de la licence, " -"ou encore (à votre choix) toute version ultérieure.\n" -" \n" -"Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE " -"GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou " -"D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence " -"Publique Générale GNU.\n" - -# src/menu.c:221 -# src/menu.c:221 -# src/menu.c:326 -# src/menu.c:326 -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "Cette fonction n'est pas implémentée !" - -# src/file.c:59 -# src/file.c:59 -# src/file.c:72 -# src/file.c:72 -#: src/file.c:72 -msgid "New Label or Card" -msgstr "Nouvelle étiquette ou carte" - -# src/file.c:87 -# src/file.c:87 -# src/file.c:98 -# src/file.c:98 -#: src/file.c:98 -msgid "Media Type" -msgstr "Type de média" - -# src/file.c:98 -# src/file.c:98 -# src/file.c:109 -# src/file.c:109 -#: src/file.c:109 -msgid "Label orientation" -msgstr "Orientation de l'étiquette" - -# src/file.c:178 -# src/file.c:178 -# src/file.c:211 -# src/file.c:211 -#: src/file.c:211 -msgid "Open" -msgstr "Ouvrir" - -# src/file.c:183 -# src/file.c:183 -# src/file.c:213 -# src/file.c:213 -#: src/file.c:213 -msgid "Open label" -msgstr "Ouvrir une étiquette" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -#: src/file.c:249 -msgid "Cannot open file" -msgstr "Impossible d'ouvrir le fichier" - -# src/file.c:278 -# src/file.c:278 -# src/file.c:316 -# src/file.c:316 -#: src/file.c:316 -msgid "Save label as" -msgstr "Enregistrer l'étiquette sous" - -# src/media_select.c:216 -# src/media_select.c:242 -# src/media_select.c:222 -# src/media_select.c:222 -#: src/media_select.c:222 -msgid "Description:" -msgstr "Description :" - -# src/media_select.c:221 -# src/media_select.c:247 -# src/media_select.c:227 -# src/media_select.c:227 -#: src/media_select.c:227 -msgid "Page size:" -msgstr "Taille de page :" - -# src/media_select.c:226 -# src/media_select.c:252 -# src/media_select.c:232 -# src/media_select.c:232 -#: src/media_select.c:232 -msgid "Label size:" -msgstr "Taille d'étiquette :" - -# src/media_select.c:231 -# src/media_select.c:257 -# src/media_select.c:237 -# src/media_select.c:237 -#: src/media_select.c:237 -msgid "Layout:" -msgstr "Disposition :" - -# src/media_select.c:515 -# src/media_select.c:481 -# src/media_select.c:353 -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d par feuille)" - -# src/media_select.c:522 -# src/media_select.c:488 -# src/media_select.c:367 -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -# src/media_select.c:522 -# src/media_select.c:488 -# src/media_select.c:372 -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "Rotation" - -# src/print.c:149 -# src/print.c:149 -# src/print.c:141 -# src/print_dialog.c:99 -#: src/print_dialog.c:99 -msgid "Print" -msgstr "Imprimer" - -# src/print.c:153 -# src/print.c:153 -# src/print.c:146 -# src/print_dialog.c:104 -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "Copies" - -# src/print.c:164 -# src/print_dialog.c:121 -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "Contrôle de la fusion de document" - -# src/print.c:171 -# src/print.c:171 -# src/print.c:186 -# src/print_dialog.c:141 -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "Options" - -# src/print.c:235 -# src/print.c:235 -# src/print.c:283 src/print.c:348 -# src/print_dialog.c:241 src/print_dialog.c:280 -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "Aperçu avant impression" - -# src/print_copies.c:193 -# src/print_copies.c:193 -# src/print_copies.c:171 -# src/print_copies.c:170 -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "Feuilles :" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#: src/print_copies.c:187 -msgid "Labels" -msgstr "Etiquettes" - -# src/print_copies.c:213 -# src/print_copies.c:213 -# src/print_copies.c:191 -# src/print_copies.c:190 -#: src/print_copies.c:190 -msgid "from:" -msgstr "de :" - -# src/print_copies.c:221 -# src/print_copies.c:221 -# src/print_copies.c:199 -# src/print_copies.c:198 -#: src/print_copies.c:198 -msgid "to:" -msgstr "à :" - -# src/print_copies_merge.c:197 -# src/print_merge.c:170 -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "Commencer par l'étiquette" - -# src/print_copies_merge.c:206 -# src/print_merge.c:179 -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "en 1ère page" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/print_copies_merge.c:186 -# src/print_merge.c:188 -#: src/print_merge.c:188 -msgid "Collate" -msgstr "Assembler" - -# src/print.c:153 -# src/print.c:153 -# src/print_copies_merge.c:173 -# src/print_merge.c:195 -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "Copies :" - -# src/preferences.c:92 -# src/prefs.c:101 -# src/prefs.c:92 -# src/prefs.c:86 -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels : Préférences" - -# src/prefs.c:248 -# src/prefs.c:226 -# src/prefs.c:220 -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Unités d'affichage" - -# src/print.c:149 -# src/prefs.c:259 -# src/prefs.c:237 -# src/prefs.c:231 -#: src/prefs.c:231 -msgid "Points" -msgstr "Points" - -# src/prefs.c:265 -# src/prefs.c:243 -# src/prefs.c:237 -#: src/prefs.c:237 -msgid "Inches" -msgstr "Pouces" - -# src/prefs.c:271 -# src/prefs.c:250 -# src/prefs.c:244 -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "Milimètres" - -# src/item_image.c:341 -# src/prefs.c:278 -# src/prefs.c:255 -# src/prefs.c:249 -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "Taille de page par défaut" - -# src/item_line.c:271 -# src/prefs.c:465 -# src/prefs.c:447 -# src/prefs.c:450 -#: src/prefs.c:450 -msgid "inches" -msgstr "pouces" - -# src/prefs.c:467 -# src/prefs.c:449 -# src/prefs.c:452 -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" - -# src/tools.c:297 -# src/tools.c:297 -#~ msgid "Function is not yet implemented!" -#~ msgstr "Cette fonction n'est pas encore implémentée !" - -# src/prop_size.c:194 -#~ msgid "w" -#~ msgstr "l" - -# src/prop_size.c:203 -#~ msgid "h" -#~ msgstr "h" - -# src/prop_position.c:183 -#~ msgid "x" -#~ msgstr "x" - -# src/prop_position.c:195 -#~ msgid "y" -#~ msgstr "y" - -# src/media_select.c:462 -#~ msgid "%.1f x %.1f" -#~ msgstr "%.1f x %.1f" - -# src/preferences.c:213 -#~ msgid "Startup" -#~ msgstr "Démarrage" - -# src/preferences.c:215 -#~ msgid "Under construction" -#~ msgstr "En construction" - -#, fuzzy -#~ msgid "Maintain original aspect ratio" -#~ msgstr "Conserver le rapport d'échelle d'origine" - -#~ msgid "Text color" -#~ msgstr "Couleur du texte" - -#~ msgid "Line Color" -#~ msgstr "Couleur de ligne" - -#~ msgid "Fill Color" -#~ msgstr "Couleur de remplissage" diff --git a/glabels1/po/glabels.pot b/glabels1/po/glabels.pot deleted file mode 100644 index 18fa25d..0000000 --- a/glabels1/po/glabels.pot +++ /dev/null @@ -1,700 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <LL@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "" - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "" - -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "" - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "" - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "" - -#: src/label.c:228 -msgid "No document root" -msgstr "" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "" - -#: src/template.c:224 -msgid "No template files found!" -msgstr "" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "" - -#: src/merge.c:78 -msgid "None" -msgstr "" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "" - -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "" - -#: src/menu.c:50 -msgid "_New" -msgstr "" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "" - -#: src/menu.c:94 -msgid "Select" -msgstr "" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "" - -#: src/menu.c:103 -msgid "Box" -msgstr "" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "" - -#: src/menu.c:168 -msgid " New " -msgstr "" - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "" - -#: src/menu.c:170 -msgid " Open " -msgstr "" - -#: src/menu.c:170 -msgid "Open a file" -msgstr "" - -#: src/menu.c:172 -msgid " Save " -msgstr "" - -#: src/menu.c:172 -msgid "Save current file" -msgstr "" - -#: src/menu.c:175 -msgid " Print " -msgstr "" - -#: src/menu.c:175 -msgid "Print current file" -msgstr "" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "" - -#: src/file.c:98 -msgid "Media Type" -msgstr "" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "" - -#: src/file.c:211 -msgid "Open" -msgstr "" - -#: src/file.c:213 -msgid "Open label" -msgstr "" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "" - -#: src/file.c:316 -msgid "Save label as" -msgstr "" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "" - -#: src/prefs.c:231 -msgid "Points" -msgstr "" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "" - -#: src/prefs.c:450 -msgid "inches" -msgstr "" - -#: src/prefs.c:452 -msgid "mm" -msgstr "" diff --git a/glabels1/po/ja.po b/glabels1/po/ja.po deleted file mode 100644 index f52d7c2..0000000 --- a/glabels1/po/ja.po +++ /dev/null @@ -1,711 +0,0 @@ -# glabels ja.po -# Copyright (C) 2001 Free Software Foundation, Inc. -# Takeshi Aihana <aihana@gnome.gr.jp>, 2001, 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.3\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2002-03-10 21:17+0900\n" -"Last-Translator: Takeshi Aihana <aihana@gnome.gr.jp>\n" -"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=euc-jp\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "»ÈÍѤ·¤Æ¤¤¤ë gLabel ¤Î¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤¹¤ë" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "½ÐÎϤ¹¤ë¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤹ¤ë (¥Ç¥Õ¥©¥ë¥È = \"output.ps\")" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "¥Õ¥¡¥¤¥ë̾" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "ÍÑ»æ¤Î¿ô (¥Ç¥Õ¥©¥ë¥È = 1)" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "ÍÑ»æ¤Î¿ô" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "¥³¥Ô¡¼¤Î¿ô (¥Ç¥Õ¥©¥ë¥È = 1)" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "¥³¥Ô¡¼¤Î¿ô" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "¥¢¥¦¥È¥é¥¤¥ó¤ò°õºþ¤¹¤ë (°õºþ»þ¤ÎÇÛÃÖ¤ò³Îǧ¤¹¤ë¤¿¤á)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "ȿž¤·¤Æ°õºþ (i.e. ²èÁü¤ò¥ß¥é¡¼¤·¤¿¤â¤Î)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[¥ª¥×¥·¥ç¥ó...] ¥Õ¥¡¥¤¥ë̾..." - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "gLabel ¤Ç»ÈÍѤ¹¤ë¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¤Þ¤»¤ó\n" - -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "gLabel ¤Ç»ÈÍѤ¹¤ë¥Õ¥¡¥¤¥ë %s ¤¬³«¤±¤Þ¤»¤ó\n" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "%s ¤Î¥³¥Ô¡¼¤òȿž¤·¤Þ¤¹¤«¡©" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "¥á¥Ç¥£¥¢¤Î¼ïÎबÆÃÄê¤Ç¤¤Þ¤»¤ó¡£¥Ç¥Õ¥©¥ë¥È¤ò»ÈÍѤ·¤Þ¤¹¡£" - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"%s ¤ÏÊÔ½¸¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\n" -"\n" -"Êݸ¤·¤Þ¤¹¤«¡©" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "Êݸ¤·¤Ê¤¤" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "¥Õ¥¡¥¤¥ë¤òÊݸ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤»¤ó" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "̾Á°¤òÉÕ¤±¤ÆÊݸ" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "¥é¥Ù¥ë¤Ë̾Á°¤òÉÕ¤±¤ÆÊݸ¤·¤ÆÊĤ¸¤Þ¤¹" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "¥é¥Ù¥ë¤Ï͸ú¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡ª" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Æ²¼¤µ¤¤" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "¥Õ¥¡¥¤¥ë¤Î½ñ¤¹þ¤ß¤Ç¥¨¥é¡¼" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "ºï½ü" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Á°¤Ë»ý¤Ã¤ÆÍè¤ë" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "¸å¤í¤Ë¤Þ¤ï¤¹" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "¥×¥í¥Ñ¥Æ¥£¤ÎÊÔ½¸..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "¥Æ¥¥¹¥È¤ÎÊÔ½¸" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "¥Æ¥¥¹¥È" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "³°´Ñ" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "ʸ»ú¥×¥í¥Ñ¥Æ¥£..." - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "°ÌÃÖ" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "ľÀþ¤ÎÊÔ½¸" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "ľÀþ" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "°ÌÃ֤ȥµ¥¤¥º" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "¥µ¥¤¥º" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "»Í³Ñ¤ÎÊÔ½¸" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "¶ë·Á" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Åɤê¤Ä¤Ö¤·" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "ÂʱߤÎÊÔ½¸" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "²èÁü¤ÎÊÔ½¸" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "²èÁü" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "²èÁü¥µ¥¤¥º¤Î¥ê¥»¥Ã¥È" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "²èÁü¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "¥Ð¡¼¥³¡¼¥É¤ÎÊÔ½¸" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "¥Ç¡¼¥¿" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "¥Ð¡¼¥³¡¼¥É¡¦¥Ç¡¼¥¿" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "Á´ÈÌ" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "¥¹¥¿¥¤¥ë" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "¤ª¤«¤·¤Ê¥Ð¡¼¥³¡¼¥É" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Éý:" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "¹â¤µ:" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "¸½ºß¤Î¥¢¥¹¥Ú¥¯¥ÈÈæΨ¤ò°Ý»ý¤¹¤ë" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "¥Ý¥¤¥ó¥È" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "¿§:" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "¥Õ¥©¥ó¥È:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "°ÌÃÖ:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "¥¡¼:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "·ë¹ç¥Õ¥£¡¼¥ë¥É¤ÎÁÞÆþ" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "Ťµ:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "³ÑÅÙ:" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "ÅÙ" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "À£Ë¡:" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "¥Ð¡¼¥³¡¼¥É¤òÉÕ¤±¤Æ¥Æ¥¥¹¥È¤òɽ¼¨¤¹¤ë" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "¥ê¥Æ¥é¥ë:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "xmlParseFile ¥¨¥é¡¼" - -#: src/label.c:228 -msgid "No document root" -msgstr "root ¥É¥¥å¥á¥ó¥È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "¥É¥¥å¥á¥ó¥È¤Î¼ïÎब´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£Glabels ̾Á°¶õ´Ö¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "¤ª¤«¤·¤Ê root ¤Î¥Î¡¼¥É = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "¤ª¤«¤·¤Ê¥Î¡¼¥É = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "XML ¥Õ¥¡¥¤¥ë¤ÎÊݸ¤ÇÌäÂ꤬¤¢¤ê¤Þ¤¹" - -#: src/template.c:224 -msgid "No template files found!" -msgstr "¥Æ¥ó¥×¥ì¡¼¥È¡¦¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡ª" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "·ë¹ç¥É¥¥å¥á¥ó¥È¡¦¥×¥í¥Ñ¥Æ¥£¤ÎÊÔ½¸" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "¥½¡¼¥¹" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "½ñ¼°:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "¾ì½ê:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "¥Õ¥£¡¼¥ë¥É" - -#: src/merge.c:78 -msgid "None" -msgstr "¤Ê¤·" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "¥¿¥Ö¤Ç¶èÀڤ俥ƥ¥¹¥È" - -#: src/merge.c:94 -#, fuzzy -msgid "Text with comma separators (CSV)" -msgstr "¥³¥ó¥Þ¤Ç¶èÀڤ俥ƥ¥¹¥È" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "¥³¥í¥ó¤Ç¶èÀڤ俥ƥ¥¹¥È" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "N/A" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "·ë¹ç¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥½¡¼¥¹¤ÎÁªÂò" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Îó" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "¥«¥¹¥¿¥à¡¦¥Õ¥£¡¼¥ë¥É¡¦¥¡¼" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "¥µ¥ó¥×¥ë¥Ç¡¼¥¿" - -#: src/menu.c:50 -msgid "_New" -msgstr "¿·µ¬(_N)" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "¿·µ¬¤Ë¶õ¤Î¥é¥Ù¥ë¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "Á´¤ÆÁªÂò²ò½ü(_N)" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "ÁªÂòÈϰϤò²ò½ü¤·¤Þ¤¹" - -#: src/menu.c:94 -msgid "Select" -msgstr "ÁªÂò" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁªÂò¡¢°ÜÆ°¡¢ÊÔ½¸¤ò¹Ô¤¤¤Þ¤¹" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "¥Æ¥¥¹¥È¡¦¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:103 -msgid "Box" -msgstr "»Í³Ñ" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "»Í³Ñ/»°³Ñ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "ľÀþ¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Âʱß" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Âʱß/±ß¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "²èÁü¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "¥Ð¡¼¥³¡¼¥É" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "¥Ð¡¼¥³¡¼¥É¡¦¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "³ÈÂç" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "½Ì¾®" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "¸µ¤Î¥µ¥¤¥º¤Ø" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "½Ä²£Èæ 1:1 ¤Î¥µ¥¤¥º¤Ë¤·¤Þ¤¹" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "·ë¹ç¥×¥í¥Ñ¥Æ¥£" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "·ë¹ç¥×¥í¥Ñ¥Æ¥£¤òÊÔ½¸¤·¤Þ¤¹" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "¥Ä¡¼¥ë(_T)" - -#: src/menu.c:168 -msgid " New " -msgstr " ¿·µ¬ " - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "¿·µ¬¤Î¥é¥Ù¥ë/¥«¡¼¥É¤òºîÀ®¤·¤Þ¤¹" - -#: src/menu.c:170 -msgid " Open " -msgstr " ³«¤¯ " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¤Þ¤¹" - -#: src/menu.c:172 -msgid " Save " -msgstr " Êݸ " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "¤³¤Î¥Õ¥¡¥¤¥ë¤òÊݸ¤·¤Þ¤¹" - -#: src/menu.c:175 -msgid " Print " -msgstr " °õºþ " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "¤³¤Î¥Õ¥¡¥¤¥ë¤ò°õºþ¤·¤Þ¤¹" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"GNOME ¸þ¤±¤Î¥é¥Ù¥ë/¥Ó¥¸¥Í¥¹¥«¡¼¥É¤ÎºîÀ®¥×¥í¥°¥é¥à¤Ç¤¹¡£\n" -"\n" -"Glabels ¤Ï¥Õ¥ê¡¼¥½¥Õ¥È¤Ç¤¹¡£¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢ºâÃĤ¬Äê¤á¤ë GNU °ìÈ̸øÍ»ÈÍѵö" -"Âú·ÀÌó½ñ¤ÎÂè2ÈǤ⤷¤¯¤Ï¤½¤ì°Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤Î²¼¤ÇÊ£À½¡¢²þÊÔ¡¢ºÆÇÛÉÛ¤¬Ç§¤á¤é¤ì" -"¤Æ¤¤¤Þ¤¹¡£\n" -"\n" -"¤³¤Î¥×¥í¥°¥é¥à¤¬Ìò¤ËΩ¤Ä¤³¤È¤ò˾¤àÃæ¤ÇÇÛÉÛ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢´°Á´ÌµÊݾڤǤ¹¡£ÈÎ" -"ÇäÌÜŪ¤Þ¤¿¤Ï¾¦ÍÑÌÜŪ¤ÎÊݾڤϤ¢¤ê¤Þ¤»¤ó¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï GNU °ìÈ̸øÍ»ÈÍѵöÂú·À" -"Ìó½ñ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "¤Þ¤À¤³¤Îµ¡Ç½¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡ª" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "¿·µ¬¥é¥Ù¥ë¤Þ¤¿¤Ï¥«¡¼¥É" - -#: src/file.c:98 -msgid "Media Type" -msgstr "¥á¥Ç¥£¥¢¤Î¼ïÎà" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "¥é¥Ù¥ë¤Î¸þ¤" - -#: src/file.c:211 -msgid "Open" -msgstr "³«¤¯" - -#: src/file.c:213 -msgid "Open label" -msgstr "¥é¥Ù¥ë¤ò³«¤¤Þ¤¹" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "¥Õ¥¡¥¤¥ë¤¬³«¤±¤Þ¤»¤ó" - -#: src/file.c:316 -msgid "Save label as" -msgstr "¥é¥Ù¥ë¤Ë̾Á°¤òÉÕ¤±¤ÆÊݸ¤·¤Þ¤¹" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "ÀâÌÀ:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "ÍÑ»æ¤Î¥µ¥¤¥º:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "¥é¥Ù¥ë¤ÎÂ礤µ:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "¥ì¥¤¥¢¥¦¥È:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d ¸Ä/¥·¡¼¥È)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "²óž¤µ¤»¤ë" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "°õºþ" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "¥³¥Ô¡¼" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "¥É¥¥å¥á¥ó¥È¤ò¥³¥ó¥È¥í¡¼¥ë¤Ë¥Þ¡¼¥¸¤¹¤ë" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "¥ª¥×¥·¥ç¥ó" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "°õºþ¥×¥ì¥Ó¥å¡¼" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "ÍÑ»æ:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "¥é¥Ù¥ë" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "³«»Ï:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "½ªÎ»:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "¥é¥Ù¥ë¤Î³«»Ï" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "(ºÇ½é¤Î¥·¡¼¥È)" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "À½ËÜ" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "¥³¥Ô¡¼:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: ÀßÄê" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "ɽ¼¨¤¹¤ëñ°Ì" - -#: src/prefs.c:231 -msgid "Points" -msgstr "¥Ý¥¤¥ó¥È" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "¥¤¥ó¥Á" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "¥ß¥ê" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "¥Ç¥Õ¥©¥ë¥È¤ÎÍѻ極¥¤¥º" - -#: src/prefs.c:450 -msgid "inches" -msgstr "[¥¤¥ó¥Á]" - -#: src/prefs.c:452 -msgid "mm" -msgstr "[¥ß¥ê]" diff --git a/glabels1/po/pl.po b/glabels1/po/pl.po deleted file mode 100644 index bfa7d1b..0000000 --- a/glabels1/po/pl.po +++ /dev/null @@ -1,712 +0,0 @@ -# Polish translation for gLabels -# Copyright (C) 2002 Free Software Foundation, Inc. -# Arkadiusz Lipiec <alipiec@elka.pw.edu.pl>, 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: gLabels\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2002-07-23 11:43+0100\n" -"Last-Translator: Arkadiusz Lipiec <alipiec@elka.pw.edu.pl>\n" -"Language-Team: Polish <pl@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "wy¶wietla ten komunikat" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "wy¶wietla aktualnie u¿ywan± wersjê glabel-batch" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "okre¶l nazwê pliku wyj¶ciowego (domy¶lnie=\"output.ps\")" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "nazwa pliku" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "liczba arkuszy (domy¶lnie=1)" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "arkusz(e/y)" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "liczba kopii (domy¶lnie=1)" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "kopi(a/e/i)" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "drukowanie ramek (w celu przetestowania wyrównania)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "drukowanie odwrócone (np. odbicie zwierciadlane)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPCJA...] PLIK_GLABELS..." - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "brak pliku glabels\n" - -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "nie mo¿na otworzyæ pliku glabels o nazwie %s\n" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "Przywróciæ zapisan± kopiê pliku %s?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "Nieznany typ no¶nika. U¿yto warto¶ci domy¶lnych." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"Plik \"%s\" zosta³ zmodyfikowany.\n" -"\n" -"Czy chcesz go zapisaæ?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "Nie zapisuj" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "Nie mo¿na zapisaæ pliku" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "Zapisz jako" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Zamyka / Zapisuje etykietê jako" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "Etykieta nie jest ju¿ poprawna!" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "Nale¿y podaæ nazwê pliku" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "B³±d podczas zapisu pliku" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "Usuñ" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Przesun na wierzch" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "Przesuñ w dó³" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "Modyfikuj w³a¶ciwo¶ci..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "Modyfikacja w³a¶ciowo¶ci tekstu" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "Tekst" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "Wygl±d" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "W³a¶ciwo¶ci tekstu" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "Pozycja" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci linii" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "Linia" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "Pozycja/Rozmiar" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "Rozmiar" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "Ramka" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Wype³nienie" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci elipsy" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci obrazu" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "Obraz" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "Wyzeruj rozmiar obrazu" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "Format obrazu aktualnie nie jest obs³ugiwany" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci kodu paskowego" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "Dane" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "Dane kodu paskowego" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "Ogólne" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "Styl" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "Niepoprawny kod paskowy" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Szeroko¶æ:" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "Wysoko¶æ:" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "Utrzymywanie aktualnych proporcji" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "punkty(-ów)" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "Kolor:" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "Czcionka:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "Wyrównanie:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "Klucz:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "Wstaw pole z³±czenia" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "D³ugo¶æ:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "K±t" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "stopni(e)" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "Skala" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Wy¶wietlanie tekstu z kodem paskowym" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "Litera³:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "b³±d przetwarzania pliku xml" - -#: src/label.c:228 -msgid "No document root" -msgstr "Brak g³ównego dokumentu" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "" -"dokument jest niepoprawnego typu, nie odnaleziono przestrzeni nazw glabels" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Niepoprawny wêze³ g³ówny = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "niepoprawny wêze³ = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Problem podczas zapisu pliku xml." - -#: src/template.c:224 -msgid "No template files found!" -msgstr "Nie znaleziono pliku szablonu!" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "Modyfikacja w³a¶ciwo¶ci z³±czania dokumentów" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "¬ród³o" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "Format:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "Po³o¿enie:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Pola" - -#: src/merge.c:78 -msgid "None" -msgstr "Brak" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "Tekst oddzielony tabulacjami" - -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "Tekst oddzielony przecinkami (CSV)" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "Tekst oddzielany dwukropkami" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "N/A" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "Wybierz ¼ród³o bazy danych z³±czania " - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Kolumna" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "W³asny klucz pola" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "Próbne dane" - -#: src/menu.c:50 -msgid "_New" -msgstr "_Nowa" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "Tworzy now±, pust± etykietê" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "O_dznacz wszystko" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "Usuwa wszelkie zaznaczenia" - -#: src/menu.c:94 -msgid "Select" -msgstr "Wybierz" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "Wybierz, przeno¶ i modyfikuj obiekty" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "Tworzy obiekt tekstowy" - -#: src/menu.c:103 -msgid "Box" -msgstr "Skrzynka" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "Tworzy skrzynkê/prostok±t" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "Tworzy liniê" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Elipsa" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Tworzy elipsê/okr±g" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "Tworzy obraz" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "Kod paskowy" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "Tworzy kod paskowy" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "Powiêksz" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "Pomniejsz" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "Powiêkszenie 1:1" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "Powiêksza 1:1" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "W³a¶ciwo¶ci z³±czania" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "Modyfikuje w³a¶ciwo¶ci z³±czania" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "_Narzêdzia" - -#: src/menu.c:168 -msgid " New " -msgstr " Nowa " - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "Nowa Etykieta/Karta" - -#: src/menu.c:170 -msgid " Open " -msgstr " Otwórz " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "Otwiera plik" - -#: src/menu.c:172 -msgid " Save " -msgstr " Zapisz " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "Zapisuje bie¿±cy plik" - -#: src/menu.c:175 -msgid " Print " -msgstr " Wydrukuj " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "Drukuje bie¿±cy plik" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"Program do tworzenia etykiet i wizytówek dla GNOME.\n" -"\n" -"Glabels jest oprogramowaniem wolnodostêpnym, mo¿na rozpowszechniaæ go lub/" -"imodyfikowaæ na zasadach Licencji Publicznej GNU opublikowanej przez Free " -"Software Foundation; zarówno w wersji 2 tej licencji, jak (do wyboru) i " -"dowolnej pó¼niejszej wersji.\n" -"\n" -"Ten program jest rozpowszechniany w nadziei u¿yteczno¶ci, lecz BEZ ¯ADNEJ " -"GWARANCJI; nawet wynikaj±cej z RÊKOJMI lub U¯YWANIA W OKRE¦LONYM CELU. " -"Zajrzyj do Licencji Publicznej GNU aby uzyskaæ wiêcej szczegó³ów.\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "Funkcja nie jest zaimplementowana!" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "Nowa etykieta lub karta" - -#: src/file.c:98 -msgid "Media Type" -msgstr "Typ no¶nika" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "U³o¿enie etykiety" - -#: src/file.c:211 -msgid "Open" -msgstr "Otwórz" - -#: src/file.c:213 -msgid "Open label" -msgstr "Otwórz etykietê" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "Nie mo¿na otworzyæ pliku" - -#: src/file.c:316 -msgid "Save label as" -msgstr "Zapisz etykietê jako" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "Opis:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "Rozmiar strony:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "Rozmiar etykiety:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "Wygl±d:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d na arkusz)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "Obróæ" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "Wydrukuj" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "Kopie" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "Kontrola z³±czania dokumentów" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "Opcje" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "Podgl±d wydruku" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "Arkusze:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "Etykiety" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "od:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "do:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "Rozpocznij od etykiety" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "na pierwszym arkuszu" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "Uk³adanie" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "Kopie:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: Preferencje" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Jednostki wy¶wietlania" - -#: src/prefs.c:231 -msgid "Points" -msgstr "Punkty" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "Cale" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "Milimetry" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "Domy¶lny rozmiar strony" - -#: src/prefs.c:450 -msgid "inches" -msgstr "cali" - -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" diff --git a/glabels1/po/pt_BR.po b/glabels1/po/pt_BR.po deleted file mode 100644 index cdfe207..0000000 --- a/glabels1/po/pt_BR.po +++ /dev/null @@ -1,715 +0,0 @@ -# Brazilian Portuguese translation of Glabels. -# Copyright (C) 2001 Jim Evins <evins@snaught.com> -# Paulo R. Ormenese <pormenese@uol.com.br>, 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.6\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2003-01-03 22:30-0300\n" -"Last-Translator: Paulo R. Ormenese <pormenese@uol.com.br>\n" -"Language-Team: Brazilian portuguese <>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "mostra esta mensagem" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "mostra a versão de glabels-batch que está sendo utilizada" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "define o nome do arquivo de saída (padrão=\"output.ps\")" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "nome de arquivo" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "número de páginas (padrão=1)" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "páginas" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "número de cópias (padrão=1)" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "cópias" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "imprimir contornos (testar alinhamento da impressora)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "imprimir ao contrário (como uma imagem de espelho)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPÇÃO...] ARQUIVO_GLABELS..." - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "faltando arquivo glabels\n" - -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "impossível abrir o arquivo glabels\n" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "Reverter para a cópia gravada de %s?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "Tipo de mídia desconhecido. Usando padrão." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"``%s'' foi modificado.\n" -"\n" -"Deseja salvá-lo?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "Não salve" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "Impossível salvar o arquivo" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "Salvar como" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Fechar / Salvar etiqueta como" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "Etiqueta não é mais válida" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "Necessário informar nome do arquivo" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "Erro gravando o arquivo" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "Apagar" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "Trazer para frente" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "Enviar para trás" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "Editar propriedades..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "Editar propriedades do objeto texto" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "Texto" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "Aparência" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "Propriedades de Texto" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "Posição" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "Editar propriedades do objeto linha" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "Linha" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "Posição/Tamanho" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "Tamanho" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "Editar propriedades do objeto caixa" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "Contorno" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "Preencher" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "Editar propriedades do objeto elipse" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "Editar propriedades do objeto imagem" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "Imagem" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "Redefinir tamanho da imagem" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "Formato de imagem não suportado atualmente" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "Editar propriedades do objeto código de barras" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "Dado" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "Dado do Código de Barras:" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "Geral" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "Estilo" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "Código de barras inválido" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Largura:" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "Altura:" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "Manter taxa de aspecto atual" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "pontos" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "Cor:" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "Fonte:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "Alinhamento:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "Chave:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "Inserir campo de fusão" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "Comprimento:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "Ângulo:" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "graus" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "Escala:" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Exibir texto com código de barras" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "Literal:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "erro: xmlParseFile" - -#: src/label.c:228 -msgid "No document root" -msgstr "Sem raiz do documento" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "documento de tipo errado, espaço de nome glabels não encontrado" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Nó raiz ruim = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "nó ruim = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Problema salvando arquivo xml." - -#: src/template.c:224 -msgid "No template files found!" -msgstr "Nenhum arquivo modelo encontrado!" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "Editar propriedades de fusão do documento" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "Fonte" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "Formato:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "Localização" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Campos" - -#: src/merge.c:78 -msgid "None" -msgstr "Nenhum" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "Texto separado com tab" - -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "Texto separado com vírgulas (CSV)" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "Texto separado com dois pontos" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "Não definido" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "Selecione a fonte da base de dados da fusão" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "Coluna" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "Chave do campo específico" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "Dado de amostra" - -#: src/menu.c:50 -msgid "_New" -msgstr "_Novo" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "Criar uma etiqueta nova, vazia" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "D_esmarcar Tudo " - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "Remover todas as seleções" - -#: src/menu.c:94 -msgid "Select" -msgstr "Selecionar" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "Selecionar, movimentar e modificar objetos" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "Criar objeto texto" - -#: src/menu.c:103 -msgid "Box" -msgstr "Caixa" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "Criar objeto caixa/retângulo" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "Criar objeto linha" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "Elipse" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "Criar objeto elipse/círculo" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "Criar objeto imagem" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "Código de Barras" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "Criar objeto código de barras" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "Mais Zoom" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "Menos Zoom" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "Zoom 1:1" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "Zoom para 1:1" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "Propriedades de Fusão" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "Editar propriedades de fusão" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "_Ferramentas" - -#: src/menu.c:168 -msgid " New " -msgstr " Novo " - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "Nova Etiqueta/Cartão" - -#: src/menu.c:170 -msgid " Open " -msgstr " Abrir " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "Abrir um arquivo" - -#: src/menu.c:172 -msgid " Save " -msgstr " Salvar " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "Salvar arquivo atual" - -#: src/menu.c:175 -msgid " Print " -msgstr " Imprimir " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "Imprimir arquivo atual" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"Um programa para criação de etiquetas e cartões de negócios para o GNOME.\n" -"\n" -"Glabels é software livre; você pode redistribuí-lo e/ou modificá-lo sob os " -"termos da Licença Pública Geral GNU conforme publicada pela Free Software " -"Foundation; ou a versão 2 da Licença, ou (sob sua opção) qualquer versão " -"posterior.\n" -"\n" -"Este programa é distribuido na esperança de que seja útil, mas SEM QUALQUER " -"GARANTIA; sem mesmo as garantias implícitas de COMERCIALIZAÇÃO ou AJUSTES A " -"UM PROPÓSITO PARTICULAR. Veja a Licença Pública Geral GNU para mais " -"detalhes.\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "Função não está implementada!" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "Nova Etiqueta ou Cartão" - -#: src/file.c:98 -msgid "Media Type" -msgstr "Tipo de mídia" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "Orientação da etiqueta" - -#: src/file.c:211 -msgid "Open" -msgstr "Abrir" - -#: src/file.c:213 -msgid "Open label" -msgstr "Abrir etiqueta" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "Impossível abrir o arquivo" - -#: src/file.c:316 -msgid "Save label as" -msgstr "Salvar etiqueta como" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "Descrição:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "Tamanho da página:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "Tamanho da etiqueta:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "Disposição:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d por página)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "Girar" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "Imprimir" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "Cópias" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "Controle de fusão do documento" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "Opções" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "Visualizar impressão" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "Páginas:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "Etiquetas" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "de:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "até:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "Iniciar na etiqueta" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "na primeira folha" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "Ordenar" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "Cópias:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: Preferências" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Exibir unidades" - -#: src/prefs.c:231 -msgid "Points" -msgstr "Pontos" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "Polegadas" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "Milímetros" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "Tamanho de página padrão" - -#: src/prefs.c:450 -msgid "inches" -msgstr "poleg." - -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" - -#~ msgid "Function is not yet implemented!" -#~ msgstr "Função ainda não implementada!" diff --git a/glabels1/po/ru.po b/glabels1/po/ru.po deleted file mode 100644 index 834ce31..0000000 --- a/glabels1/po/ru.po +++ /dev/null @@ -1,714 +0,0 @@ -# Russian translation of glabels. -# Copyright (C) 2002 Free Software Foundation, Inc. -# Vitaly Lipatov <lav@altlinux.ru>, 2002 -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.5\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2002-09-06 01:32MSK\n" -"Last-Translator: Vitaly Lipatov <lav@altlinux.ru>\n" -"Language-Team: Russian <ru@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=KOI8-R\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.6\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "ÎÁÐÅÞÁÔÁÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "ÎÁÐÅÞÁÔÁÔØ ÉÓÐÏÌØÚÕÅÍÕÀ ×ÅÒÓÉÀ ÐÁËÅÔÎÏÊ ÏÂÒÁÂÏÔËÉ glabels" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "ÕÓÔÁÎÏ×ÉÔØ ÎÁÚ×ÁÎÉÅ ×ÙÈÏÄÎÏÇÏ ÆÁÊÌÁ (ÐÏ ÕÍÏÌÞÁÎÉÀ - \"output.ps\"" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "ÎÁÚ×ÁÎÉÅ" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "ËÏÌÉÞÅÓÔ×Ï ÓÔÒÁÎÉà (ÐÏ ÕÍÏÌÞÁÎÉÀ - 1)" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "ÓÔÒÁÎÉÃ" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "ËÏÌÉÞÅÓÔ×Ï ËÏÐÉÊ (ÐÏ ÕÍÏÌÞÁÎÉÀ - 1)" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "ËÏÐÉÊ" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "ÎÁÐÅÞÁÔÁÔØ ËÏÎÔÕÒÙ ÜÔÉËÅÔÏË" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "ÎÁÐÅÞÁÔÁÔØ ÚÅÒËÁÌØÎÏ" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[ðáòáíåôòù...] ÆÁÊÌ_glabels" - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "ÎÅ ÕËÁÚÁÎ ÆÁÊÌ glabels\n" - -#: src/glabels_batch.c:139 -msgid "cannot open glabels file %s\n" -msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ %s\n" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "÷ÅÒÎÕÔØÓÑ Ë ÓÏÈÒÁΣÎÎÏÊ ËÏÐÉÉ %s?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "îÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ ÎÏÓÉÔÅÌÑ. éÓÐÏÌØÚÕÅÍ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"``%s'' ÂÙÌ ÉÚÍÅΣÎ.\n" -"\n" -"óÏÈÒÁÎÉÔØ ÅÇÏ?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "îÅ ÓÏÈÒÁÎÑÔØ" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÆÁÊÌ" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "óÏÈÒÁÎÉÔØ ËÁË" - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "úÁËÒÙÔØ / óÏÈÒÁÎÉÔØ ÜÔÉËÅÔËÕ ËÁË" - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "üÔÉËÅÔËÁ ÂÏÌØÛÅ ÎÅ ×ÅÒÎÁ!" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "îÁÚ×ÁÎÉÅ ÆÁÊÌÁ ÄÏÌÖÎÏ ÂÙÔØ ÕËÁÚÁÎÏ" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ ÆÁÊÌÁ" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "õÄÁÌÉÔØ" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "îÁ ÐÅÒÅÄÎÉÊ ÐÌÁÎ" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "îÁ ÚÁÄÎÉÊ ÐÌÁÎ" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "éÚÍÅÎÉÔØ Ó×ÏÊÓÔ×Á..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "éÚÍÅÎÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÔÅËÓÔ" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "ôÅËÓÔ" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "÷ÎÅÛÎÉÊ ×ÉÄ" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "ó×ÏÊÓÔ×Á ÔÅËÓÔÁ" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "òÁÓÐÏÌÏÖÅÎÉÅ" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "éÚÍÅÎÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÌÉÎÉÑ" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "ìÉÎÉÑ" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "òÁÓÐÏÌÏÖÅÎÉÅ/òÁÚÍÅÒ" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "òÁÚÍÅÒ" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "éÚÍÅÎÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÐÒÑÍÏÕÇÏÌØÎÉË" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "ëÏÎÔÕÒ" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "úÁÐÏÌÎÅÎÉÅ" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "éÓÐÒÁ×ÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÜÌÌÉÐÓ" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "éÓÐÒÁ×ÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÉÚÏÂÒÁÖÅÎÉÅ" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "éÚÏÂÒÁÖÅÎÉÅ" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "õÓÔÁÎÏ×ÉÔØ ÒÁÚÍÅÒ ÉÚÏÂÒÁÖÅÎÉÑ ÐÏ ÕÍÏÌÞÁÎÉÀ" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "äÁÎÎÙÊ ÆÏÒÍÁÔ ÉÚÏÂÒÁÖÅÎÉÊ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "éÚÍÅÎÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅËÔÁ ÔÉÐÁ ÛÔÒÉÈ-ËÏÄ" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "äÁÎÎÙÅ" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "äÁÎÎÙÅ ÛÔÒÉÈ-ËÏÄÁ" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "ïÂÝÅÅ" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "ôÉÐ" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "îÅ×ÅÒÎÙÊ ÛÔÒÉÈ-ËÏÄ" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "ûÉÒÉÎÁ:" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "÷ÙÓÏÔÁ:" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "óÏÈÒÁÎÑÔØ ÔÅËÕÝÉÅ ÐÒÏÐÏÒÃÉÉ" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "ÔÏÞÅË" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "ã×ÅÔ:" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "ûÒÉÆÔ:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "÷ÙÒÁ×ÎÉ×ÁÎÉÅ:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "ëÌÀÞ:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "÷ÓÔÁ×ÉÔØ ÏÂßÅÄÉÎÉÔÅÌØÎÏÅ ÐÏÌÅ" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "äÌÉÎÁ:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "õÇÏÌ:" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "ÇÒÁÄÕÓÏ×" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "íÁÓÛÔÁÂ:" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "ðÏËÁÚÁÔØ ÔÅËÓÔ ÓÏ ÛÔÒÉÈ-ËÏÄÏÍ" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "âÕË×ÁÌØÎÏ:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "ïÛÉÂËÁ ÐÒÉ ÒÁÚÂÏÒÅ ÆÁÊÌÁ XML" - -#: src/label.c:228 -msgid "No document root" -msgstr "îÅÔ ËÏÒÎÑ ÄÏËÕÍÅÎÔÁ" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "ÄÏËÕÍÅÎÔ ÎÅ×ÅÒÎÏÇÏ ÔÉÐÁ, ÐÒÏÓÔÒÁÎÓÔ×Ï ÉͣΠÎÅ ÎÁÊÄÅÎÏ" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "îÅ×ÅÒÎÙÊ ËÏÒÎÅ×ÏÊ ÕÚÅÌ = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "ÎÅ×ÅÒÎÙÊ ÕÚÅÌ = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "ðÒÏÂÌÅÍÙ ÐÒÉ ÓÏÈÒÁÎÅÎÉÉ ÆÁÊÌÁ XML" - -#: src/template.c:224 -msgid "No template files found!" -msgstr "îÅ ÎÁÊÄÅÎÙ ÆÁÊÌÙ ÛÁÂÌÏÎÁ!" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "éÓÐÒÁ×ÉÔØ Ó×ÏÊÓÔ×Á ÄÏËÕÍÅÎÔÁ-ÏÂßÅÄÉÎÅÎÉÑ" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "éÓÔÏÞÎÉË" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "æÏÒÍÁÔ:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "òÁÓÐÏÌÏÖÅÎÉÅ:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "ðÏÌÑ" - -#: src/merge.c:78 -msgid "None" -msgstr "îÉÞÅÇÏ" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "ôÅËÓÔ Ó ÔÁÂÕÌÑÔÏÒÁÍÉ × ËÁÞÅÓÔ×Å ÒÁÚÄÅÌÉÔÅÌÑ" - -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "ôÅËÓÔ Ó ÚÁÐÑÔÙÍÉ × ËÁÞÅÓÔ×Å ÒÁÚÄÅÌÉÔÅÌÑ" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "ôÅËÓÔ Ó Ä×ÏÅÔÏÞÉÑÍÉ × ËÁÞÅÓÔ×Å ÒÁÚÄÅÌÉÔÅÌÑ" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "îÅÄÏÓÔÕÐÎÏ" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "÷ÙÂÒÁÔØ ÉÓÔÏÞÎÉË ÏÂßÅÄÉÎÅÎÉÑ-ÂÁÚÙ ÄÁÎÎÙÈ" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "óÔÏÌÂÅÃ" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "îÅÓÔÁÎÄÁÒÔÎÙÊ ËÌÀÞ ÐÏÌÑ" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "ðÒÉÍÅÒ ÄÁÎÎÙÈ" - -#: src/menu.c:50 -msgid "_New" -msgstr "_óÏÚÄÁÔØ" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "óÏÚÄÁÔØ ÎÏ×ÕÀ, ÐÕÓÔÕÀ ÜÔÉËÅÔËÕ" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "_óÎÑÔØ ×ÙÄÅÌÅÎÉÅ" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "õÄÁÌÉÔØ ×Ó£ ×ÙÄÅÌÅÎÎÏÅ" - -#: src/menu.c:94 -msgid "Select" -msgstr "÷ÙÂÏÒ" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "÷ÙÂÒÁÔØ, ÐÅÒÅÍÅÓÔÉÔØ ÉÌÉ ÉÚÍÅÎÉÔØ ÏÂßÅËÔÙ" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "óÏÚÄÁÔØ ÔÅËÓÔÏ×ÙÊ ÏÂßÅËÔ" - -#: src/menu.c:103 -msgid "Box" -msgstr "ðÒÑÍÏÕÇÏÌØÎÉË" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "óÏÚÄÁÔØ ÐÒÑÍÏÕÇÏÌØÎÉË" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "óÏÚÄÁÔØ ÌÉÎÉÀ" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "üÌÌÉÐÓ" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "óÏÚÄÁÔØ ÜÌÌÉÐÓ/ËÒÕÇ" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "óÏÚÄÁÔØ ÉÚÏÂÒÁÖÅÎÉÅ" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "ûÔÒÉÈ-ËÏÄ" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "óÏÚÄÁÔØ ÏÂßÅËÔ ÛÔÒÉÈ-ËÏÄÁ" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "õ×ÅÌÉÞÉÔØ" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "õÍÅÎØÛÉÔØ" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "íÁÓÛÔÁ 1:1" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "õÓÔÁÎÏ×ÉÔØ ÍÁÓÛÔÁÂ" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "ó×ÏÊÓÔ×Á ÏÂßÅÄÉÎÅÎÉÑ" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "éÓÐÒÁ×ÉÔØ Ó×ÏÊÓÔ×Á ÏÂßÅÄÉÎÅÎÉÑ" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "_éÎÓÔÒÕÍÅÎÔÙ" - -#: src/menu.c:168 -msgid " New " -msgstr "óÏÚÄÁÔØ" - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "óÏÚÄÁÔØ ÎÏ×ÕÀ ÜÔÉËÅÔËÕ ÉÌÉ ×ÉÚÉÔËÕ" - -#: src/menu.c:170 -msgid " Open " -msgstr "ïÔËÒÙÔØ" - -#: src/menu.c:170 -msgid "Open a file" -msgstr "ïÔËÒÙÔØ ÆÁÊÌ" - -#: src/menu.c:172 -msgid " Save " -msgstr "óÏÈÒÁÎÉÔØ" - -#: src/menu.c:172 -msgid "Save current file" -msgstr "óÏÈÒÁÎÉÔØ ÔÅËÕÝÉÊ ÆÁÊÌ" - -#: src/menu.c:175 -msgid " Print " -msgstr "òÁÓÐÅÞÁÔÁÔØ" - -#: src/menu.c:175 -msgid "Print current file" -msgstr "òÁÓÐÅÞÁÔÁÔØ ÔÅËÕÝÉÊ ÆÁÊÌ" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"ðÒÏÇÒÁÍÍÁ ÓÏÚÄÁÎÉÑ ÜÔÉËÅÔÏË É ×ÉÚÉÔÏË ÄÌÑ GNOME\n" -" \n" -"Glabels Ñ×ÌÑÅÔÓÑ Ó×ÏÂÏÄÎÙÍ ÐÒÏÇÒÁÍÍÎÙÍ ÏÂÅÓÐÅÞÅÎÉÅÍ; ×Ù ×ÐÒÁ×Å " -"ÒÁÓÐÒÏÓÔÒÁÎÑÔØ Å£ É/ÉÌÉ ÍÏÄÉÆÉÃÉÒÏ×ÁÔØ × ÓÏÏÔ×ÅÔÓÔ×ÉÑÍÉ Ó ÕÓÌÏ×ÉÑÍÉ ×ÅÒÓÉÉ 2 " -"ÌÉÂÏ ÐÏ ×ÁÛÅÍÕ ×ÙÂÏÒÕ ÂÏÌÅÅ ÐÏÚÄÎÅÊ ×ÅÒÓÉÉ óÔÁÎÄÁÒÔÎÏÊ ïÂÝÅÓÔ×ÅÎÎÏÊ ìÉÃÅÎÚÉÉ " -"GNU, ÏÐÕÂÌÉËÏ×ÁÎÎÏÊ Free Software Foundation.\n" -" \n" -"íÙ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍ ÄÁÎÎÕÀ ÐÒÏÇÒÁÍÍÕ × ÎÁÄÅÖÄÅ ÎÁ ÔÏ, ÞÔÏ ÏÎÁ ÂÕÄÅÔ ×ÁÍ " -"ÐÏÌÅÚÎÏÊ, ÏÄÎÁËÏ îå ðòåäïóôá÷ìñåí îá îå³ îéëáëéè çáòáîôéê, × ÔÏÍ ÞÉÓÌÅ " -"çáòáîôéé ôï÷áòîïçï óïóôïñîéñ ðòé ðòïäáöå É ðòéçïäîïóôé äìñ éóðïìøúï÷áîéñ ÷ " -"ëïîëòåôîùè ãåìñè. äÌÑ ÐÏÌÕÞÅÎÉÑ ÂÏÌÅÅ ÐÏÄÒÏÂÎÏÊ ÉÎÆÏÒÍÁÃÉÉ ÏÚÎÁËÏÍØÔÅÓØ ÓÏ " -"óÔÁÎÄÁÒÔÎÏÊ ïÂÝÅÓÔ×ÅÎÎÏÊ ìÉÃÅÎÚÉÅÊ GNU.\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "æÕÎËÃÉÑ ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁ!" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "îÏ×ÁÑ ÜÔÉËÅÔËÁ ÉÌÉ ×ÉÚÉÔËÁ" - -#: src/file.c:98 -msgid "Media Type" -msgstr "ôÉÐ ÎÏÓÉÔÅÌÑ" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "òÁÓÐÏÌÏÖÅÎÉÅ ÜÔÉËÅÔËÉ" - -#: src/file.c:211 -msgid "Open" -msgstr "ïÔËÒÙÔØ" - -#: src/file.c:213 -msgid "Open label" -msgstr "ïÔËÒÙÔØ ÜÔÉËÅÔËÕ" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ" - -#: src/file.c:316 -msgid "Save label as" -msgstr "óÏÈÒÁÎÉÔØ ÜÔÉËÅÔËÕ ËÁË" - -#: src/media_select.c:222 -msgid "Description:" -msgstr "ïÐÉÓÁÎÉÅ:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "òÁÚÍÅÒ ÓÔÒÁÎÉÃÙ:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "òÁÚÍÅÒ ÜÔÉËÅÔËÉ:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "æÏÒÍÁÔ:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d ÎÁ ÌÉÓÔ)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "ðÏ×ÅÒÎÕÔØ" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "òÁÓÐÅÞÁÔÁÔØ" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "ëÏÐÉÊ" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "õÐÒÁ×ÌÅÎÉÅ ÏÂßÅÄÉÎÅÎÉÅÍ" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "ðÁÒÁÍÅÔÒÙ" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "ðÒÏÓÍÏÔÒÅÔØ" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "ìÉÓÔÏ×:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "üÔÉËÅÔËÉ" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "Ó:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "ÄÏ:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "îÁÞÁÔØ Ó ÜÔÉËÅÔËÉ" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "ÎÁ ÐÅÒ×ÏÍ ÌÉÓÔÅ" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "óÏÂÉÒÁÔØ" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "ëÏÐÉÊ:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: ðÁÒÁÍÅÔÒÙ" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "åÄÉÎÉÃÙ ÏÔÏÂÒÁÖÅÎÉÑ" - -#: src/prefs.c:231 -msgid "Points" -msgstr "ôÏÞËÉ" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "äÀÊÍÙ" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "íÉÌÌÉÍÅÔÒÙ" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "òÁÚÍÅÒ ÂÕÍÁÇÉ ÐÏ ÕÍÏÌÞÁÎÉÀ" - -#: src/prefs.c:450 -msgid "inches" -msgstr "ÄÀÊÍÏ×" - -#: src/prefs.c:452 -msgid "mm" -msgstr "ÍÍ" - diff --git a/glabels1/po/stamp-cat-id b/glabels1/po/stamp-cat-id deleted file mode 100644 index 9788f70..0000000 --- a/glabels1/po/stamp-cat-id +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/glabels1/po/zh_TW.Big5.po b/glabels1/po/zh_TW.Big5.po deleted file mode 100644 index 864f618..0000000 --- a/glabels1/po/zh_TW.Big5.po +++ /dev/null @@ -1,712 +0,0 @@ -# Traditional Chinese Translation for glabels -# Copyright (C) 2002 Free Software Foundation, Inc. -# Shell Hung <shell@debian.org>, 2002 -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.4\n" -"POT-Creation-Date: 2002-08-24 22:30-0400\n" -"PO-Revision-Date: 2002-07-14 18:30+0800\n" -"Last-Translator: Shell Hung <shell@debian.org>\n" -"Language-Team: zh-l10n <zh-l10n@linux.org.tw>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=big5\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels_batch.c:49 -msgid "print this message" -msgstr "¦C¦L³oÓ°T®§" - -#: src/glabels_batch.c:51 -msgid "print the version of glabels-batch being used" -msgstr "¦C¦L¥X glabels-batch ªºª©¥»¸ê°T" - -#: src/glabels_batch.c:53 -msgid "set output filename (default=\"output.ps\")" -msgstr "³]©w¿é¥XÀɦWºÙ (¹w³]¬°\"output.ps\")" - -#: src/glabels_batch.c:53 -msgid "filename" -msgstr "ÀɮצWºÙ" - -#: src/glabels_batch.c:55 -msgid "number of sheets (default=1)" -msgstr "¯È±i¼Æ¥Ø (¹w³]¬° 1)" - -#: src/glabels_batch.c:55 -msgid "sheets" -msgstr "¯È±i" - -#: src/glabels_batch.c:57 -msgid "number of copies (default=1)" -msgstr "¥÷¼Æ (¹w³]¬° 1)" - -#: src/glabels_batch.c:57 -msgid "copies" -msgstr "¥÷¼Æ" - -#: src/glabels_batch.c:59 src/print_dialog.c:152 -msgid "print outlines (to test printer alignment)" -msgstr "¦L¥X¥~Ãä (´ú¸Õ¥´¦L¾÷°Ñ¼Æ)" - -#: src/glabels_batch.c:61 src/print_dialog.c:160 -msgid "print in reverse (i.e. a mirror image)" -msgstr "¤Ï¤è¦V¦C¦L (¦p˦V¼v¹³)" - -#: src/glabels_batch.c:92 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[¿ï¶µ...] GLABELS_FILE..." - -#: src/glabels_batch.c:111 -msgid "missing glabels file\n" -msgstr "¨S¦³¿é¤J glabels ªºÀÉ®×\n" - -#: src/glabels_batch.c:139 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "¶}±ÒÀÉ®×¥¢±Ñ %s\n" - -#: src/mdi.c:169 -#, c-format -msgid "Revert to saved copy of %s?" -msgstr "n¸ü¤J¤wÀx¦sªº³Æ¥÷ %s ?" - -#: src/mdi.c:207 -msgid "Unknown media type. Using default." -msgstr "¤£©úªº´CÅéÃþ§Î. ¨Ï¥Î¹w³]." - -#: src/mdi.c:455 -#, c-format -msgid "" -"``%s'' has been modified.\n" -"\n" -"Do you wish to save it?" -msgstr "" -"``%s`` ¤w³Qקï.\n" -"\n" -"n²{¦bÀx¦s¶Ü ?" - -#: src/mdi.c:459 -msgid "Don't save" -msgstr "¤£nÀx¦s" - -#: src/mdi.c:601 src/file.c:288 -msgid "Cannot save file" -msgstr "¤£¯àÀx¦sÀÉ®×" - -#: src/mdi.c:623 src/file.c:311 -msgid "Save As" -msgstr "¥t¦s¬°..." - -#: src/mdi.c:626 -msgid "Close / Save label as" -msgstr "Ãö³¬ / Àx¦s¼Ðñ¬°..." - -#: src/mdi.c:680 src/file.c:352 -msgid "Label no longer valid!" -msgstr "¼Ðñ¨Ã¤£¬O¥¿½T¥iŪªº !" - -#: src/mdi.c:693 src/file.c:362 -msgid "Must supply file name" -msgstr "½Ð¥²»Ý¿é¤JÀɮצWºÙ" - -#: src/mdi.c:705 src/file.c:374 -msgid "Error writing file" -msgstr "¦b¼g¤JÀɮ׮ɵo¥Í¿ù»~" - -#: src/display.c:1250 src/display.c:1298 -msgid "Delete" -msgstr "§R°£" - -#: src/display.c:1260 src/display.c:1308 -msgid "Bring to front" -msgstr "±a¥X¨ì«e±" - -#: src/display.c:1266 src/display.c:1314 -msgid "Send to back" -msgstr "©ñ¦b³Ì©³" - -#: src/display.c:1287 -msgid "Edit properties..." -msgstr "קï³]©w..." - -#: src/item_text.c:450 -msgid "Edit text object properties" -msgstr "קï¤å¦rª«¥óªº³]©w" - -#: src/item_text.c:460 src/item_text.c:464 src/item_text.c:637 src/menu.c:100 -msgid "Text" -msgstr "¤å¦r" - -#: src/item_text.c:479 src/item_line.c:253 src/item_box.c:245 -#: src/item_ellipse.c:247 src/item_barcode.c:317 -msgid "Appearance" -msgstr "¼Ë»ª" - -#. ------ Begin Text Properties box ------ -#: src/item_text.c:482 -msgid "Text Properties" -msgstr "¤å¦r¼Ë»ª" - -#. ------ Position Frame ------ -#: src/item_text.c:500 src/item_text.c:503 src/item_line.c:274 -#: src/item_box.c:275 src/item_ellipse.c:277 src/item_image.c:318 -#: src/item_barcode.c:345 src/item_barcode.c:348 -msgid "Position" -msgstr "¦ì¸m" - -#: src/item_line.c:243 -msgid "Edit line object properties" -msgstr "קï½uª«¥óªº³]©w" - -#. ------ Begin Line box ------ -#: src/item_line.c:256 src/menu.c:106 -msgid "Line" -msgstr "½u" - -#: src/item_line.c:271 src/item_box.c:272 src/item_ellipse.c:274 -#: src/item_image.c:315 -msgid "Position/Size" -msgstr "¦ì¸m/¤j¤p" - -#. ------ Size Frame ------ -#: src/item_line.c:285 src/item_box.c:286 src/item_ellipse.c:288 -#: src/item_image.c:329 -msgid "Size" -msgstr "¤j¤p" - -#: src/item_box.c:235 -msgid "Edit box object properties" -msgstr "קï¤è¶ôª«¥ó³]©w" - -#. ------ Line box ------ -#: src/item_box.c:248 src/item_ellipse.c:250 -msgid "Outline" -msgstr "¥~Ãä" - -#. ------ Fill box ------ -#: src/item_box.c:258 src/item_ellipse.c:260 -msgid "Fill" -msgstr "¶ñº¡" - -#: src/item_ellipse.c:237 -msgid "Edit ellipse object properties" -msgstr "קï¾ò¶êª«¥ó³]©w" - -#: src/item_image.c:257 -msgid "Edit image object properties" -msgstr "קï¹Ï¹³ª«¥ó³]©w" - -#: src/item_image.c:268 src/menu.c:113 -msgid "Image" -msgstr "¹Ï¹³" - -#. ------ Size Reset Button ------ -#: src/item_image.c:342 -msgid "Reset image size" -msgstr "«³]¹Ï¹³¤j¤p" - -#: src/item_image.c:389 src/item_image.c:454 -msgid "Image format not currently supported" -msgstr "¹Ï¹³®æ¦¡¨Ã¨S¦³¤ä´©" - -#: src/item_barcode.c:287 -msgid "Edit barcode object properties" -msgstr "קï¼Æ½X±øª«¥ó³]©w" - -#: src/item_barcode.c:297 -msgid "Data" -msgstr "¸ê®Æ" - -#: src/item_barcode.c:299 -msgid "Barcode data" -msgstr "¼Æ½X±ø¸ê®Æ" - -#. ------ Begin Barcode Properties Frame ------ -#: src/item_barcode.c:320 src/prefs.c:215 -msgid "General" -msgstr "¤@¯ë" - -#. ------ Barcode Style Frame ------ -#: src/item_barcode.c:330 -msgid "Style" -msgstr "¼Ë¦¡" - -#: src/item_barcode.c:549 src/item_barcode.c:572 src/print.c:631 -msgid "Invalid barcode" -msgstr "¤£¥¿½Tªº¼Æ½X±ø" - -#. W Label -#: src/prop_size.c:182 src/prop_line.c:169 -msgid "Width:" -msgstr "Áï«×:" - -#. H label -#: src/prop_size.c:198 -msgid "Height:" -msgstr "°ª«×:" - -#: src/prop_size.c:222 -msgid "Maintain current aspect ratio" -msgstr "«O¯d²{¦³ªº¤j¤p¤ñ¨Ò" - -#. X label -#: src/prop_position.c:173 -msgid "X:" -msgstr "X:" - -#. Y label -#: src/prop_position.c:191 -msgid "Y:" -msgstr "Y:" - -#. Line Width units -#: src/prop_line.c:183 src/prefs.c:448 src/prefs.c:455 -msgid "points" -msgstr "ÂI" - -#. Line Color Label -#: src/prop_line.c:189 src/prop_fill.c:166 src/prop_text.c:234 -#: src/prop_bc.c:188 -msgid "Color:" -msgstr "ÃC¦â:" - -#. Font label -#: src/prop_text.c:181 -msgid "Font:" -msgstr "¦r«¬:" - -#. Alignment label -#: src/prop_text.c:248 -msgid "Alignment:" -msgstr "¹ï¸m:" - -#. Insert merge field label -#: src/prop_text_entry.c:180 src/prop_bc_data.c:196 -msgid "Key:" -msgstr "¸ê®ÆÈ:" - -#: src/prop_text_entry.c:196 -msgid "Insert merge field" -msgstr "´¡¤J¦X¨Ö¦C" - -#. Length label -#: src/prop_vector.c:183 -msgid "Length:" -msgstr "ªø«×:" - -#. Angle label -#: src/prop_vector.c:207 -msgid "Angle:" -msgstr "¨¤«×:" - -#. Angle units label -#: src/prop_vector.c:224 -msgid "degrees" -msgstr "«×¼Æ" - -#. Scale Label -#: src/prop_bc.c:168 -msgid "Scale:" -msgstr "¤ñ¨Ò:" - -#. % Label -#: src/prop_bc.c:182 -msgid "%" -msgstr "%" - -#: src/prop_bc_style.c:313 -msgid "Show text with barcode" -msgstr "Åã¥Ü¼Æ½X±ø¤å¦r" - -#: src/prop_bc_data.c:176 -msgid "Literal:" -msgstr "¤å¦r:" - -#: src/label.c:173 src/label.c:197 -msgid "xmlParseFile error" -msgstr "xmlParseFile ¿ù»~" - -#: src/label.c:228 -msgid "No document root" -msgstr "¨S¦³¤å¥ó©lºÝ" - -#: src/label.c:239 -msgid "document of the wrong type, glabels Namespace not found" -msgstr "¤£¥¿½Tªº¤å¥óºØÃþ, §ä¤£¨ì glabels ®æ¦¡" - -#: src/label.c:244 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "¿ù»~ªº°ò½X = \"%s\"" - -#: src/label.c:291 -#, c-format -msgid "bad node = \"%s\"" -msgstr "¿ù»~ªº¸`ÂI = \"%s\"" - -#: src/label.c:606 -msgid "Problem saving xml file." -msgstr "Àx¦s XML Àɮ׮ɵo¥Í¿ù»~." - -#: src/template.c:224 -msgid "No template files found!" -msgstr "§ä¤£¨ì¼Ëª©ÀÉ®× !" - -#: src/merge_properties.c:82 -msgid "Edit document-merge properties" -msgstr "קï¤å¥ó¦X¨Ö³]©w" - -#: src/merge_properties.c:131 -msgid "Source" -msgstr "¨Ó·½ÀÉ" - -#: src/merge_properties.c:143 -msgid "Format:" -msgstr "®æ¦¡:" - -#: src/merge_properties.c:158 -msgid "Location:" -msgstr "¦ì¸m:" - -#: src/merge_properties.c:168 -msgid "Fields" -msgstr "Äæ¦ì" - -#: src/merge.c:78 -msgid "None" -msgstr "¨S¦³" - -#: src/merge.c:86 -msgid "Text with tab separators" -msgstr "¥H [TAB] ¬°¤À®æ" - -#: src/merge.c:94 -msgid "Text with comma separators (CSV)" -msgstr "¥H³r¸¹¤À®æ (CSV)" - -#: src/merge.c:102 -msgid "Text with colon separators" -msgstr "¥H«_¸¹¤À®æ" - -#: src/merge_ui.c:207 src/merge_ui.c:242 src/merge_ui.c:387 src/merge_ui.c:428 -msgid "N/A" -msgstr "N/A" - -#: src/merge_ui_text.c:170 -msgid "Select merge-database source" -msgstr "¿ï¾Ü¦X¨Ö¸ê®Æ®w¨Ó·½" - -#: src/merge_ui_text.c:330 -msgid "Column" -msgstr "¦C" - -#: src/merge_ui_text.c:334 -msgid "Custom field key" -msgstr "¦ÛqÄæ¦ìÆ_" - -#: src/merge_ui_text.c:338 -msgid "Sample data" -msgstr "¼Ë¥»¸ê®Æ" - -#: src/menu.c:50 -msgid "_New" -msgstr "·s¼W (&_N)" - -#: src/menu.c:51 -msgid "Make a new, empty label" -msgstr "»s§@·sÀÉ, ªÅªº¼Ëñ" - -#: src/menu.c:85 -msgid "U_nselect All " -msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" - -#: src/menu.c:86 -msgid "Remove all selections" -msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" - -#: src/menu.c:94 -msgid "Select" -msgstr "¿ï¾Ü" - -#: src/menu.c:95 src/menu.c:186 -msgid "Select, move and modify objects" -msgstr "¿ï¾Ü, ²¾°Ê¤Îק磌¥ó" - -#: src/menu.c:100 src/menu.c:191 -msgid "Create text object" -msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" - -#: src/menu.c:103 -msgid "Box" -msgstr "²°¤l" - -#: src/menu.c:103 src/menu.c:194 -msgid "Create box/rectangle object" -msgstr "«Ø¥ß·sªº²°¤l/¤è§Îª«¥ó" - -#: src/menu.c:106 src/menu.c:197 -msgid "Create line object" -msgstr "µe½uª«¥ó" - -#: src/menu.c:109 -msgid "Ellipse" -msgstr "¾ò¶ê§Î" - -#: src/menu.c:110 src/menu.c:200 -msgid "Create ellipse/circle object" -msgstr "«Ø¥ß¾ò¶ê§Î/¹Ï§Îª«¥ó" - -#: src/menu.c:113 src/menu.c:203 -msgid "Create image object" -msgstr "«Ø¥ß¼v¹³ª«¥ó" - -#: src/menu.c:116 -msgid "Barcode" -msgstr "¼Æ½X±ø" - -#: src/menu.c:116 src/menu.c:206 -msgid "Create barcode object" -msgstr "«Ø¥ß¼Æ½X±ø" - -#: src/menu.c:121 src/menu.c:211 -msgid "Zoom in" -msgstr "©ñ¤j" - -#: src/menu.c:124 src/menu.c:214 -msgid "Zoom out" -msgstr "ÁY¤p" - -#: src/menu.c:127 -msgid "Zoom 1:1" -msgstr "1:1 Åã¥Ü" - -#: src/menu.c:127 src/menu.c:217 -msgid "Zoom to 1:1" -msgstr "1:1 Åã¥Ü" - -#: src/menu.c:132 src/menu.c:223 -msgid "Merge properties" -msgstr "¦X¨Ö³]©w" - -#: src/menu.c:133 -msgid "Edit merge properties" -msgstr "קï¦X¨Ö³]©w" - -#: src/menu.c:157 -msgid "_Tools" -msgstr "¤u¨ã (&_T)" - -#: src/menu.c:168 -msgid " New " -msgstr " ·s¼W " - -#: src/menu.c:168 -msgid "New Label/Card" -msgstr "·s¼W¼Ðñ/¥d" - -#: src/menu.c:170 -msgid " Open " -msgstr " ¶}±Ò " - -#: src/menu.c:170 -msgid "Open a file" -msgstr "¶}±ÒÀÉ®×" - -#: src/menu.c:172 -msgid " Save " -msgstr " Àx¦s " - -#: src/menu.c:172 -msgid "Save current file" -msgstr "Àx¦s²{¦bÀÉ®×" - -#: src/menu.c:175 -msgid " Print " -msgstr " ¦C¦L " - -#: src/menu.c:175 -msgid "Print current file" -msgstr "¦C¦L²{¦³ÀÉ®×" - -#: src/menu.c:290 -msgid "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" -msgstr "" -"A label and business card creation program for GNOME.\n" -" \n" -"Glabels 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.\n" -" \n" -"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.\n" - -#: src/menu.c:326 -msgid "Function is not implemented!" -msgstr "¥\¯à¥¼§¹¦¨ !" - -#: src/file.c:72 -msgid "New Label or Card" -msgstr "·s¼W¼Ðñ©Î¥d" - -#: src/file.c:98 -msgid "Media Type" -msgstr "´CÅéºØÃþ" - -#: src/file.c:109 -msgid "Label orientation" -msgstr "¼Ðñ¤è¦V" - -#: src/file.c:211 -msgid "Open" -msgstr "¶}±Ò" - -#: src/file.c:213 -msgid "Open label" -msgstr "¶}±Ò¼Ðñ" - -#: src/file.c:249 -msgid "Cannot open file" -msgstr "¶}±ÒÀÉ®×¥¢±Ñ" - -#: src/file.c:316 -msgid "Save label as" -msgstr "Àx¦s¼Ðñ¬°..." - -#: src/media_select.c:222 -msgid "Description:" -msgstr "´yz:" - -#: src/media_select.c:227 -msgid "Page size:" -msgstr "¯È±i¤j¤p:" - -#: src/media_select.c:232 -msgid "Label size:" -msgstr "¼Ðñ¤j¤p:" - -#: src/media_select.c:237 -msgid "Layout:" -msgstr "ª©±:" - -#: src/media_select.c:353 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (¨C¶ %d)" - -#: src/media_select.c:367 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/media_select.c:372 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/rotate_select.c:169 -msgid "Rotate" -msgstr "±ÛÂà" - -#: src/print_dialog.c:99 -msgid "Print" -msgstr "¦C¦L" - -#. ----------- Add simple-copies widget ------------ -#: src/print_dialog.c:104 -msgid "Copies" -msgstr "¥÷¼Æ" - -#. -------Otherwise add merge control widget ------------ -#: src/print_dialog.c:121 -msgid "Document merge control" -msgstr "¤å¥ó¦X¨Ö±±¨î" - -#. ----------- Add custom print options area ------------ -#: src/print_dialog.c:141 -msgid "Options" -msgstr "³]©w" - -#: src/print_dialog.c:241 src/print_dialog.c:280 -msgid "Print preview" -msgstr "¹wÄý¦C¦L" - -#: src/print_copies.c:170 -msgid "Sheets:" -msgstr "¯È±i:" - -#: src/print_copies.c:187 -msgid "Labels" -msgstr "¼Ðñ" - -#: src/print_copies.c:190 -msgid "from:" -msgstr "¥Ñ:" - -#: src/print_copies.c:198 -msgid "to:" -msgstr "¨ì:" - -#: src/print_merge.c:170 -msgid "Start on label" -msgstr "¥Ñ¸Tñ¶}¯Å" - -#: src/print_merge.c:179 -msgid "on 1st sheet" -msgstr "¦bº±i¯È" - -#: src/print_merge.c:188 -msgid "Collate" -msgstr "®Õ¹ï" - -#: src/print_merge.c:195 -msgid "Copies:" -msgstr "¥÷¼Æ:" - -#: src/prefs.c:86 -msgid "Glabels: Preferences" -msgstr "Glabels: ³]©wÈ" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:220 -msgid "Display units" -msgstr "Åã¥Ü³æ¦ì" - -#: src/prefs.c:231 -msgid "Points" -msgstr "ÂI" - -#: src/prefs.c:237 -msgid "Inches" -msgstr "^¤o" - -#: src/prefs.c:244 -msgid "Millimeters" -msgstr "²@¦Ì" - -#. ----- Display Units Frame ------------------------------------ -#: src/prefs.c:249 -msgid "Default page size" -msgstr "¹w³]¯È±i¤j¤p" - -#: src/prefs.c:450 -msgid "inches" -msgstr "^¤o" - -#: src/prefs.c:452 -msgid "mm" -msgstr "mm" diff --git a/glabels1/src/Makefile.am b/glabels1/src/Makefile.am deleted file mode 100644 index a7034c9..0000000 --- a/glabels1/src/Makefile.am +++ /dev/null @@ -1,176 +0,0 @@ -LIB_BARCODE_DIR = ../barcode-0.98 - -SUBDIRS = pixmaps - -INCLUDES = \ - -I$(top_srcdir)/intl \ - $(GNOME_INCLUDEDIR) \ - $(GNOME_XML_CFLAGS) \ - $(GNOME_PRINT_CFLAGS) \ - $(GDK_PIXBUF_CFLAGS) \ - $(GNOME_CANVAS_PIXBUF_CFLAGS) \ - -I$(LIB_BARCODE_DIR) - -bin_PROGRAMS = glabels glabels-batch - -glabels_SOURCES = \ - glabels.c \ - splash.h \ - splash.c \ - mdi.h \ - mdi.c \ - display.c \ - display.h \ - item.c \ - item.h \ - item_text.c \ - item_text.h \ - item_line.c \ - item_line.h \ - item_box.c \ - item_box.h \ - item_ellipse.c \ - item_ellipse.h \ - item_image.c \ - item_image.h \ - item_barcode.c \ - item_barcode.h \ - highlight.c \ - highlight.h \ - propertybox.c \ - propertybox.h \ - prop_size.c \ - prop_size.h \ - prop_position.c \ - prop_position.h \ - prop_line.c \ - prop_line.h \ - prop_fill.c \ - prop_fill.h \ - prop_text.c \ - prop_text.h \ - prop_text_entry.c \ - prop_text_entry.h \ - prop_vector.c \ - prop_vector.h \ - prop_bc.c \ - prop_bc.h \ - prop_bc_style.c \ - prop_bc_style.h \ - prop_bc_data.c \ - prop_bc_data.h \ - label.h \ - label.c \ - template.h \ - template.c \ - text_node.h \ - text_node.c \ - merge_properties.h \ - merge_properties.c \ - merge.h \ - merge.c \ - merge_text.h \ - merge_text.c \ - merge_ui.h \ - merge_ui.c \ - merge_ui_text.h \ - merge_ui_text.c \ - bc.c \ - bc.h \ - bc_postnet.c \ - bc_postnet.h \ - bc_gnubarcode.c \ - bc_gnubarcode.h \ - tools.h \ - tools.c \ - stock.h \ - stock.c \ - menu.h \ - menu.c \ - file.c \ - file.h \ - media_select.c \ - media_select.h \ - rotate_select.c \ - rotate_select.h \ - print.c \ - print.h \ - print_dialog.c \ - print_dialog.h \ - print_copies.c \ - print_copies.h \ - print_merge.c \ - print_merge.h \ - mini_preview.c \ - mini_preview.h \ - edit.c \ - edit.h \ - prefs.h \ - prefs.c \ - util.c \ - util.h \ - hack.c \ - hack.h \ - gnome-canvas-hacktext.h \ - debug.h - -glabels_LDADD = \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) \ - $(INTLLIBS) \ - $(GNOME_XML_LIBS) \ - $(GNOME_PRINT_LIBS) \ - $(GDK_PIXBUF_LIBS) \ - $(GNOME_CANVAS_PIXBUF_LIBS) \ - -L$(LIB_BARCODE_DIR) -lbarcode - -glabels_batch_SOURCES = \ - glabels_batch.c \ - label.h \ - label.c \ - template.h \ - template.c \ - text_node.h \ - text_node.c \ - merge.h \ - merge.c \ - merge_text.h \ - merge_text.c \ - bc.c \ - bc.h \ - bc_postnet.c \ - bc_postnet.h \ - bc_gnubarcode.c \ - bc_gnubarcode.h \ - print.c \ - print.h \ - util.c \ - util.h \ - hack.c \ - hack.h \ - debug.h - -glabels_batch_LDADD = \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) \ - $(INTLLIBS) \ - $(GNOME_XML_LIBS) \ - $(GNOME_PRINT_LIBS) \ - $(GDK_PIXBUF_LIBS) \ - $(GNOME_CANVAS_PIXBUF_LIBS) \ - -L$(LIB_BARCODE_DIR) -lbarcode - -$(bin_PROGRAMS): $(LIB_BARCODE_DIR)/libbarcode.a - -$(LIB_BARCODE_DIR)/libbarcode.a: - cd $(LIB_BARCODE_DIR); $(MAKE) - -clean: barcode_clean - -barcode_clean: - cd $(LIB_BARCODE_DIR); $(MAKE) clean - -distclean maintainer-clean: barcode_distclean - -barcode_distclean: - cd $(LIB_BARCODE_DIR); $(MAKE) distclean diff --git a/glabels1/src/bc.c b/glabels1/src/bc.c deleted file mode 100644 index 9969b78..0000000 --- a/glabels1/src/bc.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc.c: GLabels barcode module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include "bc.h" -#include "bc_postnet.h" -#include "bc_gnubarcode.h" - -#include "debug.h" - -/*****************************************************************************/ -/* Call appropriate barcode backend to create barcode in intermediate format.*/ -/*****************************************************************************/ -glBarcode * -gl_barcode (glBarcodeStyle style, - gboolean text_flag, - gdouble scale, - gchar * digits) -{ - glBarcode *gbc; - - switch (style) { - - case GL_BARCODE_STYLE_POSTNET: - /* Use the POSTNET backend module */ - gbc = gl_barcode_postnet (digits); - break; - - default: - /* Use the GNU barcode library backend */ - gbc = gl_barcode_gnubarcode (style, text_flag, scale, digits); - break; - - } - return gbc; -} - -/*****************************************************************************/ -/* Free previously created barcode. */ -/*****************************************************************************/ -void -gl_barcode_free (glBarcode ** gbc) -{ - GList *p; - - if (*gbc != NULL) { - - for (p = (*gbc)->lines; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - g_list_free ((*gbc)->lines); - (*gbc)->lines = NULL; - - for (p = (*gbc)->chars; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - g_list_free ((*gbc)->chars); - (*gbc)->chars = NULL; - - g_free (*gbc); - *gbc = NULL; - } -} - -/*****************************************************************************/ -/* Return an appropriate set of digits for the given barcode style. */ -/*****************************************************************************/ -gchar * -gl_barcode_default_digits (glBarcodeStyle style) -{ - switch (style) { - - case GL_BARCODE_STYLE_POSTNET: - return g_strdup ("000000000"); - case GL_BARCODE_STYLE_EAN: - return g_strdup ("000000000000 00000"); - case GL_BARCODE_STYLE_UPC: - return g_strdup ("00000000000 00000"); - case GL_BARCODE_STYLE_ISBN: - return g_strdup ("0-00000-000-0 00000"); - case GL_BARCODE_STYLE_39: - case GL_BARCODE_STYLE_128: - case GL_BARCODE_STYLE_128C: - case GL_BARCODE_STYLE_128B: - case GL_BARCODE_STYLE_I25: - case GL_BARCODE_STYLE_CBR: - case GL_BARCODE_STYLE_MSI: - case GL_BARCODE_STYLE_PLS: - return g_strdup ("0000000000"); - default: - return g_strdup ("0"); - } - -} - -/*****************************************************************************/ -/* Convert style to text. */ -/*****************************************************************************/ -const gchar * -gl_barcode_style_to_text (glBarcodeStyle style) -{ - switch (style) { - case GL_BARCODE_STYLE_POSTNET: - return "POSTNET"; - case GL_BARCODE_STYLE_EAN: - return "EAN"; - case GL_BARCODE_STYLE_UPC: - return "UPC"; - case GL_BARCODE_STYLE_ISBN: - return "ISBN"; - case GL_BARCODE_STYLE_39: - return "Code39"; - case GL_BARCODE_STYLE_128: - return "Code128"; - case GL_BARCODE_STYLE_128C: - return "Code128C"; - case GL_BARCODE_STYLE_128B: - return "Code128B"; - case GL_BARCODE_STYLE_I25: - return "I25"; - case GL_BARCODE_STYLE_CBR: - return "CBR"; - case GL_BARCODE_STYLE_MSI: - return "MSI"; - case GL_BARCODE_STYLE_PLS: - return "PLS"; - default: - WARN( "Illegal barcode style %d", style ); - return "?"; - } -} - -/*****************************************************************************/ -/* Convert text to style. */ -/*****************************************************************************/ -glBarcodeStyle -gl_barcode_text_to_style (const gchar * text) -{ - - if (g_strcasecmp (text, "POSTNET") == 0) { - return GL_BARCODE_STYLE_POSTNET; - } - if (g_strcasecmp (text, "EAN") == 0) { - return GL_BARCODE_STYLE_EAN; - } - if (g_strcasecmp (text, "UPC") == 0) { - return GL_BARCODE_STYLE_UPC; - } - if (g_strcasecmp (text, "ISBN") == 0) { - return GL_BARCODE_STYLE_ISBN; - } - if (g_strcasecmp (text, "Code39") == 0) { - return GL_BARCODE_STYLE_39; - } - if (g_strcasecmp (text, "Code128") == 0) { - return GL_BARCODE_STYLE_128; - } - if (g_strcasecmp (text, "Code128C") == 0) { - return GL_BARCODE_STYLE_128C; - } - if (g_strcasecmp (text, "Code128B") == 0) { - return GL_BARCODE_STYLE_128B; - } - if (g_strcasecmp (text, "I25") == 0) { - return GL_BARCODE_STYLE_I25; - } - if (g_strcasecmp (text, "CBR") == 0) { - return GL_BARCODE_STYLE_CBR; - } - if (g_strcasecmp (text, "MSI") == 0) { - return GL_BARCODE_STYLE_MSI; - } - if (g_strcasecmp (text, "PLS") == 0) { - return GL_BARCODE_STYLE_PLS; - } else { - WARN( "Unknown barcode style text \"%s\"", text ); - return GL_BARCODE_STYLE_POSTNET; - } - -} diff --git a/glabels1/src/bc.h b/glabels1/src/bc.h deleted file mode 100644 index 22441f7..0000000 --- a/glabels1/src/bc.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc.h: GLabels barcode module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __BC_H__ -#define __BC_H__ - -#include <glib.h> - -typedef enum { - GL_BARCODE_STYLE_POSTNET, - GL_BARCODE_STYLE_EAN, - GL_BARCODE_STYLE_UPC, - GL_BARCODE_STYLE_ISBN, - GL_BARCODE_STYLE_39, - GL_BARCODE_STYLE_128, - GL_BARCODE_STYLE_128C, - GL_BARCODE_STYLE_128B, - GL_BARCODE_STYLE_I25, - GL_BARCODE_STYLE_128RAW, - GL_BARCODE_STYLE_CBR, - GL_BARCODE_STYLE_MSI, - GL_BARCODE_STYLE_PLS, -} glBarcodeStyle; - -typedef struct { - gdouble x, y, length, width; -} glBarcodeLine; - -typedef struct { - gdouble x, y, fsize; - gchar c; -} glBarcodeChar; - -typedef struct { - gdouble width, height; - GList *lines; /* List of glBarcodeLine */ - GList *chars; /* List of glBarcodeChar */ -} glBarcode; - -#define GL_BARCODE_FONT_FAMILY "Helvetica" -#define GL_BARCODE_FONT_WEIGHT GNOME_FONT_BOOK - -extern glBarcode *gl_barcode (glBarcodeStyle style, - gboolean text_flag, - gdouble scale, - gchar * digits); - -extern void - gl_barcode_free (glBarcode ** bc); - -extern gchar *gl_barcode_default_digits (glBarcodeStyle style); -extern const gchar *gl_barcode_style_to_text (glBarcodeStyle style); -extern glBarcodeStyle gl_barcode_text_to_style (const gchar * text); - -#endif diff --git a/glabels1/src/bc_gnubarcode.c b/glabels1/src/bc_gnubarcode.c deleted file mode 100644 index 31f71b0..0000000 --- a/glabels1/src/bc_gnubarcode.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc-gnubarcode.c: front-end to GNU-barcode-library module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * Some of this code is borrowed from the postscript renderer (ps.c) - * from the GNU barcode library: - * - * Copyright (C) 1999 Alessaandro Rubini (rubini@gnu.org) - * Copyright (C) 1999 Prosa Srl. (prosa@prosa.it) - * - * 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 - */ - -#include <config.h> - -#include <ctype.h> -#include <string.h> - -#include "bc.h" -#include "bc_gnubarcode.h" - -#include "barcode.h" - -#include "debug.h" - -#define SHRINK_AMOUNT 0.15 /* shrink bars to account for ink spreading */ -#define FONT_SCALE 0.95 /* Shrink fonts just a hair */ - -static glBarcode *render_pass1 (struct Barcode_Item *bci, - gboolean text_flag, - gdouble scale); - -/*****************************************************************************/ -/* Generate intermediate representation of barcode. */ -/*****************************************************************************/ -glBarcode * -gl_barcode_gnubarcode (glBarcodeStyle style, - gboolean text_flag, - gdouble scale, - gchar * digits) -{ - glBarcode *gbc; - struct Barcode_Item *bci; - gint flags; - - bci = Barcode_Create (digits); - - /* First encode using GNU Barcode library */ - switch (style) { - case GL_BARCODE_STYLE_EAN: - flags = BARCODE_EAN; - break; - case GL_BARCODE_STYLE_UPC: - flags = BARCODE_UPC; - break; - case GL_BARCODE_STYLE_ISBN: - flags = BARCODE_ISBN; - break; - case GL_BARCODE_STYLE_39: - flags = BARCODE_39; - break; - case GL_BARCODE_STYLE_128: - flags = BARCODE_128; - break; - case GL_BARCODE_STYLE_128C: - flags = BARCODE_128C; - break; - case GL_BARCODE_STYLE_128B: - flags = BARCODE_128B; - break; - case GL_BARCODE_STYLE_I25: - flags = BARCODE_I25; - break; - case GL_BARCODE_STYLE_CBR: - flags = BARCODE_CBR; - break; - case GL_BARCODE_STYLE_MSI: - flags = BARCODE_MSI; - break; - case GL_BARCODE_STYLE_PLS: - flags = BARCODE_PLS; - break; - default: - WARN( "Illegal barcode style %d", style ); - flags = BARCODE_ANY; - break; - } - Barcode_Encode (bci, flags); - if (!bci->partial || !bci->textinfo) { - WARN ("Barcode Data Invalid"); - Barcode_Delete (bci); - return NULL; - } - - /* now render with our custom back-end, - to create appropriate intermdediate format */ - gbc = render_pass1 (bci, text_flag, scale); - - Barcode_Delete (bci); - return gbc; -} - -/*-------------------------------------------------------------------------- - * PRIVATE. Render to glBarcode intermediate representation of barcode. - * - * Some of this code is borrowed from the postscript renderer (ps.c) - * from the GNU barcode library: - * - * Copyright (C) 1999 Alessaandro Rubini (rubini@gnu.org) - * Copyright (C) 1999 Prosa Srl. (prosa@prosa.it) - * - *--------------------------------------------------------------------------*/ -static glBarcode * -render_pass1 (struct Barcode_Item *bci, - gboolean text_flag, - gdouble scale) -{ - glBarcode *gbc; - glBarcodeLine *line; - glBarcodeChar *bchar; - gdouble x; - gint i, j, barlen; - gdouble f1, f2; - gint mode = '-'; /* text below bars */ - gdouble x0, y0, yr; - guchar *p, c; - - /* First calculate barlen */ - barlen = bci->partial[0] - '0'; - for (p = bci->partial + 1; *p != 0; p++) { - if (isdigit (*p)) { - barlen += *p - '0'; - } else { - if ((*p != '+') && (*p != '-')) { - barlen += *p - 'a' + 1; - } - } - } - - /* The width defaults to "just enough" */ - bci->width = barlen * scale + 1; - - /* The height defaults to 80 points (rescaled) */ - if (!bci->height) - bci->height = 80 * scale; - - gbc = g_new0 (glBarcode, 1); - - /* Now traverse the code string and create a list of lines */ - x = bci->margin + (bci->partial[0] - '0') * scale; - for (p = bci->partial + 1, i = 1; *p != 0; p++, i++) { - /* special cases: '+' and '-' */ - if (*p == '+' || *p == '-') { - mode = *p; /* don't count it */ - i++; - continue; - } - /* j is the width of this bar/space */ - if (isdigit (*p)) - j = *p - '0'; - else - j = *p - 'a' + 1; - if (i % 2) { /* bar */ - x0 = x + (j * scale) / 2; - y0 = bci->margin; - yr = bci->height; - if (text_flag) { /* leave space for text */ - if (mode == '-') { - /* text below bars: 10 or 5 points */ - yr -= (isdigit (*p) ? 10 : 5) * scale; - } else { /* '+' */ - /* above bars: 10 or 0 from bottom, - and 10 from top */ - y0 += 10 * scale; - yr -= (isdigit (*p) ? 20 : 10) * scale; - } - } - line = g_new0 (glBarcodeLine, 1); - line->x = x0; - line->y = y0; - line->length = yr; - line->width = (j * scale) - SHRINK_AMOUNT; - gbc->lines = g_list_append (gbc->lines, line); - } - x += j * scale; - - } - - /* Now the text */ - mode = '-'; /* reinstantiate default */ - if (text_flag) { - for (p = bci->textinfo; p; p = strchr (p, ' ')) { - while (*p == ' ') - p++; - if (!*p) - break; - if (*p == '+' || *p == '-') { - mode = *p; - continue; - } - if (sscanf (p, "%lf:%lf:%c", &f1, &f2, &c) != 3) { - WARN ("impossible data: %s", p); - continue; - } - bchar = g_new0 (glBarcodeChar, 1); - bchar->x = f1 * scale + bci->margin; - if (mode == '-') { - bchar->y = - bci->margin + bci->height - 8 * scale; - } else { - bchar->y = bci->margin; - } - bchar->fsize = f2 * FONT_SCALE * scale; - bchar->c = c; - gbc->chars = g_list_append (gbc->chars, bchar); - } - } - - /* Fill in other info */ - gbc->height = bci->height + 2.0 * bci->margin; - gbc->width = bci->width + 2.0 * bci->margin; - - return gbc; -} diff --git a/glabels1/src/bc_gnubarcode.h b/glabels1/src/bc_gnubarcode.h deleted file mode 100644 index 263b403..0000000 --- a/glabels1/src/bc_gnubarcode.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc_gnubarcode.h: front-end to GNU-barcode-library module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __BC_GNUBARCODE_H__ -#define __BC_GNUBARCODE_H__ - -#include "bc.h" - -extern glBarcode *gl_barcode_gnubarcode (glBarcodeStyle style, - gboolean text_flag, - gdouble scale, - gchar * digits); - -#endif diff --git a/glabels1/src/bc_postnet.c b/glabels1/src/bc_postnet.c deleted file mode 100644 index eaf3197..0000000 --- a/glabels1/src/bc_postnet.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc_postnet.c: GLabels POSTNET barcode module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -/* - * This module implements the POSTNET barcode specified in the USPS - * publication 25, Mar 2001. - */ - -#include <config.h> - -#include <ctype.h> - -#include "bc.h" -#include "bc_postnet.h" - -#include "debug.h" - -static gchar *symbols[] = { - /* 0 */ "11000", - /* 1 */ "00011", - /* 2 */ "00101", - /* 3 */ "00110", - /* 4 */ "01001", - /* 5 */ "01010", - /* 6 */ "01100", - /* 7 */ "10001", - /* 8 */ "10010", - /* 9 */ "10100", -}; - -static gchar *frame_symbol = "1"; - -#define POSTNET_BAR_WIDTH 1.25 -#define POSTNET_FULLBAR_HEIGHT 9.00 -#define POSTNET_HALFBAR_HEIGHT 3.50 -#define POSTNET_BAR_PITCH 3.25 -#define POSTNET_HORIZ_MARGIN 9.00 -#define POSTNET_VERT_MARGIN 3.00 - -static gchar *postnet_code (gchar * digits); - -/****************************************************************************/ -/* Generate list of rectangles that form the barcode for the given digits. */ -/****************************************************************************/ -glBarcode * -gl_barcode_postnet (gchar * digits) -{ - gchar *code, *p; - glBarcode *gbc; - glBarcodeLine *line; - gdouble x; - - gbc = g_new0 (glBarcode, 1); - - /* First get code string */ - code = postnet_code (digits); - if (code == NULL) { - return NULL; - } - - /* Now traverse the code string and create a list of lines */ - x = POSTNET_HORIZ_MARGIN; - for (p = code; *p != 0; p++) { - line = g_new0 (glBarcodeLine, 1); - line->x = x; - line->y = POSTNET_VERT_MARGIN; - if (*p == '0') { - line->y += - POSTNET_FULLBAR_HEIGHT - POSTNET_HALFBAR_HEIGHT; - line->length = POSTNET_HALFBAR_HEIGHT; - } else { - line->length = POSTNET_FULLBAR_HEIGHT; - } - line->width = POSTNET_BAR_WIDTH; - - gbc->lines = g_list_append (gbc->lines, line); - - x += POSTNET_BAR_PITCH; - } - - g_free (code); - - gbc->width = x + POSTNET_HORIZ_MARGIN; - gbc->height = POSTNET_FULLBAR_HEIGHT + 2 * POSTNET_VERT_MARGIN; - - gbc->chars = NULL; - - return gbc; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Generate string of symbols, representing barcode. */ -/*--------------------------------------------------------------------------*/ -static gchar * -postnet_code (gchar * digits) -{ - gchar *p; - gint len; - gint d, sum; - GString *code; - gchar *ret; - - /* Left frame bar */ - code = g_string_new (frame_symbol); - - sum = 0; - for (p = digits, len = 0; (*p != 0) && (len < 11); p++) { - if (isdigit (*p)) { - /* Only translate valid characters (0-9) */ - d = (*p) - '0'; - sum += d; - code = g_string_append (code, symbols[d]); - len++; - } - } - if ((len != 5) && (len != 9) && (len != 11)) { - WARN ("Invalid POSTNET length %d, should be 5(ZIP), 9(ZIP+4), or 11(DPBC)", len); - } - - /* Create correction character */ - d = (10 - (sum % 10)) % 10; - code = g_string_append (code, symbols[d]); - - /* Right frame bar */ - code = g_string_append (code, frame_symbol); - - ret = g_strdup (code->str); - g_string_free (code, TRUE); - - return ret; -} diff --git a/glabels1/src/bc_postnet.h b/glabels1/src/bc_postnet.h deleted file mode 100644 index e503507..0000000 --- a/glabels1/src/bc_postnet.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * bc_postnet.h: GLabels POSTNET barcode module header file - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __BC_POSTNET_H__ -#define __BC_POSTNET_H__ - -#include <glib.h> - -glBarcode *gl_barcode_postnet (gchar * digits); - -#endif diff --git a/glabels1/src/debug.h b/glabels1/src/debug.h deleted file mode 100644 index 08e3fc9..0000000 --- a/glabels1/src/debug.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Macros/functions for debugging gLabels */ -#ifndef __DEBUG_H__ -#define __DEBUG_H__ - -#include "glib.h" - -#ifdef __GNUC__ - -#define DEBUG(args...) { \ - gchar *__string__; \ - __string__ = g_strdup_printf( args ); \ - g_message( "%s:%d (%s): %s\n", \ - __FILE__, __LINE__, __FUNCTION__, __string__ ); \ - g_free( __string__ ); \ - __string__ = NULL; \ - } - -#define WARN(args...) { \ - gchar *__string__; \ - __string__ = g_strdup_printf( args ); \ - g_warning( "%s:%d (%s): %s\n", \ - __FILE__, __LINE__, __FUNCTION__, __string__ ); \ - g_free( __string__ ); \ - __string__ = NULL; \ - } - -#define ERROR(args...) { \ - gchar *__string__; \ - __string__ = g_strdup_printf( args ); \ - g_error( "%s:%d (%s): %s\n", \ - __FILE__, __LINE__, __FUNCTION__, __string__ ); \ - g_free( __string__ ); \ - __string__ = NULL; \ - } - -#else /* !__GNUC__ */ - -static -DEBUG (const gchar * format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args); - va_end (args); -} - -static -WARN (const gchar * format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args); - va_end (args); -} - -static -ERROR (const gchar * format, - ...) -{ - va_list args; - va_start (args, format); - g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); - va_end (args); -} - -#endif /* !__GNUC__ */ - -#endif /* __DEBUG_H__ */ diff --git a/glabels1/src/display.c b/glabels1/src/display.c deleted file mode 100644 index 9440820..0000000 --- a/glabels1/src/display.c +++ /dev/null @@ -1,1739 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * display.c: GLabels Display module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> -#include <gtk/gtkinvisible.h> - -#include <string.h> -#include <math.h> - -#include "display.h" -#include "item.h" - -#include "debug.h" - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -/* "CLIPBOARD" selection */ -static GdkAtom clipboard_atom = GDK_NONE; - -#define HOME_SCALE 2.0 -static gdouble scales[] = { 8.0, 6.0, 4.0, 3.0, - 2.0, - 1.5, 1.0, 0.5, 0.25, - 0.0 -}; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_display_class_init (glDisplayClass * class); -static void gl_display_init (glDisplay * display); -static void gl_display_destroy (GtkObject * object); - -static void gl_display_construct (glDisplay * display); -static GtkWidget *gl_display_construct_canvas (glDisplay * display); -static void gl_display_construct_selection (glDisplay * display); - -static gdouble get_apropriate_scale (glLabel * label); - -static void draw_rect_bg (glDisplay * display); -static void draw_rounded_rect_bg (glDisplay * display); -static void draw_round_bg (glDisplay * display); -static void draw_cd_bg (glDisplay * display); - -static int canvas_event (GnomeCanvas * canvas, - GdkEvent * event, gpointer data); -static int canvas_event_arrow_mode (GnomeCanvas * canvas, - GdkEvent * event, gpointer data); - -static GnomeCanvasItem *display_item_at (glDisplay * display, - gdouble x, gdouble y); -static gboolean item_selected (glDisplay * display, - GnomeCanvasItem * item); -static gboolean multiple_items_selected (glDisplay * display); - -static int item_event_arrow_mode (GnomeCanvasItem * item, - GdkEvent * event, gpointer data); - -static void popup_selection_menu (glDisplay * display, - GnomeCanvasItem * item, GdkEvent * event); - -static void delete_item_cb (GtkWidget * widget, GnomeCanvasItem * item); -static void raise_item_cb (GtkWidget * widget, GnomeCanvasItem * item); -static void lower_item_cb (GtkWidget * widget, GnomeCanvasItem * item); - -static void move_selected_items (glDisplay * display, gdouble dx, gdouble dy); -static void move_item (GnomeCanvasItem * item, gdouble dx, gdouble dy); - -static void delete_selection_cb (GtkWidget * widget, glDisplay * display); -static void raise_selection_cb (GtkWidget * widget, glDisplay * display); -static void lower_selection_cb (GtkWidget * widget, glDisplay * display); - -static void selection_clear_cb (GtkWidget * widget, - GdkEventSelection * event, gpointer data); - -static void selection_get_cb (GtkWidget * widget, - GtkSelectionData * selection_data, guint info, - guint time, gpointer data); - -static void selection_received_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint time, gpointer data); - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_display_get_type (void) -{ - static guint display_type = 0; - - if (!display_type) { - GtkTypeInfo display_info = { - "glDisplay", - sizeof (glDisplay), - sizeof (glDisplayClass), - (GtkClassInitFunc) gl_display_class_init, - (GtkObjectInitFunc) gl_display_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - display_type = - gtk_type_unique (gtk_vbox_get_type (), &display_info); - } - - return display_type; -} - -static void -gl_display_class_init (glDisplayClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_display_destroy; -} - -static void -gl_display_init (glDisplay * display) -{ - display->label = NULL; -} - -static void -gl_display_destroy (GtkObject * object) -{ - glDisplay *display; - glDisplayClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_DISPLAY (object)); - - display = GL_DISPLAY (object); - class = GL_DISPLAY_CLASS (GTK_OBJECT (display)->klass); - - display->label = NULL; - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_display_new (glLabel * label) -{ - glDisplay *display = gtk_type_new (gl_display_get_type ()); - - display->label = label; - - gl_display_construct (display); - - gl_display_clear_modified (display); - - return GTK_WIDGET (display); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*---------------------------------------------------------------------------*/ -static void -gl_display_construct (glDisplay * display) -{ - GtkWidget *wvbox, *wscroll; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - wvbox = GTK_WIDGET (display); - - display->state = GL_DISPLAY_STATE_ARROW; - display->item_list = NULL; - - gl_display_construct_canvas (display); - wscroll = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (wscroll), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_box_pack_start (GTK_BOX (wvbox), wscroll, TRUE, TRUE, 0); - gtk_container_add (GTK_CONTAINER (wscroll), display->canvas); - - gl_display_construct_selection (display); - - display->menu = gl_display_new_selection_menu (display); - - display->modified = FALSE; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create canvas w/ a background in the shape of the label/card. */ -/*---------------------------------------------------------------------------*/ -static GtkWidget * -gl_display_construct_canvas (glDisplay * display) -{ - gdouble scale; - glLabel *label = display->label; - GList *p_obj; - glLabelObject *object; - GnomeCanvasItem *item; - - g_return_val_if_fail (GL_IS_DISPLAY (display), NULL); - g_return_val_if_fail (label != NULL, NULL); - -#ifdef AA_CANVAS - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - display->canvas = gnome_canvas_new_aa (); - gtk_widget_pop_colormap (); - gtk_widget_pop_visual (); -#else - gtk_widget_push_visual (gdk_imlib_get_visual ()); - gtk_widget_push_colormap (gdk_imlib_get_colormap ()); - display->canvas = gnome_canvas_new (); - gtk_widget_pop_colormap (); - gtk_widget_pop_visual (); -#endif - - scale = get_apropriate_scale (label); - - gtk_widget_set_usize (display->canvas, - scale * label->width + 40, - scale * label->height + 40); - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (display->canvas), - scale); - display->scale = scale; - - gnome_canvas_set_scroll_region (GNOME_CANVAS (display->canvas), - 0.0, 0.0, label->width, label->height); - - /* Draw background shape of label/card */ - switch (label->template->style) { - - case GL_TEMPLATE_STYLE_RECT: - if (label->template->label_round == 0.0) { - /* Square corners. */ - draw_rect_bg (display); - } else { - /* Rounded corners. */ - draw_rounded_rect_bg (display); - } - break; - - case GL_TEMPLATE_STYLE_ROUND: - draw_round_bg (display); - break; - - case GL_TEMPLATE_STYLE_CD: - draw_cd_bg (display); - break; - - default: - WARN ("Unknown template label style"); - break; - } - - gtk_signal_connect (GTK_OBJECT (display->canvas), "event", - GTK_SIGNAL_FUNC (canvas_event), display); - - for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) { - object = (glLabelObject *) p_obj->data; - item = gl_item_new (object, display); - gl_display_add_item (display, item); - } - - return display->canvas; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create selection targets. */ -/*---------------------------------------------------------------------------*/ -static void -gl_display_construct_selection (glDisplay * display) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - display->have_selection = FALSE; - display->selection_data = NULL; - display->invisible = gtk_invisible_new (); - - display->selected_item_list = NULL; - - if (!clipboard_atom) { - clipboard_atom = gdk_atom_intern ("GLABELS_CLIPBOARD", FALSE); - } - - gtk_selection_add_target (display->invisible, - clipboard_atom, GDK_SELECTION_TYPE_STRING, 1); - - gtk_signal_connect (GTK_OBJECT (display->invisible), - "selection_clear_event", - GTK_SIGNAL_FUNC (selection_clear_cb), display); - - gtk_signal_connect (GTK_OBJECT (display->invisible), "selection_get", - GTK_SIGNAL_FUNC (selection_get_cb), display); - - gtk_signal_connect (GTK_OBJECT (display->invisible), - "selection_received", - GTK_SIGNAL_FUNC (selection_received_cb), display); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Determine an apropriate scale for given label & screen size */ -/*---------------------------------------------------------------------------*/ -static gdouble -get_apropriate_scale (glLabel * label) -{ - gdouble w, h; - gdouble w_screen, h_screen; - gint i; - gdouble k; - - g_return_val_if_fail (label != NULL, 1.0); - - w = label->width; - h = label->height; - w_screen = (gdouble) gdk_screen_width (); - h_screen = (gdouble) gdk_screen_height (); - - for (i = 0; scales[i] > 0.0; i++) { - k = scales[i]; - if (k <= HOME_SCALE) { - if ((k * w < (w_screen - 256)) - && (k * h < (h_screen - 256))) - return k; - } - } - - return 0.25; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw simple recangular background. */ -/*---------------------------------------------------------------------------*/ -static void -draw_rect_bg (glDisplay * display) -{ - glLabel *label = display->label; - GnomeCanvasItem *item; - GnomeCanvasGroup *group; - gdouble margin; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (label != NULL); - - display->n_bg_items = 0; - display->bg_item_list = NULL; - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - - item = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", 0.0, - "y1", 0.0, - "x2", label->width, - "y2", label->height, - "fill_color", "white", - NULL); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); - - /* Bounding box @ margin */ - margin = label->template->label_margin; - gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", margin, - "y1", margin, - "x2", label->width - margin, - "y2", label->height - margin, - "width_pixels", 1, - "outline_color", "light blue", - NULL); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw rounded recangular background. */ -/*---------------------------------------------------------------------------*/ -static void -draw_rounded_rect_bg (glDisplay * display) -{ - glLabel *label = display->label; - GnomeCanvasPoints *points; - gint i_coords, i_theta; - gdouble r, w, h, m; - GnomeCanvasItem *item; - GnomeCanvasGroup *group; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (label != NULL); - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - - display->n_bg_items = 0; - display->bg_item_list = NULL; - - r = label->template->label_round; - w = label->width; - h = label->height; - m = label->template->label_margin; - - points = gnome_canvas_points_new (4 * (1 + 90 / 5)); - i_coords = 0; - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - r - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r - r * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - r - r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - (h - r) + r * sin (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - (w - r) + r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - (h - r) + r * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - (w - r) + r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r - r * sin (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "fill_color", "white", - NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); - - /* Bounding box @ margin */ - if (label->template->label_margin >= label->template->label_round) { - /* simple rectangle */ - item = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", m, - "y1", m, - "x2", w - m, - "y2", h - m, - "width_pixels", 1, - "outline_color", "light blue", - NULL); - display->n_bg_items++; - display->bg_item_list = - g_list_append (display->bg_item_list, item); - } else { - r = label->template->label_round - m; - w = label->width - 2 * label->template->label_margin; - h = label->height - 2 * label->template->label_margin; - - /* rectangle with rounded corners */ - points = gnome_canvas_points_new (4 * (1 + 90 / 5)); - i_coords = 0; - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - m + r - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - m + r - r * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - m + r - r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - m + (h - r) + r * sin (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - m + (w - r) + r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - m + (h - r) + r * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - points->coords[i_coords++] = - m + (w - r) + r * cos (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - m + r - r * sin (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "width_pixels", 1, - "outline_color", "light blue", - NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = - g_list_append (display->bg_item_list, item); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw round background. */ -/*---------------------------------------------------------------------------*/ -static void -draw_round_bg (glDisplay * display) -{ - glLabel *label = display->label; - GnomeCanvasPoints *points; - gint i_coords, i_theta; - gdouble r, r1; - GnomeCanvasItem *item; - GnomeCanvasGroup *group; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (label != NULL); - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - - display->n_bg_items = 0; - display->bg_item_list = NULL; - - r1 = label->template->label_radius; - points = gnome_canvas_points_new (1 + 360/2); - i_coords = 0; - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r1 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r1 * cos (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "fill_color", "white", - NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); - - /* Bounding box @ margin */ - r = label->template->label_radius - label->template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "width_pixels", 1, - "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw CD style background, circular w/ concentric hole. */ -/*---------------------------------------------------------------------------*/ -static void -draw_cd_bg (glDisplay * display) -{ - glLabel *label = display->label; - GnomeCanvasPoints *points; - gint i_coords, i_theta; - gdouble r, r1, r2; - GnomeCanvasItem *item; - GnomeCanvasGroup *group; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (label != NULL); - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - - display->n_bg_items = 0; - display->bg_item_list = NULL; - - r1 = label->template->label_radius; - r2 = label->template->label_hole; - points = gnome_canvas_points_new (2 * (1 + 360 / 2)); - i_coords = 0; - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r1 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r1 * cos (i_theta * M_PI / 180.0); - } - for (i_theta = 0; i_theta <= 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r2 * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r2 * cos (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "fill_color", "white", - NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); - - /* Bounding box @ margin */ - /* outer margin */ - r = label->template->label_radius - label->template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "width_pixels", 1, - "outline_color", "light blue", NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); - - /* inner margin */ - r = label->template->label_hole + label->template->label_margin; - points = gnome_canvas_points_new (360 / 2); - i_coords = 0; - for (i_theta = 0; i_theta < 360; i_theta += 2) { - points->coords[i_coords++] = - r1 - r * sin (i_theta * M_PI / 180.0); - points->coords[i_coords++] = - r1 - r * cos (i_theta * M_PI / 180.0); - } - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "width_pixels", 1, - "outline_color", "light blue", - NULL); - gnome_canvas_points_free (points); - display->n_bg_items++; - display->bg_item_list = g_list_append (display->bg_item_list, item); -} - -/*****************************************************************************/ -/* Set arrow mode. */ -/*****************************************************************************/ -void -gl_display_arrow_mode (glDisplay * display) -{ - static GdkCursor *cursor = NULL; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - if (!cursor) { - cursor = gdk_cursor_new (GDK_LEFT_PTR); - } - - gdk_window_set_cursor (display->canvas->window, cursor); - - display->state = GL_DISPLAY_STATE_ARROW; -} - -/*****************************************************************************/ -/* Set create text object mode. */ -/*****************************************************************************/ -void -gl_display_object_create_mode (glDisplay * display, - glLabelObjectType type) -{ - GdkCursor *cursor; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - cursor = gl_item_get_create_cursor (type); - gdk_window_set_cursor (display->canvas->window, cursor); - - display->state = GL_DISPLAY_STATE_OBJECT_CREATE; - display->create_type = type; -} - -/*****************************************************************************/ -/* Add canvas item to list of display items. */ -/*****************************************************************************/ -void -gl_display_add_item (glDisplay * display, - GnomeCanvasItem * item) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - display->item_list = g_list_prepend (display->item_list, item); -} - -/*****************************************************************************/ -/* Select all items. */ -/*****************************************************************************/ -void -gl_display_select_all (glDisplay * display) -{ - GList *p; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - gl_display_unselect_all (display); - - for (p = display->item_list; p != NULL; p = p->next) { - gl_display_select_item (display, GNOME_CANVAS_ITEM (p->data)); - } -} - -/*****************************************************************************/ -/* Select all items within given rectangular region */ -/*****************************************************************************/ -void -gl_display_select_region (glDisplay * display, - gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2) -{ - GList *p; - GnomeCanvasItem *item; - gdouble i_x1, i_y1, i_x2, i_y2; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail ((x1 <= x2) && (y1 <= y2)); - - for (p = display->item_list; p != NULL; p = p->next) { - item = GNOME_CANVAS_ITEM (p->data); - if (!item_selected (display, item)) { - - gl_item_get_bounds (item, &i_x1, &i_y1, &i_x2, &i_y2); - if ((i_x1 >= x1) && (i_x2 <= x2) && (i_y1 >= y1) - && (i_y2 <= y2)) { - gl_display_select_item (display, item); - } - - } - } -} - -/*****************************************************************************/ -/* Remove all selections */ -/*****************************************************************************/ -void -gl_display_unselect_all (glDisplay * display) -{ - GList *p, *p_next; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - for (p = display->selected_item_list; p != NULL; p = p_next) { - p_next = p->next; - gl_display_unselect_item (display, GNOME_CANVAS_ITEM (p->data)); - } -} - -/*****************************************************************************/ -/* Select an item. */ -/*****************************************************************************/ -void -gl_display_select_item (glDisplay * display, - GnomeCanvasItem * item) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - if (!item_selected (display, item)) { - display->selected_item_list = - g_list_prepend (display->selected_item_list, item); - } - gl_item_highlight (item); - gtk_widget_grab_focus (GTK_WIDGET (display->canvas)); -} - -/*****************************************************************************/ -/* Un-select items. */ -/*****************************************************************************/ -void -gl_display_unselect_item (glDisplay * display, - GnomeCanvasItem * item) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - gl_item_unhighlight (item); - - display->selected_item_list = - g_list_remove (display->selected_item_list, item); -} - -/*****************************************************************************/ -/* Has display been modified? */ -/*****************************************************************************/ -gboolean -gl_display_modified (glDisplay * display) -{ - g_return_val_if_fail (GL_IS_DISPLAY (display), FALSE); - - return display->modified; -} - -/*****************************************************************************/ -/* Set to modified state. */ -/*****************************************************************************/ -void -gl_display_set_modified (glDisplay * display) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - display->modified = TRUE; -} - -/*****************************************************************************/ -/* Reset to un-modified state. */ -/*****************************************************************************/ -void -gl_display_clear_modified (glDisplay * display) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - display->modified = FALSE; -} - -/*****************************************************************************/ -/* "Cut" selected items and place in clipboard selections. */ -/*****************************************************************************/ -void -gl_display_cut (glDisplay * display) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - gl_display_copy (display); - delete_selection_cb (GTK_WIDGET (display), display); -} - -/*****************************************************************************/ -/* "Copy" selected items to clipboard selections. */ -/*****************************************************************************/ -void -gl_display_copy (glDisplay * display) -{ - GList *p; - GnomeCanvasItem *item; - glLabelObject *object; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - if (display->selected_item_list) { - - gl_label_free (&display->selection_data); - display->selection_data = - gl_label_new_with_template (display->label-> - template_name, - display->label->rotate_flag); - - for (p = display->selected_item_list; p != NULL; p = p->next) { - - item = GNOME_CANVAS_ITEM (p->data); - object = gl_item_get_object (item); - gl_label_object_new_from_object (display-> - selection_data, - object); - - } - - gtk_selection_owner_set (display->invisible, - clipboard_atom, GDK_CURRENT_TIME); - display->have_selection = TRUE; - - } -} - -/*****************************************************************************/ -/* "Paste" from private clipboard selection. */ -/*****************************************************************************/ -void -gl_display_paste (glDisplay * display) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - - gtk_selection_convert (GTK_WIDGET (display->invisible), - clipboard_atom, GDK_SELECTION_TYPE_STRING, - GDK_CURRENT_TIME); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Canvas event handler. */ -/*---------------------------------------------------------------------------*/ -static int -canvas_event (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - - switch (display->state) { - - case GL_DISPLAY_STATE_ARROW: - return canvas_event_arrow_mode (canvas, event, data); - - case GL_DISPLAY_STATE_OBJECT_CREATE: - return gl_item_create_event_handler (canvas, event, data); - - default: - WARN ("Invalid display state."); /* Should not happen! */ - return FALSE; - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Canvas event handler (arrow mode) */ -/*---------------------------------------------------------------------------*/ -static int -canvas_event_arrow_mode (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - glDisplay *display = GL_DISPLAY (data); - gdouble x, y, x1, y1, x2, y2; - GnomeCanvasGroup *group; - GdkCursor *cursor; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - - if (display_item_at (display, x, y) == NULL) { - if (!(event->button.state & GDK_CONTROL_MASK)) { - gl_display_unselect_all (display); - } - - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (display->canvas)-> - window, FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, NULL, - NULL, event->button.time); - group = - gnome_canvas_root (GNOME_CANVAS - (display->canvas)); - item = - gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", x, "y1", y, - "x2", x, "y2", y, - "width_pixels", 2, - "outline_color_rgba", - GNOME_CANVAS_COLOR_A - (0, 0, 255, 128), - NULL); - x0 = x; - y0 = y; - - } - return FALSE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - if (dragging) { - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, - &x, &y); - x1 = MIN (x, x0); - y1 = MIN (y, y0); - x2 = MAX (x, x0); - y2 = MAX (y, y0); - gl_display_select_region (display, x1, y1, x2, - y2); - gtk_object_destroy (GTK_OBJECT (item)); - return TRUE; - } - return FALSE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, &x, &y); - - gnome_canvas_item_set (item, - "x1", MIN (x, x0), - "y1", MIN (y, y0), - "x2", MAX (x, x0), - "y2", MAX (y, y0), NULL); - return TRUE; - } else { - return FALSE; - } - - case GDK_KEY_PRESS: - if (!dragging) { - switch (event->key.keyval) { - case GDK_Left: - case GDK_KP_Left: - move_selected_items (display, - -1.0 / (display->scale), - 0.0); - break; - case GDK_Up: - case GDK_KP_Up: - move_selected_items (display, 0.0, - -1.0 / (display->scale)); - break; - case GDK_Right: - case GDK_KP_Right: - move_selected_items (display, - 1.0 / (display->scale), - 0.0); - break; - case GDK_Down: - case GDK_KP_Down: - move_selected_items (display, 0.0, - 1.0 / (display->scale)); - break; - case GDK_Delete: - case GDK_KP_Delete: - delete_selection_cb (GTK_WIDGET (canvas), - display); - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, - cursor); - gdk_cursor_destroy (cursor); - break; - default: - return FALSE; - } - } - return TRUE; /* We handled this or we were dragging. */ - - default: - return FALSE; - } - -} - -/*****************************************************************************/ -/* Item event handler. */ -/*****************************************************************************/ -gint -gl_display_item_event_handler (GnomeCanvasItem * item, - GdkEvent * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - - switch (display->state) { - - case GL_DISPLAY_STATE_ARROW: - return item_event_arrow_mode (item, event, data); - - default: - return FALSE; - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Item event handler (arrow mode) */ -/*---------------------------------------------------------------------------*/ -static int -item_event_arrow_mode (GnomeCanvasItem * item, - GdkEvent * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - static gdouble x, y; - static gboolean dragging = FALSE; - GdkCursor *cursor; - gdouble item_x, item_y; - gdouble new_x, new_y; - gboolean control_key_pressed; - - item_x = event->button.x; - item_y = event->button.y; - gnome_canvas_item_w2i (item->parent, &item_x, &item_y); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - control_key_pressed = event->button.state & GDK_CONTROL_MASK; - switch (event->button.button) { - case 1: - if (control_key_pressed) { - if (item_selected (display, item)) { - /* Un-selecting an already selected item */ - gl_display_unselect_item (display, - item); - return TRUE; - } else { - /* Add to current selection */ - gl_display_select_item (display, item); - } - } else { - if (!item_selected (display, item)) { - /* No control, key so remove any selections before adding */ - gl_display_unselect_all (display); - /* Add to current selection */ - gl_display_select_item (display, item); - } - } - /* Go into dragging mode while button remains pressed. */ - x = item_x; - y = item_y; - cursor = gdk_cursor_new (GDK_FLEUR); - gnome_canvas_item_grab (item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - cursor, event->button.time); - gdk_cursor_destroy (cursor); - dragging = TRUE; - return TRUE; - - case 3: - if (!item_selected (display, item)) { - if (!control_key_pressed) { - /* No control, key so remove any selections before adding */ - gl_display_unselect_all (display); - } - } - /* Add to current selection */ - gl_display_select_item (display, item); - /* bring up apropriate menu for selection. */ - popup_selection_menu (display, item, event); - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - /* Exit dragging mode */ - gnome_canvas_item_ungrab (item, event->button.time); - dragging = FALSE; - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - /* Dragging mode, move selection */ - new_x = item_x; - new_y = item_y; - move_selected_items (display, (new_x - x), (new_y - y)); - x = new_x; - y = new_y; - return TRUE; - } else { - return FALSE; - } - - case GDK_2BUTTON_PRESS: - switch (event->button.button) { - case 1: - /* Also exit dragging mode on a a double-click, bring up menu */ - gnome_canvas_item_ungrab (item, event->button.time); - dragging = FALSE; - gl_display_select_item (display, item); - gl_item_edit_dialog (item); - return TRUE; - - default: - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_FLEUR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*****************************************************************************/ -/* create menu for multiple selections. */ -/*****************************************************************************/ -GtkWidget * -gl_display_new_selection_menu (glDisplay * display) -{ - GtkWidget *menu, *menuitem; - - g_return_val_if_fail (GL_IS_DISPLAY (display), NULL); - - menu = gtk_menu_new (); - - menuitem = gtk_menu_item_new_with_label (_("Delete")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (delete_selection_cb), display); - - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label (_("Bring to front")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (raise_selection_cb), display); - - menuitem = gtk_menu_item_new_with_label (_("Send to back")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (lower_selection_cb), display); - - return menu; -} - -/*****************************************************************************/ -/* create menu for given item. */ -/*****************************************************************************/ -GtkWidget * -gl_display_new_item_menu (GnomeCanvasItem * item) -{ - GtkWidget *menu, *menuitem; - - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), NULL); - - menu = gtk_menu_new (); - - menuitem = gtk_menu_item_new_with_label (_("Edit properties...")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect_object (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gl_item_edit_dialog), - GTK_OBJECT (item)); - - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label (_("Delete")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (delete_item_cb), item); - - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label (_("Bring to front")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (raise_item_cb), item); - - menuitem = gtk_menu_item_new_with_label (_("Send to back")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (lower_item_cb), item); - - gtk_object_set_data (GTK_OBJECT (item), "object_menu", menu); - - return menu; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. popup menu for given item. */ -/*---------------------------------------------------------------------------*/ -static void -popup_selection_menu (glDisplay * display, - GnomeCanvasItem * item, - GdkEvent * event) -{ - GtkWidget *menu; - - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - if (multiple_items_selected (display)) { - if (display->menu != NULL) { - gtk_menu_popup (GTK_MENU (display->menu), - NULL, NULL, NULL, NULL, - event->button.button, - event->button.time); - } - } else { - - menu = gl_item_get_menu (item); - if (menu != NULL) { - gtk_menu_popup (GTK_MENU (menu), - NULL, NULL, NULL, NULL, - event->button.button, - event->button.time); - } - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. delete selection callback. */ -/*---------------------------------------------------------------------------*/ -static void -delete_selection_cb (GtkWidget * widget, - glDisplay * display) -{ - GList *p, *p_next; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - for (p = display->selected_item_list; p != NULL; p = p_next) { - p_next = p->next; - delete_item_cb (widget, GNOME_CANVAS_ITEM (p->data)); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. raise item to front callback. */ -/*---------------------------------------------------------------------------*/ -static void -raise_selection_cb (GtkWidget * widget, - glDisplay * display) -{ - GList *p; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - for (p = display->selected_item_list; p != NULL; p = p->next) { - raise_item_cb (widget, GNOME_CANVAS_ITEM (p->data)); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. lower item to back callback. */ -/*---------------------------------------------------------------------------*/ -static void -lower_selection_cb (GtkWidget * widget, - glDisplay * display) -{ - GList *p; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - for (p = display->selected_item_list; p != NULL; p = p->next) { - lower_item_cb (widget, GNOME_CANVAS_ITEM (p->data)); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. delete item callback. */ -/*---------------------------------------------------------------------------*/ -static void -delete_item_cb (GtkWidget * widget, - GnomeCanvasItem * item) -{ - glDisplay *display; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - display = gl_item_get_display (item); - - gl_display_unselect_item (display, item); - display->item_list = g_list_remove (display->item_list, item); - - gl_item_free (&item); - - gl_display_set_modified (display); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. raise item to front callback. */ -/*---------------------------------------------------------------------------*/ -static void -raise_item_cb (GtkWidget * widget, - GnomeCanvasItem * item) -{ - glLabelObject *object; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gl_item_get_object (item); - gl_label_object_raise_to_front (object); - - gnome_canvas_item_raise_to_top (item); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. lower item to back callback. */ -/*---------------------------------------------------------------------------*/ -static void -lower_item_cb (GtkWidget * widget, - GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gl_item_get_object (item); - display = gl_item_get_display (item); - - gl_label_object_lower_to_back (object); - - /* Send to bottom */ - gnome_canvas_item_lower_to_bottom (item); - - /* now raise it above all items that form the backgound */ - gnome_canvas_item_raise (item, display->n_bg_items); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. move selected items */ -/*---------------------------------------------------------------------------*/ -static void -move_selected_items (glDisplay * display, - gdouble dx, - gdouble dy) -{ - GList *p; - GnomeCanvasItem *item; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - for (p = display->selected_item_list; p != NULL; p = p->next) { - - item = GNOME_CANVAS_ITEM (p->data); - - move_item (item, dx, dy); - gl_item_highlight (item); - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. move item/object */ -/*---------------------------------------------------------------------------*/ -static void -move_item (GnomeCanvasItem * item, - gdouble dx, - gdouble dy) -{ - glLabelObject *object; - glDisplay *display; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gl_item_get_object (item); - - object->x += dx; - object->y += dy; - - gnome_canvas_item_move (item, dx, dy); - - display = gl_item_get_display (item); - gl_display_set_modified (display); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Return item at (x,y) if it is in our list of managed items. */ -/*---------------------------------------------------------------------------*/ -static GnomeCanvasItem * -display_item_at (glDisplay * display, - gdouble x, - gdouble y) -{ - GnomeCanvasItem *item; - - g_return_val_if_fail (GL_IS_DISPLAY (display), NULL); - - item = gnome_canvas_get_item_at (GNOME_CANVAS (display->canvas), x, y); - - /* No item is at x, y */ - if (item == NULL) - return NULL; - - /* Don't include our background items */ - if (g_list_find (display->bg_item_list, item) != NULL) - return NULL; - - return item; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Is the item in our current selection? */ -/*---------------------------------------------------------------------------*/ -static gboolean -item_selected (glDisplay * display, - GnomeCanvasItem * item) -{ - g_return_val_if_fail (GL_IS_DISPLAY (display), FALSE); - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE); - - if (g_list_find (display->selected_item_list, item) == NULL) { - return FALSE; - } - return TRUE; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Are there multiple items in our current selection? */ -/*---------------------------------------------------------------------------*/ -static gboolean -multiple_items_selected (glDisplay * display) -{ - g_return_val_if_fail (GL_IS_DISPLAY (display), FALSE); - - if (display->selected_item_list == NULL) - return FALSE; - if (display->selected_item_list->next == NULL) - return FALSE; - return TRUE; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-clear" signal. */ -/*---------------------------------------------------------------------------*/ -static void -selection_clear_cb (GtkWidget * widget, - GdkEventSelection * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - - g_return_if_fail (GL_IS_DISPLAY (display)); - - display->have_selection = FALSE; - gl_label_free (&display->selection_data); - display->selection_data = NULL; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-get" signal. */ -/*---------------------------------------------------------------------------*/ -static void -selection_get_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint info, - guint time, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - gchar *buffer; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - if (display->have_selection) { - - gl_label_save_xml_buffer (display->selection_data, &buffer); - gtk_selection_data_set (selection_data, - GDK_SELECTION_TYPE_STRING, 8, buffer, - strlen (buffer)); - g_free (buffer); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-received" signal. (Result of Paste) */ -/*---------------------------------------------------------------------------*/ -static void -selection_received_cb (GtkWidget * widget, - GtkSelectionData * selection_data, - guint time, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - glLabel *label = NULL; - GList *p; - glLabelObject *object, *newobject; - GnomeCanvasItem *item; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - if (selection_data->length < 0) { - return; - } - if (selection_data->type != GDK_SELECTION_TYPE_STRING) { - return; - } - - gl_display_unselect_all (display); - - gl_label_open_xml_buffer (&label, selection_data->data); - for (p = label->objects; p != NULL; p = p->next) { - object = (glLabelObject *) p->data; - newobject = - gl_label_object_new_from_object (display->label, object); - item = gl_item_new (newobject, display); - gl_display_add_item (display, item); - gl_display_select_item (display, item); - } - gl_label_free (&label); - - gl_display_set_modified (display); -} - -/*****************************************************************************/ -/* Zoom in one "notch" */ -/*****************************************************************************/ -void -gl_display_zoom_in (glDisplay * display) -{ - gint i, i_min; - gdouble dist, dist_min; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - /* Find index of current scale (or best match) */ - i_min = 1; /* start with 2nd largest scale */ - dist_min = fabs (scales[1] - display->scale); - for (i = 2; scales[i] != 0.0; i++) { - dist = fabs (scales[i] - display->scale); - if (dist < dist_min) { - i_min = i; - dist_min = dist; - } - } - - /* zoom in one "notch" */ - i = MAX (0, i_min - 1); - gl_display_set_zoom (display, scales[i] / HOME_SCALE); -} - -/*****************************************************************************/ -/* Zoom out one "notch" */ -/*****************************************************************************/ -void -gl_display_zoom_out (glDisplay * display) -{ - gint i, i_min; - gdouble dist, dist_min; - - g_return_if_fail (GL_IS_DISPLAY (display)); - - /* Find index of current scale (or best match) */ - i_min = 0; /* start with largest scale */ - dist_min = fabs (scales[0] - display->scale); - for (i = 1; scales[i] != 0.0; i++) { - dist = fabs (scales[i] - display->scale); - if (dist < dist_min) { - i_min = i; - dist_min = dist; - } - } - - /* zoom out one "notch" */ - if (scales[i_min] == 0.0) - return; - i = i_min + 1; - if (scales[i] == 0.0) - return; - gl_display_set_zoom (display, scales[i] / HOME_SCALE); - -} - -/*****************************************************************************/ -/* Set current zoom factor to explicit value. */ -/*****************************************************************************/ -void -gl_display_set_zoom (glDisplay * display, - gdouble scale) -{ - g_return_if_fail (GL_IS_DISPLAY (display)); - g_return_if_fail (scale > 0.0); - - display->scale = scale * HOME_SCALE; - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (display->canvas), - scale * HOME_SCALE); -} - -/*****************************************************************************/ -/* Get current zoom factor. */ -/*****************************************************************************/ -gdouble -gl_display_get_zoom (glDisplay * display) -{ - g_return_val_if_fail (GL_IS_DISPLAY (display), 1.0); - - return display->scale / HOME_SCALE; -} diff --git a/glabels1/src/display.h b/glabels1/src/display.h deleted file mode 100644 index 704e8aa..0000000 --- a/glabels1/src/display.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * display.h: GLabels Display module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __DISPLAY_H__ -#define __DISPLAY_H__ - -#include <gtk/gtk.h> -#include "label.h" - -typedef enum { - GL_DISPLAY_STATE_ARROW, - GL_DISPLAY_STATE_OBJECT_CREATE -} glDisplayState; - -#define GL_TYPE_DISPLAY (gl_display_get_type ()) -#define GL_DISPLAY(obj) (GTK_CHECK_CAST((obj), GL_TYPE_DISPLAY, glDisplay )) -#define GL_DISPLAY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_DISPLAY, glDisplayClass)) -#define GL_IS_DISPLAY(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_DISPLAY)) -#define GL_IS_DISPLAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_DISPLAY)) - -typedef struct _glDisplay glDisplay; -typedef struct _glDisplayClass glDisplayClass; - -struct _glDisplay { - GtkVBox parent_widget; - - glLabel *label; - - GtkWidget *canvas; - gdouble scale; - gint n_bg_items; - GList *bg_item_list; - - glDisplayState state; - glLabelObjectType create_type; - - gboolean modified; - - GList *item_list; - GList *selected_item_list; - - gint have_selection; - glLabel *selection_data; - GtkWidget *invisible; - - GtkWidget *menu; -}; - -struct _glDisplayClass { - GtkVBoxClass parent_class; -}; - -extern guint gl_display_get_type (void); - -extern GtkWidget *gl_display_new (glLabel * label); - -extern void gl_display_arrow_mode (glDisplay * display); -extern void gl_display_object_create_mode (glDisplay * display, - glLabelObjectType type); - -extern void gl_display_add_item (glDisplay * display, - GnomeCanvasItem * item); - -extern void gl_display_select_all (glDisplay * display); -extern void gl_display_select_region (glDisplay * display, - gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2); -extern void gl_display_unselect_all (glDisplay * display); - -extern void gl_display_select_item (glDisplay * display, - GnomeCanvasItem * item); -extern void gl_display_unselect_item (glDisplay * display, - GnomeCanvasItem * item); - -extern int gl_display_item_event_handler (GnomeCanvasItem * item, - GdkEvent * event, - gpointer data); - -extern GtkWidget *gl_display_new_selection_menu (glDisplay * display); -extern GtkWidget *gl_display_new_item_menu (GnomeCanvasItem * item); - -extern gboolean gl_display_modified (glDisplay * display); -extern void gl_display_set_modified (glDisplay * display); -extern void gl_display_clear_modified (glDisplay * display); - -extern void gl_display_cut (glDisplay * display); -extern void gl_display_copy (glDisplay * display); -extern void gl_display_paste (glDisplay * display); - -extern void gl_display_zoom_in (glDisplay * display); -extern void gl_display_zoom_out (glDisplay * display); -extern void gl_display_set_zoom (glDisplay * display, gdouble scale); -extern gdouble gl_display_get_zoom (glDisplay * display); - -#endif diff --git a/glabels1/src/edit.c b/glabels1/src/edit.c deleted file mode 100644 index 88ceaef..0000000 --- a/glabels1/src/edit.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * edit.c: Edit module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> - -#include "edit.h" - -#include "display.h" -#include "mdi.h" - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*============================================*/ -/* Private function prototypes. */ -/*============================================*/ - -/*****************************************************************************/ -/* "Cut" */ -/*****************************************************************************/ -void -gl_edit_cut_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - glDisplay *display; - - g_return_if_fail (child != NULL); - g_return_if_fail (app != NULL); - - display = gl_mdi_get_display (child); - - gl_display_cut (display); - -} - -/*****************************************************************************/ -/* "Copy" */ -/*****************************************************************************/ -void -gl_edit_copy_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - glDisplay *display; - - g_return_if_fail (child != NULL); - g_return_if_fail (app != NULL); - - display = gl_mdi_get_display (child); - - gl_display_copy (display); - -} - -/*****************************************************************************/ -/* "Paste" */ -/*****************************************************************************/ -void -gl_edit_paste_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - g_return_if_fail (child != NULL); - - display = gl_mdi_get_display (child); - - gl_display_paste (display); -} - -/*****************************************************************************/ -/* "Select ALL" */ -/*****************************************************************************/ -void -gl_edit_select_all_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - g_return_if_fail (child != NULL); - - display = gl_mdi_get_display (child); - - gl_display_select_all (display); -} - -/*****************************************************************************/ -/* "Un-select" */ -/*****************************************************************************/ -void -gl_edit_unselect_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - g_return_if_fail (child != NULL); - - display = gl_mdi_get_display (child); - - gl_display_unselect_all (display); -} diff --git a/glabels1/src/edit.h b/glabels1/src/edit.h deleted file mode 100644 index 0a9854b..0000000 --- a/glabels1/src/edit.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * edit.h: Edit module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __EDIT_H__ -#define __EDIT_H__ - -#include <gtk/gtk.h> - -extern void gl_edit_add_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_delete_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_title_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_select_all_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_unselect_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_cut_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_copy_cb (GtkWidget * widget, gpointer data); - -extern void gl_edit_paste_cb (GtkWidget * widget, gpointer data); - -#endif /* __EDIT_H__ */ diff --git a/glabels1/src/file.c b/glabels1/src/file.c deleted file mode 100644 index 9d3243f..0000000 --- a/glabels1/src/file.c +++ /dev/null @@ -1,415 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * file.c: FILE menu dialog module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> -#include <string.h> - -#include "file.h" -#include "mdi.h" -#include "util.h" -#include "media_select.h" -#include "rotate_select.h" - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/* Saved state for new dialog */ -static gchar *page_size = NULL; -static gchar *sheet_name = NULL; -static gboolean rotate_flag = FALSE; - -/* Saved state of file selectors */ -static gchar *open_path = NULL; -static gchar *save_path = NULL; - -/*===========================================*/ -/* Local function prototypes. */ -/*===========================================*/ -static void create_new_dialog_widgets (GnomeDialog * new_dlg); -static void new_template_changed (glMediaSelect * select, - gpointer data); -static void new_ok (GtkWidget * widget, - gpointer data); -static void open_ok (GtkWidget * widget, - GtkFileSelection * fsel); -static void save_as_ok (GtkWidget * widget, - GtkFileSelection * fsel); - -/*****************************************************************************/ -/* "New" menu callback. */ -/*****************************************************************************/ -void -gl_file_new_cb (GtkWidget * widget, - gpointer data) -{ - GtkWidget *new_dlg; - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - - g_return_if_fail (app != NULL); - - new_dlg = gnome_dialog_new (_("New Label or Card"), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, NULL); - gtk_window_set_transient_for (GTK_WINDOW (new_dlg), GTK_WINDOW (app)); - - create_new_dialog_widgets (GNOME_DIALOG (new_dlg)); - - gnome_dialog_button_connect (GNOME_DIALOG (new_dlg), 0, - GTK_SIGNAL_FUNC (new_ok), new_dlg); - - gnome_dialog_button_connect_object (GNOME_DIALOG (new_dlg), 1, - GTK_SIGNAL_FUNC - (gtk_widget_destroy), - GTK_OBJECT (new_dlg)); - - gtk_widget_show_all (GTK_WIDGET (new_dlg)); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create widgets to enter a bond by sn and idate. */ -/*---------------------------------------------------------------------------*/ -static void -create_new_dialog_widgets (GnomeDialog * new_dlg) -{ - GtkWidget *wframe, *wvbox, *template_entry, *rotate_sel; - - wframe = gtk_frame_new (_("Media Type")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (new_dlg)->vbox), - wframe, FALSE, FALSE, 0); - - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gtk_container_add (GTK_CONTAINER (wframe), wvbox); - - template_entry = gl_media_select_new (); - gtk_container_add (GTK_CONTAINER (wvbox), template_entry); - - wframe = gtk_frame_new (_("Label orientation")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (new_dlg)->vbox), - wframe, FALSE, FALSE, 0); - - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gtk_container_add (GTK_CONTAINER (wframe), wvbox); - - rotate_sel = gl_rotate_select_new (); - gtk_box_pack_start (GTK_BOX (wvbox), rotate_sel, FALSE, FALSE, 0); - - gtk_object_set_data (GTK_OBJECT (new_dlg), "template_entry", - template_entry); - gtk_object_set_data (GTK_OBJECT (new_dlg), "rotate_sel", rotate_sel); - - gtk_signal_connect (GTK_OBJECT (template_entry), "changed", - GTK_SIGNAL_FUNC (new_template_changed), rotate_sel); - - if (page_size != NULL) { - gl_media_select_set_page_size (GL_MEDIA_SELECT (template_entry), - page_size); - } - if (sheet_name != NULL) { - gl_media_select_set_name (GL_MEDIA_SELECT (template_entry), - sheet_name); - gl_rotate_select_set_template_name (GL_ROTATE_SELECT - (rotate_sel), sheet_name); - } else { - sheet_name = - gl_media_select_get_name (GL_MEDIA_SELECT (template_entry)); - gl_rotate_select_set_template_name (GL_ROTATE_SELECT - (rotate_sel), sheet_name); - } - gl_rotate_select_set_state (GL_ROTATE_SELECT (rotate_sel), rotate_flag); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. New template changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -new_template_changed (glMediaSelect * select, - gpointer data) -{ - glRotateSelect *rotate_sel = GL_ROTATE_SELECT (data); - gchar *name; - - name = gl_media_select_get_name (GL_MEDIA_SELECT (select)); - - gl_rotate_select_set_template_name (GL_ROTATE_SELECT (rotate_sel), - name); - - g_free (name); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. New "ok" button callback. */ -/*---------------------------------------------------------------------------*/ -static void -new_ok (GtkWidget * widget, - gpointer data) -{ - GnomeDialog *new_dlg = GNOME_DIALOG (data); - GtkWidget *template_entry, *rotate_sel; - - template_entry = - GTK_WIDGET (gtk_object_get_data - (GTK_OBJECT (new_dlg), "template_entry")); - rotate_sel = - GTK_WIDGET (gtk_object_get_data - (GTK_OBJECT (new_dlg), "rotate_sel")); - - if (page_size != NULL) - g_free (page_size); - page_size = - gl_media_select_get_page_size (GL_MEDIA_SELECT (template_entry)); - - if (sheet_name != NULL) - g_free (sheet_name); - sheet_name = - gl_media_select_get_name (GL_MEDIA_SELECT (template_entry)); - - rotate_flag = - gl_rotate_select_get_state (GL_ROTATE_SELECT (rotate_sel)); - - gl_mdi_new_child (sheet_name, rotate_flag); - - gtk_widget_destroy (GTK_WIDGET (new_dlg)); -} - -/*****************************************************************************/ -/* "Open" menu callback. */ -/*****************************************************************************/ -void -gl_file_open_cb (GtkWidget * widget, - gpointer data) -{ - GtkFileSelection *fsel; - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - - g_return_if_fail (app != NULL); - - fsel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Open"))); - gtk_window_set_transient_for (GTK_WINDOW (fsel), GTK_WINDOW (app)); - gtk_window_set_title (GTK_WINDOW (fsel), _("Open label")); - - gtk_signal_connect (GTK_OBJECT (fsel->ok_button), "clicked", - GTK_SIGNAL_FUNC (open_ok), fsel); - - gtk_signal_connect_object (GTK_OBJECT (fsel->cancel_button), "clicked", - GTK_SIGNAL_FUNC (gtk_widget_destroy), - GTK_OBJECT (fsel)); - - /* Recover state of open dialog */ - if (open_path != NULL) { - gtk_file_selection_set_filename (fsel, open_path); - } - - /* show the dialog */ - gtk_widget_show (GTK_WIDGET (fsel)); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Open "O.K." button callback. */ -/*---------------------------------------------------------------------------*/ -static void -open_ok (GtkWidget * widget, - GtkFileSelection * fsel) -{ - gchar *filename; - GtkWidget *dlg; - - g_return_if_fail (GTK_IS_FILE_SELECTION (fsel)); - - /* get the filename */ - filename = g_strdup (gtk_file_selection_get_filename (fsel)); - if (filename) { - if (!gl_mdi_new_child_from_xml_file (filename)) { - - dlg = - gnome_error_dialog_parented (_("Cannot open file"), - GTK_WINDOW (fsel)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - - } else { - - gtk_widget_destroy (GTK_WIDGET (fsel)); - - if (open_path != NULL) - g_free (open_path); - open_path = g_dirname (filename); - if (open_path != NULL) - open_path = g_strconcat (open_path, "/", NULL); - - } - } - - g_free (filename); -} - -/*****************************************************************************/ -/* "Save" menu callback. */ -/*****************************************************************************/ -void -gl_file_save_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - gchar *filename; - - g_return_if_fail (child != NULL); - g_return_if_fail (app != NULL); - - filename = gl_mdi_get_filename (child); - if (!filename) { - gl_file_save_as_cb (widget, data); - } else { - if (!gl_mdi_save_child_to_xml_file (child, filename)) { - gnome_error_dialog_parented (_("Cannot save file"), - GTK_WINDOW (app)); - } - } - - g_free (filename); -} - -/*****************************************************************************/ -/* "Save As" menu callback. */ -/*****************************************************************************/ -void -gl_file_save_as_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - GtkFileSelection *fsel; - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - gint id; - - g_return_if_fail (child != NULL); - g_return_if_fail (app != NULL); - - fsel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save As"))); - id = gl_mdi_get_id (child); - gtk_object_set_data (GTK_OBJECT (fsel), "id", GINT_TO_POINTER (id)); - - gtk_window_set_transient_for (GTK_WINDOW (fsel), GTK_WINDOW (app)); - gtk_window_set_title (GTK_WINDOW (fsel), _("Save label as")); - - gtk_signal_connect (GTK_OBJECT (fsel->ok_button), "clicked", - GTK_SIGNAL_FUNC (save_as_ok), fsel); - - gtk_signal_connect_object (GTK_OBJECT (fsel->cancel_button), "clicked", - GTK_SIGNAL_FUNC (gtk_widget_destroy), - GTK_OBJECT (fsel)); - - /* Recover proper state of save-as dialog */ - if (save_path != NULL) { - gtk_file_selection_set_filename (fsel, save_path); - } - - /* show the dialog */ - gtk_widget_show (GTK_WIDGET (fsel)); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Save As" ok button callback. */ -/*---------------------------------------------------------------------------*/ -static void -save_as_ok (GtkWidget * widget, - GtkFileSelection * fsel) -{ - gchar *raw_filename, *filename; - GtkWidget *dlg; - gint id = - GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (fsel), "id")); - GnomeMDIChild *child = gl_mdi_find_child (id); - - g_return_if_fail (GTK_IS_FILE_SELECTION (fsel)); - - if (child == NULL) { - gtk_widget_destroy (GTK_WIDGET (fsel)); - dlg = gnome_error_dialog (_("Label no longer valid!")); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - return; - } - - /* get the filename */ - raw_filename = g_strdup (gtk_file_selection_get_filename (fsel)); - - if (!raw_filename || (raw_filename[strlen (raw_filename) - 1] == '/')) { - - dlg = gnome_warning_dialog_parented (_("Must supply file name"), - GTK_WINDOW (fsel)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - - } else { - - filename = gl_util_add_extension (raw_filename); - - if (!gl_mdi_save_child_to_xml_file (child, filename)) { - - dlg = - gnome_error_dialog_parented (_ - ("Error writing file"), - GTK_WINDOW (fsel)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - - } else { - - if (save_path != NULL) - g_free (save_path); - save_path = g_dirname (filename); - if (save_path != NULL) - save_path = g_strconcat (save_path, "/", NULL); - - gtk_widget_destroy (GTK_WIDGET (fsel)); - } - - g_free (filename); - } - - g_free (raw_filename); -} - -/*****************************************************************************/ -/* "Close" menu callback. */ -/*****************************************************************************/ -void -gl_file_close_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - - gl_mdi_close_child (child); -} - -/*****************************************************************************/ -/* "Exit" menu callback. */ -/*****************************************************************************/ -void -gl_file_exit_cb (GtkWidget * widget, - gpointer data) -{ - gl_mdi_close_all (); -} diff --git a/glabels1/src/file.h b/glabels1/src/file.h deleted file mode 100644 index f5d035e..0000000 --- a/glabels1/src/file.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * file.h: FILE menu dialog module header file - * - * Copyright (C) 2000 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __FILE_H__ -#define __FILE_H__ - -#include <gtk/gtk.h> - -void gl_file_new_cb (GtkWidget * widget, gpointer data); -void gl_file_open_cb (GtkWidget * widget, gpointer data); -void gl_file_save_cb (GtkWidget * widget, gpointer data); -void gl_file_save_as_cb (GtkWidget * widget, gpointer data); -void gl_file_close_cb (GtkWidget * widget, gpointer data); -void gl_file_exit_cb (GtkWidget * widget, gpointer data); - -#endif /* __FILE_H__ */ diff --git a/glabels1/src/glabels.c b/glabels1/src/glabels.c deleted file mode 100644 index 6e68fb9..0000000 --- a/glabels1/src/glabels.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * glabels.c: main program module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> -#include <libgnomeui/gnome-window-icon.h> - -#include "splash.h" -#include "stock.h" -#include "merge.h" -#include "merge_ui.h" -#include "mdi.h" -#include "template.h" -#include "debug.h" - -#ifdef PACKAGE_DATA_DIR -#define ICON_PIXMAP (PACKAGE_DATA_DIR "/pixmaps/glabels/glabels-icon.png") -#else -#define ICON_PIXMAP gnome_pixmap_file("glabels/glabels-icon.png") -#endif - -/*============================================*/ -/* Private globals */ -/*============================================*/ -static struct poptOption options[] = { - {NULL, '\0', 0, NULL, 0, NULL, NULL} -}; - -/*============================================*/ -/* Private function prototypes */ -/*============================================*/ -static void session_die (GnomeClient * client, - gpointer client_data); -static gint save_session (GnomeClient * client, - gint phase, - GnomeSaveStyle save_style, - gint is_shutdown, - GnomeInteractStyle interact_style, - gint is_fast, - gpointer client_data); - - -/*****************************************************************************/ -/* Main */ -/*****************************************************************************/ -int -main (int argc, - char *argv[]) -{ - poptContext pctx; - gchar **args; - GnomeMDI *mdi; - GnomeClient *client; - GSList *p, *file_list = NULL; - gint i, opened; - - bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); - textdomain (PACKAGE); - - gnome_init_with_popt_table (PACKAGE, VERSION, - argc, argv, options, 0, &pctx); - - /* Splash screen */ - gl_splash (); - - if (!g_file_exists (ICON_PIXMAP)) { - WARN ("Could not find %s", ICON_PIXMAP); - } - gnome_window_icon_set_default_from_file (ICON_PIXMAP); - - /* argument parsing */ - args = (char **) poptGetArgs (pctx); - for (i = 0; args && args[i]; i++) { - file_list = g_slist_append (file_list, args[i]); - } - poptFreeContext (pctx); - - /* session management */ - client = gnome_master_client (); - gtk_signal_connect (GTK_OBJECT (client), "save_yourself", - GTK_SIGNAL_FUNC (save_session), argv[0]); - gtk_signal_connect (GTK_OBJECT (client), "die", - GTK_SIGNAL_FUNC (session_die), NULL); - - gl_stock_init (); - gl_merge_init (); - gl_merge_ui_init (); - gl_template_init (); - - mdi = gl_mdi_init (); - - /* Any files on command line? */ - opened = 0; - for (p = file_list; p; p = p->next) { - if (gl_mdi_new_child_from_xml_file (p->data)) - opened++; - } - g_slist_free (file_list); - - if (!opened) { - gnome_mdi_open_toplevel (mdi); - } - - /* Now start main loop */ - gtk_main (); - - return 0; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Save Session signal callback. */ -/*---------------------------------------------------------------------------*/ -static gint -save_session (GnomeClient * client, - gint phase, - GnomeSaveStyle save_style, - gint is_shutdown, - GnomeInteractStyle interact_style, - gint is_fast, - gpointer client_data) -{ - gchar **argv; - guint argc; - - argv = g_malloc0 (4 * sizeof (gchar *)); - argc = 1; - - argv[0] = client_data; - - gnome_client_set_clone_command (client, argc, argv); - gnome_client_set_restart_command (client, argc, argv); - - return TRUE; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Session Die signal callback. */ -/*---------------------------------------------------------------------------*/ -static void -session_die (GnomeClient * client, - gpointer client_data) -{ - gtk_main_quit (); -} diff --git a/glabels1/src/glabels_batch.c b/glabels1/src/glabels_batch.c deleted file mode 100644 index 480f207..0000000 --- a/glabels1/src/glabels_batch.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * glabels.c: main program module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <unistd.h> -#include <stdlib.h> -#include <gnome.h> -#include <libgnomeprint/gnome-printer.h> - -#include "merge.h" -#include "label.h" -#include "template.h" -#include "print.h" -#include "util.h" - -/*============================================*/ -/* Private globals */ -/*============================================*/ -static gboolean help_flag = FALSE; -static gboolean version_flag = FALSE; -static gchar *output = "output.ps"; -static gint n_copies = 1; -static gint n_sheets = 1; -static gboolean outline_flag = FALSE; -static gboolean reverse_flag = FALSE; - -static struct poptOption options[] = { - {"help", 'h', POPT_ARG_NONE, &help_flag, 1, - N_("print this message"), NULL}, - {"version", 'v', POPT_ARG_NONE, &version_flag, 0, - N_("print the version of glabels-batch being used"), NULL}, - {"output", 'o', POPT_ARG_STRING, &output, 0, - N_("set output filename (default=\"output.ps\")"), N_("filename")}, - {"sheets", 's', POPT_ARG_INT, &n_sheets, 0, - N_("number of sheets (default=1)"), N_("sheets")}, - {"copies", 'c', POPT_ARG_INT, &n_copies, 0, - N_("number of copies (default=1)"), N_("copies")}, - {"outline", 'l', POPT_ARG_NONE, &outline_flag, 0, - N_("print outlines (to test printer alignment)"), NULL}, - {"reverse", 'r', POPT_ARG_NONE, &reverse_flag, 0, - N_("print in reverse (i.e. a mirror image)"), NULL}, - {NULL, '\0', 0, NULL, 0, NULL, NULL} -}; - - - -/*****************************************************************************/ -/* Main */ -/*****************************************************************************/ -int -main (int argc, - char *argv[]) -{ - poptContext pctx; - gchar **args; - gint rc; - GSList *p, *file_list = NULL; - gint n_files; - GnomePrintMaster *master = NULL; - gchar *abs_fn; - GnomePrinter *prn = NULL; - glLabel *label = NULL; - - bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); - textdomain (PACKAGE); - - setlocale (LC_ALL, ""); - gtk_type_init (); - - /* argument parsing */ - pctx = poptGetContext (NULL, argc, argv, options, 0); - poptSetOtherOptionHelp (pctx, _("[OPTION...] GLABELS_FILE...") ); - if ( (rc = poptGetNextOpt(pctx)) < -1 ) { - fprintf (stderr, "%s: %s\n", - poptBadOption (pctx,0), poptStrerror(rc)); - poptPrintUsage (pctx, stderr, 0); - return -1; - } - if ( version_flag ) { - fprintf ( stderr, "glabels-batch %s\n", VERSION ); - } - if ( help_flag ) { - poptPrintHelp (pctx, stderr, 0); - return -1; - } - args = (char **) poptGetArgs (pctx); - for (n_files = 0; args && args[n_files]; n_files++) { - file_list = g_slist_append (file_list, args[n_files]); - } - if ( !n_files ) { - fprintf ( stderr, _("missing glabels file\n") ); - poptPrintHelp (pctx, stderr, 0); - return -1; - } - poptFreeContext (pctx); - - /* initialize components */ - gl_merge_init (); - gl_template_init (); - - /* now print the files */ - for (p = file_list; p; p = p->next) { - if ( gl_label_open_xml( &label, p->data ) == LABEL_OK ) { - - if ( master == NULL ) { - master = gnome_print_master_new (); - abs_fn = gl_util_make_absolute ( output ); - prn = gnome_printer_new_generic_ps ( abs_fn ); - g_free( abs_fn ); - gnome_print_master_set_printer ( master, prn ); - } - - gl_print_batch( master, label, n_sheets, n_copies, - outline_flag, reverse_flag ); - - gl_label_free( &label ); - } - else { - fprintf ( stderr, _("cannot open glabels file %s\n"), - (char *)p->data ); - } - } - if ( master != NULL ) { - unlink (output); - gnome_print_master_print (master); - } - - g_slist_free (file_list); - - return 0; -} - diff --git a/glabels1/src/gnome-canvas-hacktext.h b/glabels1/src/gnome-canvas-hacktext.h deleted file mode 100644 index f36ec1a..0000000 --- a/glabels1/src/gnome-canvas-hacktext.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Hacktext item type for GnomeCanvas widget - * - * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is - * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties. - * - * Copyright (C) 1998,1999 The Free Software Foundation - * - * Authors: Federico Mena <federico@nuclecu.unam.mx> - * Raph Levien <raph@acm.org> - */ - -#ifndef GNOME_CANVAS_HACKTEXT_H -#define GNOME_CANVAS_HACKTEXT_H - -BEGIN_GNOME_DECLS - -/* Hacktext item for the canvas. The API is totally unstable - it needs to be replaced with one - * that supports Unicode and the merged GnomeText/GScript API. However, I need a text item now, - * and the GnomeText/GScript integration is going to take a bit more effort. - * - * The following object arguments are available: - * - * name type read/write description - * ------------------------------------------------------------------------------------------ - * text char * RW The string of the text item. - * glyphlist GnomeGlyphList * W Glyphlist - * fill_color string W X color specification for fill color, - * or NULL pointer for no color (transparent). - * fill_color_gdk GdkColor* RW Allocated GdkColor for fill. - */ - -#define GNOME_TYPE_CANVAS_HACKTEXT (gnome_canvas_hacktext_get_type ()) -#define GNOME_CANVAS_HACKTEXT(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_HACKTEXT, GnomeCanvasHacktext)) -#define GNOME_CANVAS_HACKTEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_HACKTEXT, GnomeCanvasHacktextClass)) -#define GNOME_IS_CANVAS_HACKTEXT(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_HACKTEXT)) -#define GNOME_IS_CANVAS_HACKTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_HACKTEXT)) - -typedef struct _GnomeCanvasHacktext GnomeCanvasHacktext; -typedef struct _GnomeCanvasHacktextPriv GnomeCanvasHacktextPriv; -typedef struct _GnomeCanvasHacktextClass GnomeCanvasHacktextClass; - -#include <libgnomeui/gnome-canvas.h> - -struct _GnomeCanvasHacktext { - GnomeCanvasItem item; - - char *text; /* String of the text item */ - - guint fill_color; /* Fill color, RGBA */ - - gulong fill_pixel; /* Color for fill */ - - guint fill_set : 1; /* Is fill color set? */ - - double size; /* size in user units */ - - double x, y; /* x, y coords of text origin */ - - /* Antialiased specific stuff follows */ - guint32 fill_rgba; /* RGBA color for filling */ - - GnomeCanvasHacktextPriv *priv; /* Private data */ -}; - -struct _GnomeCanvasHacktextClass { - GnomeCanvasItemClass parent_class; -}; - - -/* Standard Gtk function */ -GtkType gnome_canvas_hacktext_get_type (void); - - -END_GNOME_DECLS - -#endif diff --git a/glabels1/src/hack.c b/glabels1/src/hack.c deleted file mode 100644 index 07ecf0a..0000000 --- a/glabels1/src/hack.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * hack.c: various small hacks to deal with I18N - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * - * The g_unichar_to_utf8 has been borrowed from gnumeric, which was borrowed - * from glib-1.3: - * g_unichar_to_utf8: Copyright Red Hat, 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 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 - */ - -#include <config.h> - -#include <gdk/gdk.h> -#include <string.h> -#include <stdlib.h> - -#include "hack.h" - -static int g_unichar_to_utf8 (gint c, gchar * outbuf); - -/*****************************************************************************/ -/* Convert text to UTF8. */ -/*****************************************************************************/ -gchar * -gl_hack_text_to_utf8 (gchar * text) -{ - gint len; - GdkWChar *wide_text; - gint enc_status; - gchar *p, *utf8_text; - gint i; - - len = strlen (text); - wide_text = g_new (GdkWChar, len + 1); - enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len); - if (enc_status < 0) { - g_free (wide_text); - return NULL; - } - - p = utf8_text = g_new (gchar, enc_status * 6 + 1); - for (i = 0; i < enc_status; i++) { - p += g_unichar_to_utf8 ((gint) wide_text[i], p); - } - *p = 0; /* terminate */ - - g_free (wide_text); - - return utf8_text; -} - -/*****************************************************************************/ -/* Calculate width of text with given font. */ -/*****************************************************************************/ -double -gl_hack_get_width_string (GnomeFont * font, - gchar * text) -{ - gint len; - GdkWChar *wide_text; - gint enc_status; - gint i; - gdouble w; - - len = strlen (text); - wide_text = g_new (GdkWChar, len + 1); - enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len); - if (enc_status < 0) { - g_free (wide_text); - return 0.0; - } - - w = 0; - for (i = 0; i < enc_status; i++) { - w += gnome_font_get_glyph_width (font, - gnome_font_lookup_default - (font, wide_text[i])); - } - - g_free (wide_text); - - return w; -} - -/*----------------------------------------------------------------------------- - * This is cut & pasted from glib 1.3 - * - * We need it only for iso-8859-1 converter and it will be - * abandoned, if glib 2.0 or any other unicode library will - * be introduced. - *---------------------------------------------------------------------------*/ -static int -g_unichar_to_utf8 (gint c, - gchar * outbuf) -{ - size_t len = 0; - int first; - int i; - - if (c < 0x80) { - first = 0; - len = 1; - } else if (c < 0x800) { - first = 0xc0; - len = 2; - } else if (c < 0x10000) { - first = 0xe0; - len = 3; - } else if (c < 0x200000) { - first = 0xf0; - len = 4; - } else if (c < 0x4000000) { - first = 0xf8; - len = 5; - } else { - first = 0xfc; - len = 6; - } - - if (outbuf) { - for (i = len - 1; i > 0; --i) { - outbuf[i] = (c & 0x3f) | 0x80; - c >>= 6; - } - outbuf[0] = c | first; - } - - return len; -} diff --git a/glabels1/src/hack.h b/glabels1/src/hack.h deleted file mode 100644 index 2f0b868..0000000 --- a/glabels1/src/hack.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * hack.h: various small hacks to deal with I18N - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __HACK_H__ -#define __HACK_H__ - -#include <libgnomeprint/gnome-font.h> - -extern gchar *gl_hack_text_to_utf8 (gchar * text); - -extern double gl_hack_get_width_string (GnomeFont * font, gchar * text); - -#endif /* __HACK_H__ */ diff --git a/glabels1/src/highlight.c b/glabels1/src/highlight.c deleted file mode 100644 index 6acc388..0000000 --- a/glabels1/src/highlight.c +++ /dev/null @@ -1,1443 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * highlight.c: GLabels Resizable Highlight module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "highlight.h" -#include "item.h" - -#include "math.h" - -#include "debug.h" - -#define MIN_ITEM_SIZE 1.0 - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void highlight_resizable_box (GnomeCanvasItem * item, - glHighlightStyle style); -static void highlight_resizable_line (GnomeCanvasItem * item); -static void highlight_simple (GnomeCanvasItem * item); - -static int tl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int tr_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int bl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int br_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); - -static int sl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int sr_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int st_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int sb_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); - -static int p1_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); -static int p2_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); - -static int passthrough_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, gpointer data); - -/*****************************************************************************/ -/* Create/Update & Display a resizable highlight for given item. */ -/*****************************************************************************/ -void -gl_highlight (GnomeCanvasItem * item, - glHighlightStyle style) -{ - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - switch (style) { - - case GL_HIGHLIGHT_BOX_RESIZABLE: - case GL_HIGHLIGHT_ELLIPSE_RESIZABLE: - highlight_resizable_box (item, style); - break; - - case GL_HIGHLIGHT_LINE_RESIZABLE: - highlight_resizable_line (item); - break; - - case GL_HIGHLIGHT_SIMPLE: - highlight_simple (item); - break; - - default: - WARN ("Invalid resizable highlight style"); - - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create/Update & Display a resizable box highlight. */ -/*---------------------------------------------------------------------------*/ -static void -highlight_resizable_box (GnomeCanvasItem * item, - glHighlightStyle style) -{ - GnomeCanvasItem *highlight; - gdouble x, y, w, h; - GnomeCanvasItem *outline; /* Outline around item */ - GnomeCanvasItem *tl, *tr, *bl, *br; /* Handles at four corners */ - GnomeCanvasItem *sl, *sr, *st, *sb; /* Handles at each side */ - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - highlight = gtk_object_get_data (GTK_OBJECT (item), "highlight"); - - gl_item_get_position_size (item, &x, &y, &w, &h); - - if (highlight == NULL) { - - highlight = - gnome_canvas_item_new (gnome_canvas_root - (GNOME_CANVAS (item->canvas)), - gnome_canvas_group_get_type (), "x", - x, "y", y, NULL); - - switch (style) { - case GL_HIGHLIGHT_BOX_RESIZABLE: - outline = - gnome_canvas_item_new (GNOME_CANVAS_GROUP - (highlight), - gnome_canvas_rect_get_type - (), - "x1", -0.5, - "y1", -0.5, - "x2", w + 0.5, - "y2", h + 0.5, - "width_pixels", 2, - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, - 255, - 255), - NULL); - break; - case GL_HIGHLIGHT_ELLIPSE_RESIZABLE: - outline = - gnome_canvas_item_new (GNOME_CANVAS_GROUP - (highlight), - gnome_canvas_ellipse_get_type - (), - "x1", -0.5, - "y1", -0.5, - "x2", w + 0.5, - "y2", h + 0.5, - "width_pixels", 2, - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, - 255, - 255), - NULL); - break; - default: - outline = NULL; - WARN ("Invalid resizable highlight style"); - } - - tl = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", -1.0, - "y1", -1.0, - "x2", +1.0, - "y2", +1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - tr = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", w - 1.0, - "y1", -1.0, - "x2", w + 1.0, - "y2", +1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - bl = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", -1.0, - "y1", h - 1.0, - "x2", +1.0, - "y2", h + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - br = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", w - 1.0, - "y1", h - 1.0, - "x2", w + 1.0, - "y2", h + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - sl = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", -1.0, - "y1", h / 2.0 - 1.0, - "x2", +1.0, - "y2", h / 2.0 + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - sr = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", w - 1.0, - "y1", h / 2.0 - 1.0, - "x2", w + 1.0, - "y2", h / 2.0 + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - st = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", w / 2.0 - 1.0, - "y1", -1.0, - "x2", w / 2.0 + 1.0, - "y2", +1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - sb = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", w / 2.0 - 1.0, - "y1", h - 1.0, - "x2", w / 2.0 + 1.0, - "y2", h + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - gtk_object_set_data (GTK_OBJECT (item), "highlight", highlight); - - gtk_object_set_data (GTK_OBJECT (highlight), "outline", - outline); - - gtk_object_set_data (GTK_OBJECT (highlight), "tl", tl); - gtk_object_set_data (GTK_OBJECT (highlight), "tr", tr); - gtk_object_set_data (GTK_OBJECT (highlight), "bl", bl); - gtk_object_set_data (GTK_OBJECT (highlight), "br", br); - gtk_object_set_data (GTK_OBJECT (highlight), "sl", sl); - gtk_object_set_data (GTK_OBJECT (highlight), "sr", sr); - gtk_object_set_data (GTK_OBJECT (highlight), "st", st); - gtk_object_set_data (GTK_OBJECT (highlight), "sb", sb); - - gtk_signal_connect (GTK_OBJECT (tl), "event", - GTK_SIGNAL_FUNC (tl_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (tr), "event", - GTK_SIGNAL_FUNC (tr_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (bl), "event", - GTK_SIGNAL_FUNC (bl_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (br), "event", - GTK_SIGNAL_FUNC (br_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (sl), "event", - GTK_SIGNAL_FUNC (sl_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (sr), "event", - GTK_SIGNAL_FUNC (sr_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (st), "event", - GTK_SIGNAL_FUNC (st_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (sb), "event", - GTK_SIGNAL_FUNC (sb_resize_event_handler), - item); - - gtk_signal_connect (GTK_OBJECT (outline), "event", - GTK_SIGNAL_FUNC (passthrough_event_handler), - item); - - } else { - - gnome_canvas_item_set (highlight, "x", x, "y", y, NULL); - - outline = - gtk_object_get_data (GTK_OBJECT (highlight), "outline"); - - tl = gtk_object_get_data (GTK_OBJECT (highlight), "tl"); - tr = gtk_object_get_data (GTK_OBJECT (highlight), "tr"); - bl = gtk_object_get_data (GTK_OBJECT (highlight), "bl"); - br = gtk_object_get_data (GTK_OBJECT (highlight), "br"); - sl = gtk_object_get_data (GTK_OBJECT (highlight), "sl"); - sr = gtk_object_get_data (GTK_OBJECT (highlight), "sr"); - st = gtk_object_get_data (GTK_OBJECT (highlight), "st"); - sb = gtk_object_get_data (GTK_OBJECT (highlight), "sb"); - - gnome_canvas_item_set (outline, - "x1", -0.5, - "y1", -0.5, - "x2", w + 0.5, "y2", h + 0.5, NULL); - - gnome_canvas_item_set (tl, - "x1", -1.0, - "y1", -1.0, - "x2", +1.0, "y2", +1.0, NULL); - - gnome_canvas_item_set (tr, - "x1", w - 1.0, - "y1", -1.0, - "x2", w + 1.0, "y2", +1.0, NULL); - - gnome_canvas_item_set (bl, - "x1", -1.0, - "y1", h - 1.0, - "x2", +1.0, "y2", h + 1.0, NULL); - - gnome_canvas_item_set (br, - "x1", w - 1.0, - "y1", h - 1.0, - "x2", w + 1.0, "y2", h + 1.0, NULL); - - gnome_canvas_item_set (sl, - "x1", -1.0, - "y1", h / 2.0 - 1.0, - "x2", +1.0, "y2", h / 2.0 + 1.0, NULL); - - gnome_canvas_item_set (sr, - "x1", w - 1.0, - "y1", h / 2.0 - 1.0, - "x2", w + 1.0, - "y2", h / 2.0 + 1.0, NULL); - - gnome_canvas_item_set (st, - "x1", w / 2.0 - 1.0, - "y1", -1.0, - "x2", w / 2.0 + 1.0, "y2", +1.0, NULL); - - gnome_canvas_item_set (sb, - "x1", w / 2.0 - 1.0, - "y1", h - 1.0, - "x2", w / 2.0 + 1.0, - "y2", h + 1.0, NULL); - - gnome_canvas_item_show (highlight); - - } - - gnome_canvas_item_raise_to_top (highlight); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create/Update & Display a resizable line highlight. */ -/*---------------------------------------------------------------------------*/ -static void -highlight_resizable_line (GnomeCanvasItem * item) -{ - GnomeCanvasItem *highlight; - gdouble x, y, dx, dy; - GnomeCanvasPoints *points; - GnomeCanvasItem *outline; /* Outline around item */ - GnomeCanvasItem *p1, *p2; /* Handles at endpoints */ - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - highlight = gtk_object_get_data (GTK_OBJECT (item), "highlight"); - - gl_item_get_position_size (item, &x, &y, &dx, &dy); - - points = gnome_canvas_points_new (2); - - if (highlight == NULL) { - - highlight = - gnome_canvas_item_new (gnome_canvas_root - (GNOME_CANVAS (item->canvas)), - gnome_canvas_group_get_type (), "x", - x, "y", y, NULL); - - points->coords[0] = 0.0; - points->coords[1] = 0.0; - points->coords[2] = dx; - points->coords[3] = dy; - outline = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_line_get_type (), - "points", points, - "width_pixels", 3, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), NULL); - - p1 = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", -1.0, - "y1", -1.0, - "x2", +1.0, - "y2", +1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - p2 = gnome_canvas_item_new (GNOME_CANVAS_GROUP (highlight), - gnome_canvas_rect_get_type (), - "x1", dx - 1.0, - "y1", dy - 1.0, - "x2", dx + 1.0, - "y2", dy + 1.0, - "fill_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (255, 255, 255, - 255), NULL); - - gtk_object_set_data (GTK_OBJECT (item), "highlight", highlight); - - gtk_object_set_data (GTK_OBJECT (highlight), "outline", - outline); - - gtk_object_set_data (GTK_OBJECT (highlight), "p1", p1); - gtk_object_set_data (GTK_OBJECT (highlight), "p2", p2); - - gtk_signal_connect (GTK_OBJECT (outline), "event", - GTK_SIGNAL_FUNC (passthrough_event_handler), - item); - - gtk_signal_connect (GTK_OBJECT (p1), "event", - GTK_SIGNAL_FUNC (p1_resize_event_handler), - item); - gtk_signal_connect (GTK_OBJECT (p2), "event", - GTK_SIGNAL_FUNC (p2_resize_event_handler), - item); - - } else { - - gnome_canvas_item_set (highlight, "x", x, "y", y, NULL); - - outline = - gtk_object_get_data (GTK_OBJECT (highlight), "outline"); - - p1 = gtk_object_get_data (GTK_OBJECT (highlight), "p1"); - p2 = gtk_object_get_data (GTK_OBJECT (highlight), "p2"); - - points->coords[0] = 0.0; - points->coords[1] = 0.0; - points->coords[2] = dx; - points->coords[3] = dy; - gnome_canvas_item_set (outline, "points", points, NULL); - - gnome_canvas_item_set (p1, - "x1", -1.0, - "y1", -1.0, - "x2", +1.0, "y2", +1.0, NULL); - - gnome_canvas_item_set (p2, - "x1", dx - 1.0, - "y1", dy - 1.0, - "x2", dx + 1.0, "y2", dy + 1.0, NULL); - - gnome_canvas_item_show (highlight); - - } - - gnome_canvas_points_free (points); - - gnome_canvas_item_raise_to_top (highlight); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create/Update & Display a simple box highlight. */ -/*---------------------------------------------------------------------------*/ -static void -highlight_simple (GnomeCanvasItem * item) -{ - GnomeCanvasItem *highlight; - gdouble x1, y1, x2, y2; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - highlight = gtk_object_get_data (GTK_OBJECT (item), "highlight"); - - gl_item_get_bounds (item, &x1, &y1, &x2, &y2); - - if (highlight == NULL) { - - highlight = - gnome_canvas_item_new (gnome_canvas_root - (GNOME_CANVAS (item->canvas)), - gnome_canvas_rect_get_type (), "x1", - x1 - 0.5, "y1", y1 - 0.5, "x2", - x2 + 0.5, "y2", y2 + 0.5, - "width_pixels", 2, - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, - 255), NULL); - - gtk_object_set_data (GTK_OBJECT (item), "highlight", highlight); - - gtk_signal_connect (GTK_OBJECT (highlight), "event", - GTK_SIGNAL_FUNC (passthrough_event_handler), - item); - - } else { - - gnome_canvas_item_set (highlight, - "x1", x1 - 0.5, - "y1", y1 - 0.5, - "x2", x2 + 0.5, - "y2", y2 + 0.5, - "width_pixels", 2, - "outline_color_rgba", - GNOME_CANVAS_COLOR_A (0, 0, 255, 255), - NULL); - - gnome_canvas_item_show (highlight); - - } - - gnome_canvas_item_raise_to_top (highlight); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Top-left" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -tl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x2, y2; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to bottom-right corner */ - x2 = x + w; - y2 = y + h; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Top-right" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -tr_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x1, y2; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to bottom-left corner */ - x1 = x; - y2 = y + h; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = x1; - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = x1; - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Bottom-left" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -bl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x2, y1; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to top-right corner */ - x2 = x + w; - y1 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - y = y1; - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - y = y1; - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Bottom-right" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -br_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x1, y1; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to top-left corner */ - x1 = x; - y1 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = x1; - y = y1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = x1; - y = y1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Left-side" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -sl_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x2; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to right side */ - x2 = x + w; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = MIN (event->button.x, x2 - MIN_ITEM_SIZE); - w = MAX (x2 - event->button.x, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Right-side" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -sr_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble x1; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to left side */ - x1 = x; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = x1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = x1; - w = MAX (event->button.x - x1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Top-side" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -st_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble y2; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to bottom-right corner */ - y2 = y + h; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - y = MIN (event->button.y, y2 - MIN_ITEM_SIZE); - h = MAX (y2 - event->button.y, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Bottom-side" Resize event handler. */ -/*---------------------------------------------------------------------------*/ -static int -sb_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, w, h; - static gdouble y1; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &w, &h); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to top side */ - y1 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - y = y1; - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - y = y1; - h = MAX (event->button.y - y1, MIN_ITEM_SIZE); - gl_item_set_position_size (item, x, y, w, h); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Resize "P1" event handler. */ -/*---------------------------------------------------------------------------*/ -static int -p1_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, dx, dy; - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &dx, &dy); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to P2 */ - x0 = x + dx; - y0 = y + dy; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = x0; - y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); - gl_item_set_position_size (item, x, y, dx, dy); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = x0; - y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); - gl_item_set_position_size (item, x, y, dx, dy); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Resize "P2" event handler. */ -/*---------------------------------------------------------------------------*/ -static int -p2_resize_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - gdouble x, y, dx, dy; - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glDisplay *display; - GdkCursor *cursor; - - item = GNOME_CANVAS_ITEM (data); - gl_item_get_position_size (item, &x, &y, &dx, &dy); - display = gl_item_get_display (item); - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gnome_canvas_item_grab (handle_item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, event->button.time); - /* Anchor to P1 */ - x0 = x; - y0 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gnome_canvas_item_ungrab (handle_item, - event->button.time); - x = x0; - y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); - gl_item_set_position_size (item, x, y, dx, dy); - gl_display_select_item (display, item); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - x = x0; - y = y0; - dx = (event->button.x - x0); - dy = (event->button.y - y0); - gl_item_set_position_size (item, x, y, dx, dy); - gl_display_select_item (display, item); - return TRUE; - } else { - return FALSE; - } - - case GDK_ENTER_NOTIFY: - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - case GDK_LEAVE_NOTIFY: - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (display->canvas->window, cursor); - gdk_cursor_destroy (cursor); - return TRUE; - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Passthrough event handler. */ -/*---------------------------------------------------------------------------*/ -static int -passthrough_event_handler (GnomeCanvasItem * handle_item, - GdkEvent * event, - gpointer data) -{ - static GnomeCanvasItem *item; - static glDisplay *display; - - item = GNOME_CANVAS_ITEM (data); - display = gl_item_get_display (item); - return gl_display_item_event_handler (item, event, display); - -} diff --git a/glabels1/src/highlight.h b/glabels1/src/highlight.h deleted file mode 100644 index a0aaa0e..0000000 --- a/glabels1/src/highlight.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * highlight.h: GLabels Resizable Highlight module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __HIGHLIGHT_H__ -#define __HIGHLIGHT_H__ - -#include <gnome.h> - -typedef enum { - GL_HIGHLIGHT_BOX_RESIZABLE, - GL_HIGHLIGHT_ELLIPSE_RESIZABLE, - GL_HIGHLIGHT_LINE_RESIZABLE, - GL_HIGHLIGHT_SIMPLE, -} glHighlightStyle; - -extern void gl_highlight (GnomeCanvasItem * item, glHighlightStyle style); - -#endif diff --git a/glabels1/src/item.c b/glabels1/src/item.c deleted file mode 100644 index e72a354..0000000 --- a/glabels1/src/item.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item.c: GLabels canvas item wrapper module module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "item.h" - -#include "display.h" -#include "item_text.h" -#include "item_box.h" -#include "item_line.h" -#include "item_ellipse.h" -#include "item_image.h" -#include "item_barcode.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -/*****************************************************************************/ -/* Create new canvas item from object. */ -/*****************************************************************************/ -GnomeCanvasItem * -gl_item_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasItem *item; - - g_return_val_if_fail (object != NULL, NULL); - g_return_val_if_fail (GL_IS_DISPLAY (display), NULL); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - item = gl_item_text_new (object, display); - break; - case GL_LABEL_OBJECT_BOX: - item = gl_item_box_new (object, display); - break; - case GL_LABEL_OBJECT_LINE: - item = gl_item_line_new (object, display); - break; - case GL_LABEL_OBJECT_ELLIPSE: - item = gl_item_ellipse_new (object, display); - break; - case GL_LABEL_OBJECT_IMAGE: - item = gl_item_image_new (object, display); - break; - case GL_LABEL_OBJECT_BARCODE: - item = gl_item_barcode_new (object, display); - break; - default: - item = NULL; - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - - return item; -} - -/*****************************************************************************/ -/* Free a canvas item and all our associated data. */ -/*****************************************************************************/ -void -gl_item_free (GnomeCanvasItem ** item) -{ - glLabelObject *object; - GtkWidget *menu; - GnomeCanvasItem *highlight; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (*item)); - - menu = gtk_object_get_data (GTK_OBJECT (*item), "object_menu"); - object = gtk_object_get_data (GTK_OBJECT (*item), "label_object"); - highlight = gtk_object_get_data (GTK_OBJECT (*item), "highlight"); - - gtk_menu_popdown (GTK_MENU (menu)); - gtk_widget_unref (GTK_WIDGET (menu)); - - gl_label_object_free (&object); - - if (highlight != NULL) { - gtk_object_destroy (GTK_OBJECT (highlight)); - } - - gtk_object_destroy (GTK_OBJECT (*item)); - *item = NULL; -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - gl_item_text_get_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_BOX: - gl_item_box_get_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_LINE: - gl_item_line_get_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_item_ellipse_get_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_item_image_get_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_item_barcode_get_position_size (item, x, y, w, h); - break; - default: - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - gl_item_text_set_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_BOX: - gl_item_box_set_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_LINE: - gl_item_line_set_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_item_ellipse_set_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_item_image_set_position_size (item, x, y, w, h); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_item_barcode_set_position_size (item, x, y, w, h); - break; - default: - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - -} - -/*****************************************************************************/ -/* Get object associated with canvas item. */ -/*****************************************************************************/ -glLabelObject * -gl_item_get_object (GnomeCanvasItem * item) -{ - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), NULL); - - return gtk_object_get_data (GTK_OBJECT (item), "label_object"); -} - -/*****************************************************************************/ -/* Get display associated with canvas item. */ -/*****************************************************************************/ -glDisplay * -gl_item_get_display (GnomeCanvasItem * item) -{ - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), NULL); - - return gtk_object_get_data (GTK_OBJECT (item), "display"); -} - -/*****************************************************************************/ -/* Get menu associated with canvas item. */ -/*****************************************************************************/ -GtkWidget * -gl_item_get_menu (GnomeCanvasItem * item) -{ - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), NULL); - - return gtk_object_get_data (GTK_OBJECT (item), "object_menu"); -} - -/*****************************************************************************/ -/* Turn on item highlight. */ -/*****************************************************************************/ -void -gl_item_highlight (GnomeCanvasItem * item) -{ - glLabelObject *object; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - gl_item_text_highlight (item); - break; - case GL_LABEL_OBJECT_BOX: - gl_item_box_highlight (item); - break; - case GL_LABEL_OBJECT_LINE: - gl_item_line_highlight (item); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_item_ellipse_highlight (item); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_item_image_highlight (item); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_item_barcode_highlight (item); - break; - default: - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - -} - -/*****************************************************************************/ -/* Turn off item highlight. */ -/*****************************************************************************/ -void -gl_item_unhighlight (GnomeCanvasItem * item) -{ - GnomeCanvasItem *sel_box; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - if (item != NULL) { - - sel_box = gtk_object_get_data (GTK_OBJECT (item), "highlight"); - gnome_canvas_item_hide (sel_box); - - } -} - -/*****************************************************************************/ -/* Get item bounds using appropriate custom function. */ -/*****************************************************************************/ -void -gl_item_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - glLabelObject *object; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - gl_item_text_get_bounds (item, x1, y1, x2, y2); - break; - case GL_LABEL_OBJECT_BOX: - gl_item_box_get_bounds (item, x1, y1, x2, y2); - break; - case GL_LABEL_OBJECT_LINE: - gl_item_line_get_bounds (item, x1, y1, x2, y2); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_item_ellipse_get_bounds (item, x1, y1, x2, y2); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_item_image_get_bounds (item, x1, y1, x2, y2); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_item_barcode_get_bounds (item, x1, y1, x2, y2); - break; - default: - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - -} - -/*****************************************************************************/ -/* launch apropriate edit dialog for item/object */ -/*****************************************************************************/ -void -gl_item_edit_dialog (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - gl_item_text_edit_dialog (item); - break; - case GL_LABEL_OBJECT_BOX: - gl_item_box_edit_dialog (item); - break; - case GL_LABEL_OBJECT_LINE: - gl_item_line_edit_dialog (item); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_item_ellipse_edit_dialog (item); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_item_image_edit_dialog (item); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_item_barcode_edit_dialog (item); - break; - default: - WARN ("Invalid label object type."); /* Should not happen! */ - break; - } - - /* Update highlight of item */ - gl_item_highlight (item); -} - -/*****************************************************************************/ -/* Return apropos item create mode cursor for given object type. */ -/*****************************************************************************/ -GdkCursor * -gl_item_get_create_cursor (glLabelObjectType type) -{ - switch (type) { - - case GL_LABEL_OBJECT_TEXT: - return gl_item_text_get_create_cursor (); - - case GL_LABEL_OBJECT_BOX: - return gl_item_box_get_create_cursor (); - - case GL_LABEL_OBJECT_LINE: - return gl_item_line_get_create_cursor (); - - case GL_LABEL_OBJECT_ELLIPSE: - return gl_item_ellipse_get_create_cursor (); - - case GL_LABEL_OBJECT_IMAGE: - return gl_item_image_get_create_cursor (); - - case GL_LABEL_OBJECT_BARCODE: - return gl_item_barcode_get_create_cursor (); - - default: - WARN ("Invalid label object type."); /* Should not happen! */ - return NULL; - - } - -} - -/*****************************************************************************/ -/* Item/object creation canvas event handler. */ -/*****************************************************************************/ -gint -gl_item_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - glDisplay * display) -{ - switch (display->create_type) { - - case GL_LABEL_OBJECT_TEXT: - return gl_item_text_create_event_handler (canvas, event, - display); - - case GL_LABEL_OBJECT_BOX: - return gl_item_box_create_event_handler (canvas, event, - display); - - case GL_LABEL_OBJECT_LINE: - return gl_item_line_create_event_handler (canvas, event, - display); - - case GL_LABEL_OBJECT_ELLIPSE: - return gl_item_ellipse_create_event_handler (canvas, event, - display); - - case GL_LABEL_OBJECT_IMAGE: - return gl_item_image_create_event_handler (canvas, event, - display); - - case GL_LABEL_OBJECT_BARCODE: - return gl_item_barcode_create_event_handler (canvas, event, - display); - - default: - WARN ("Invalid label object type."); /* Should not happen! */ - return FALSE; - - } - -} diff --git a/glabels1/src/item.h b/glabels1/src/item.h deleted file mode 100644 index 23b25f9..0000000 --- a/glabels1/src/item.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item.h: GLabels canvas item wrapper module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_H__ -#define __ITEM_H__ - -#include <gnome.h> - -#include "label.h" -#include "display.h" - -extern GnomeCanvasItem *gl_item_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_free (GnomeCanvasItem ** item); - -extern void gl_item_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern glLabelObject *gl_item_get_object (GnomeCanvasItem * item); - -extern glDisplay *gl_item_get_display (GnomeCanvasItem * item); - -extern GtkWidget *gl_item_get_menu (GnomeCanvasItem * item); - -extern void gl_item_highlight (GnomeCanvasItem * item); - -extern void gl_item_unhighlight (GnomeCanvasItem * item); - -extern void gl_item_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_get_create_cursor (glLabelObjectType type); - -extern gint gl_item_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - glDisplay * display); - -#endif diff --git a/glabels1/src/item_barcode.c b/glabels1/src/item_barcode.c deleted file mode 100644 index e129f33..0000000 --- a/glabels1/src/item_barcode.c +++ /dev/null @@ -1,656 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_barcode.c: GLabels Barcode Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> - -#include "display.h" -#include "item_barcode.h" -#include "bc.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_bc_data.h" -#include "prop_bc.h" -#include "prop_bc_style.h" -#include "prop_position.h" - -#include "pixmaps/cursor_barcode.xbm" -#include "pixmaps/cursor_barcode_mask.xbm" - -#ifdef HACKTEXT -#include "gnome-canvas-hacktext.h" -#include <libgnomeprint/gnome-glyphlist.h> -#endif - -#include "debug.h" - -#define Y_FONT_ADJUST (-1.0) /* Adjust font vertical position */ - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - - /* Page 0 widgets */ - GtkWidget *data_entry; - - /* Page 1 widgets */ - GtkWidget *bcprop; - GtkWidget *style; - - /* Page 2 widgets */ - GtkWidget *position; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_barcode_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, gint page, - PropertyDialogPassback * data); - -static void draw_barcode (GnomeCanvasItem * item, - glBarcodeStyle style, - guint color, - gboolean text_flag, - gdouble scale, - gchar * digits, - gdouble canvas_scale); - -/*****************************************************************************/ -/* Create a barcode object */ -/*****************************************************************************/ -GnomeCanvasItem * -gl_item_barcode_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; - gchar *text; - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_group_get_type (), - "x", object->x, "y", object->y, NULL); - - if (object->arg.barcode.text_node->field_flag) { - text = gl_barcode_default_digits (object->arg.barcode.style); - } else { - text = - gl_text_node_expand (object->arg.barcode.text_node, NULL); - } - draw_barcode (item, - object->arg.barcode.style, - object->arg.barcode.color, - object->arg.barcode.text_flag, - object->arg.barcode.scale, text, display->scale); - g_free (text); - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - return item; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Update a barcode object */ -/*---------------------------------------------------------------------------*/ -static void -item_barcode_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - GList *item_list, *li; - gdouble affine[6]; - gchar *text; - - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - item_list = gtk_object_get_data (GTK_OBJECT (item), "item_list"); - for (li = item_list; li != NULL; li = li->next) { - gtk_object_destroy (GTK_OBJECT (li->data)); - } - g_list_free (item_list); - gtk_object_set_data (GTK_OBJECT (item), "item_list", NULL); - - if (object->arg.barcode.text_node->field_flag) { - text = gl_barcode_default_digits (object->arg.barcode.style); - } else { - text = - gl_text_node_expand (object->arg.barcode.text_node, NULL); - } - draw_barcode (item, - object->arg.barcode.style, - object->arg.barcode.color, - object->arg.barcode.text_flag, - object->arg.barcode.scale, text, display->scale); - g_free (text); - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, "x", object->x, "y", object->y, NULL); - - gl_display_set_modified (display); -} - -/*****************************************************************************/ -/* Highlight given canvas item. */ -/*****************************************************************************/ -void -gl_item_barcode_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_SIMPLE); -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_barcode_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - glBarcode *gbc; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - - gbc = gtk_object_get_data (GTK_OBJECT (item), "bc"); - *w = gbc->width; - *h = gbc->height; - -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_barcode_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - /* Currently ignore w, h */ - - item_barcode_update (item); -} - -/*****************************************************************************/ -/* Get barcode item bounds. */ -/*****************************************************************************/ -void -gl_item_barcode_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - glBarcode *gbc; - glLabelObject *object; - - gbc = gtk_object_get_data (GTK_OBJECT (item), "bc"); - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - if (gbc == NULL) { - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); - } else { - *x1 = object->x; - *y1 = object->y; - *x2 = *x1 + gbc->width; - *y2 = *y1 + gbc->height; - } -} - -/*****************************************************************************/ -/* Create and run an edit dialog on a barcode object. */ -/*****************************************************************************/ -void -gl_item_barcode_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit barcode object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - - /*---------------------------*/ - /* Data Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), - wvbox, gtk_label_new (_("Data"))); - - data->data_entry = gl_prop_bc_data_new (_("Barcode data"), - object->parent->merge_fields); - gl_prop_bc_data_set_data (GL_PROP_BC_DATA (data->data_entry), - (object->parent->merge_type != GL_MERGE_NONE), - object->arg.barcode.text_node->field_flag, - object->arg.barcode.text_node->data, - object->arg.barcode.text_node->data); - gtk_box_pack_start (GTK_BOX (wvbox), data->data_entry, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->data_entry), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*---------------------------*/ - /* Appearance Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), - wvbox, gtk_label_new (_("Appearance"))); - - /* ------ Begin Barcode Properties Frame ------ */ - data->bcprop = gl_prop_bc_new (_("General")); - gl_prop_bc_set_params (GL_PROP_BC (data->bcprop), - object->arg.barcode.scale, - object->arg.barcode.color); - gtk_box_pack_start (GTK_BOX (wvbox), data->bcprop, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->bcprop), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Barcode Style Frame ------ */ - data->style = gl_prop_bc_style_new (_("Style")); - gl_prop_bc_style_set_params (GL_PROP_BC_STYLE (data->style), - object->arg.barcode.style, - object->arg.barcode.text_flag); - gtk_box_pack_start (GTK_BOX (wvbox), data->style, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->style), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*----------------------------*/ - /* Position Notebook Tab */ - /*----------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), - wvbox, gtk_label_new (_("Position"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - gboolean flag; - gchar *tmp1, *tmp2; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------- Get updated digit data ------ */ - gl_prop_bc_data_get_data (GL_PROP_BC_DATA (data->data_entry), - &flag, &tmp1, &tmp2); - object->arg.barcode.text_node->field_flag = flag; - if (!flag) { - object->arg.barcode.text_node->data = tmp1; - g_free (tmp2); - } else { - object->arg.barcode.text_node->data = tmp2; - g_free (tmp1); - } - break; - - case 1: - /* ------- Get updated scale/color ------ */ - gl_prop_bc_get_params (GL_PROP_BC (data->bcprop), - &object->arg.barcode.scale, - &object->arg.barcode.color); - /* ------ Get updated style ------ */ - gl_prop_bc_style_get_params (GL_PROP_BC_STYLE (data->style), - &object->arg.barcode.style, - &object->arg.barcode.text_flag); - break; - - case 2: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_barcode_update (data->item); - gl_display_select_item (display, data->item); - -} - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_item_barcode_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_barcode_bits, - cursor_barcode_width, - cursor_barcode_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_barcode_mask_bits, - cursor_barcode_mask_width, - cursor_barcode_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_barcode_x_hot, - cursor_barcode_y_hot); - } - - return cursor; -} - -/*****************************************************************************/ -/* Canvas event handler (barcode mode) */ -/*****************************************************************************/ -int -gl_item_barcode_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - glLabelObject *object; - GnomeCanvasItem *item; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_BARCODE); - object->x = x; - object->y = y; - object->arg.barcode.text_node = - gl_text_node_new_from_text ("123456789"); - object->arg.barcode.style = GL_BARCODE_STYLE_POSTNET; - object->arg.barcode.color = - GNOME_CANVAS_COLOR_A (0, 0, 0, 255); - object->arg.barcode.text_flag = TRUE; - object->arg.barcode.scale = 1.0; - item = gl_item_barcode_new (object, display); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - default: - return FALSE; - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw barcode to canvas item (group). */ -/*---------------------------------------------------------------------------*/ -static void -draw_barcode (GnomeCanvasItem * group, - glBarcodeStyle style, - guint color, - gboolean text_flag, - gdouble scale, - gchar * digits, - gdouble canvas_scale) -{ - glBarcodeLine *line; - glBarcodeChar *bchar; - glBarcode *gbc; - GList *li; - GnomeCanvasItem *item; - GList *item_list = NULL; - GnomeCanvasPoints *points; - gchar *cstring; -#ifdef HACKTEXT - GnomeFont *font; - GnomeGlyphList *glyphlist; - gdouble y_offset; -#else - GdkFont *gdk_font; - GnomeDisplayFont *display_font; -#endif - - gbc = gtk_object_get_data (GTK_OBJECT (group), "bc"); - gl_barcode_free (&gbc); - gbc = gl_barcode (style, text_flag, scale, digits); - if (gbc == NULL) { -#ifdef HACKTEXT - font = gnome_font_new_closest (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, 10.0); - cstring = _("Invalid barcode"); - glyphlist = gnome_glyphlist_from_text_sized_dumb (font, - color, - 0.0, 0.0, - cstring, - strlen - (cstring)); - y_offset = 10.0 - gnome_font_get_descender (font); - item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_hacktext_get_type (), - "x", 0.0, - "y", y_offset, - "glyphlist", glyphlist, NULL); -#else - display_font = gnome_get_display_font (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, - 10.0, canvas_scale); - gdk_font = gnome_display_font_get_gdk_font (display_font); - item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_text_get_type (), - "x", 0.0, - "y", 0.0, - "text", _("Invalid barcode"), - "font_gdk", gdk_font, - "anchor", GTK_ANCHOR_NW, - "fill_color_rgba", color, NULL); -#endif - item_list = g_list_prepend (item_list, item); - } else { - - points = gnome_canvas_points_new (2); - for (li = gbc->lines; li != NULL; li = li->next) { - line = (glBarcodeLine *) li->data; - - points->coords[0] = line->x; - points->coords[1] = line->y; - points->coords[2] = line->x; - points->coords[3] = line->y + line->length; - - item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_line_get_type - (), "points", points, - "width_units", line->width, - "fill_color_rgba", color, - NULL); - item_list = g_list_prepend (item_list, item); - } - gnome_canvas_points_free (points); - - for (li = gbc->chars; li != NULL; li = li->next) { - bchar = (glBarcodeChar *) li->data; - -#ifdef HACKTEXT - font = gnome_font_new_closest (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, bchar->fsize); - glyphlist = gnome_glyphlist_from_text_sized_dumb (font, - color, - 0.0, - 0.0, - & - (bchar-> - c), - 1); - y_offset = - bchar->fsize - gnome_font_get_descender (font); - item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_hacktext_get_type - (), "x", bchar->x, "y", - bchar->y + y_offset, - "glyphlist", glyphlist, - NULL); -#else - display_font = - gnome_get_display_font (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, bchar->fsize, - canvas_scale); - gdk_font = - gnome_display_font_get_gdk_font (display_font); - cstring = g_strdup_printf ("%c", bchar->c); - item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_text_get_type - (), "x", bchar->x, "y", - bchar->y + Y_FONT_ADJUST, - "text", cstring, "font_gdk", - gdk_font, "anchor", - GTK_ANCHOR_NW, - "fill_color_rgba", color, - NULL); - g_free (cstring); -#endif - item_list = g_list_prepend (item_list, item); - - } - - } - - /* attach item list to group, so we can get at these again */ - gtk_object_set_data (GTK_OBJECT (group), "item_list", item_list); - - gtk_object_set_data (GTK_OBJECT (group), "bc", gbc); - -} diff --git a/glabels1/src/item_barcode.h b/glabels1/src/item_barcode.h deleted file mode 100644 index d18d6ba..0000000 --- a/glabels1/src/item_barcode.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_barcode.h: GLabels Barcode Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_BARCODE_H__ -#define __ITEM_BARCODE_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_barcode_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_barcode_highlight (GnomeCanvasItem * item); - -extern void gl_item_barcode_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_barcode_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_barcode_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_barcode_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_barcode_get_create_cursor (void); - -extern gint gl_item_barcode_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/item_box.c b/glabels1/src/item_box.c deleted file mode 100644 index 8020094..0000000 --- a/glabels1/src/item_box.c +++ /dev/null @@ -1,489 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_box.c: GLabels Box Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> - -#include "display.h" -#include "item_box.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_line.h" -#include "prop_fill.h" -#include "prop_size.h" -#include "prop_position.h" - -#include "pixmaps/cursor_box.xbm" -#include "pixmaps/cursor_box_mask.xbm" - -#include "debug.h" - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - gboolean keep_aspect_ratio_flag; - - /* Page 0 widgets */ - GtkWidget *line; - GtkWidget *fill; - - /* Page 1 widgets */ - GtkWidget *position; - GtkWidget *size; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_box_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, - gint page, PropertyDialogPassback * data); - -/*****************************************************************************/ -/* Create a box object */ -/*****************************************************************************/ -GnomeCanvasItem * -gl_item_box_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_rect_get_type (), - "x1", object->x, - "y1", object->y, - "x2", object->x + object->arg.box.w, - "y2", object->y + object->arg.box.h, - "width_units", object->arg.box.line_width, - "outline_color_rgba", - object->arg.box.line_color, - "fill_color_rgba", - object->arg.box.fill_color, NULL); - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - return item; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Update a box object */ -/*---------------------------------------------------------------------------*/ -static void -item_box_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - gdouble affine[6]; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, - "x1", object->x, - "y1", object->y, - "x2", object->x + object->arg.box.w, - "y2", object->y + object->arg.box.h, - "width_units", object->arg.box.line_width, - "outline_color_rgba", object->arg.box.line_color, - "fill_color_rgba", object->arg.box.fill_color, - NULL); - - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - gl_display_set_modified (display); -} - -/*****************************************************************************/ -/* Return a selection canvas item/group for given item */ -/*****************************************************************************/ -void -gl_item_box_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_BOX_RESIZABLE); -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_box_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - - *w = object->arg.box.w; - *h = object->arg.box.h; -} - -/*****************************************************************************/ -/* Get position and size of object. */ -/*****************************************************************************/ -void -gl_item_box_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - object->arg.box.w = w; - object->arg.box.h = h; - - item_box_update (item); -} - -/*****************************************************************************/ -/* Get box item bounds. */ -/*****************************************************************************/ -void -gl_item_box_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); -} - -/*****************************************************************************/ -/* Create and run an edit dialog on a box object. */ -/*****************************************************************************/ -void -gl_item_box_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit box object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - - /*---------------------------*/ - /* Appearance Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Appearance"))); - - /* ------ Line box ------ */ - data->line = gl_prop_line_new (_("Outline")); - gl_prop_line_set_params (GL_PROP_LINE (data->line), - object->arg.box.line_width, - object->arg.box.line_color); - gtk_box_pack_start (GTK_BOX (wvbox), data->line, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->line), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Fill box ------ */ - data->fill = gl_prop_fill_new (_("Fill")); - gl_prop_fill_set_params (GL_PROP_FILL (data->fill), - object->arg.box.fill_color); - gtk_box_pack_start (GTK_BOX (wvbox), data->fill, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->fill), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*----------------------------*/ - /* Position/Size Notebook Tab */ - /*----------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Position/Size"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Size Frame ------ */ - data->size = gl_prop_size_new (_("Size")); - gl_prop_size_set_params (GL_PROP_SIZE (data->size), - object->arg.box.w, object->arg.box.h, - data->keep_aspect_ratio_flag, - display->label->width, display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->size, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->size), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------- Get updated line width & color ------ */ - gl_prop_line_get_params (GL_PROP_LINE (data->line), - &object->arg.box.line_width, - &object->arg.box.line_color); - /* ------- Get updated fill color ------ */ - gl_prop_fill_get_params (GL_PROP_FILL (data->fill), - &object->arg.box.fill_color); - break; - - case 1: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - - /* ------ get updated size ------ */ - gl_prop_size_get_size (GL_PROP_SIZE (data->size), - &object->arg.box.w, &object->arg.box.h, - &data->keep_aspect_ratio_flag); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_box_update (data->item); - gl_display_select_item (display, data->item); - -} - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_item_box_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_box_bits, - cursor_box_width, - cursor_box_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_box_mask_bits, - cursor_box_mask_width, - cursor_box_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_box_x_hot, - cursor_box_y_hot); - } - - return cursor; -} - -/*****************************************************************************/ -/* Canvas event handler (box mode) */ -/*****************************************************************************/ -int -gl_item_box_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glLabelObject *object; - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (display->canvas)->window, - FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, NULL, event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_BOX); - object->x = x; - object->y = y; - object->arg.box.w = 0.0; - object->arg.box.h = 0.0; - object->arg.box.line_width = 1.0; - object->arg.box.line_color = - GNOME_CANVAS_COLOR_A (0, 0, 255, 128); - object->arg.box.fill_color = - GNOME_CANVAS_COLOR_A (128, 128, 128, 128); - item = gl_item_box_new (object, display); - x0 = x; - y0 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - if ((x0 == x) && (y0 == y)) { - x = x0 + 36.0; - y = y0 + 36.0; - } - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.box.w = MAX (x, x0) - MIN (x, x0); - object->arg.box.h = MAX (y, y0) - MIN (y, y0); - object->arg.box.line_color = - GNOME_CANVAS_COLOR_A (0, 0, 0, 255); - object->arg.box.fill_color = - GNOME_CANVAS_COLOR_A (0, 255, 0, 255); - item_box_update (item); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, &x, &y); - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.box.w = MAX (x, x0) - MIN (x, x0); - object->arg.box.h = MAX (y, y0) - MIN (y, y0); - item_box_update (item); - return TRUE; - } else { - return FALSE; - } - - default: - return FALSE; - } - -} diff --git a/glabels1/src/item_box.h b/glabels1/src/item_box.h deleted file mode 100644 index 789fce8..0000000 --- a/glabels1/src/item_box.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_box.h: GLabels Box Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_BOX_H__ -#define __ITEM_BOX_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_box_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_box_highlight (GnomeCanvasItem * item); - -extern void gl_item_box_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_box_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_box_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_box_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_box_get_create_cursor (void); - -extern gint gl_item_box_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/item_ellipse.c b/glabels1/src/item_ellipse.c deleted file mode 100644 index 5a45b48..0000000 --- a/glabels1/src/item_ellipse.c +++ /dev/null @@ -1,493 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_ellipse.c: gLabels Ellipse Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> - -#include "display.h" -#include "item_ellipse.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_line.h" -#include "prop_fill.h" -#include "prop_size.h" -#include "prop_position.h" - -#include "pixmaps/cursor_ellipse.xbm" -#include "pixmaps/cursor_ellipse_mask.xbm" - -#include "debug.h" - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - gboolean keep_aspect_ratio_flag; - - /* Page 0 widgets */ - GtkWidget *line; - GtkWidget *fill; - - /* Page 1 widgets */ - GtkWidget *position; - GtkWidget *size; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_ellipse_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, - gint page, PropertyDialogPassback * data); - -/****************************************************************************/ -/* Create an ellipse object */ -/****************************************************************************/ -GnomeCanvasItem * -gl_item_ellipse_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_ellipse_get_type (), - "x1", object->x, - "y1", object->y, - "x2", object->x + object->arg.ellipse.w, - "y2", object->y + object->arg.ellipse.h, - "width_units", - object->arg.ellipse.line_width, - "outline_color_rgba", - object->arg.ellipse.line_color, - "fill_color_rgba", - object->arg.ellipse.fill_color, NULL); - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - return item; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update a ellipse object */ -/*--------------------------------------------------------------------------*/ -static void -item_ellipse_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - gdouble affine[6]; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, - "x1", object->x, - "y1", object->y, - "x2", object->x + object->arg.ellipse.w, - "y2", object->y + object->arg.ellipse.h, - "width_units", object->arg.ellipse.line_width, - "outline_color_rgba", - object->arg.ellipse.line_color, - "fill_color_rgba", - object->arg.ellipse.fill_color, NULL); - - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - gl_display_set_modified (display); -} - -/****************************************************************************/ -/* Return a selection canvas item/group for given item */ -/****************************************************************************/ -void -gl_item_ellipse_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_ELLIPSE_RESIZABLE); -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_ellipse_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - - *w = object->arg.ellipse.w; - *h = object->arg.ellipse.h; -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_ellipse_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - object->arg.ellipse.w = w; - object->arg.ellipse.h = h; - - item_ellipse_update (item); -} - -/****************************************************************************/ -/* Get ellipse item bounds. */ -/****************************************************************************/ -void -gl_item_ellipse_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); -} - -/****************************************************************************/ -/* Create and run an edit dialog on an ellipse object. */ -/****************************************************************************/ -void -gl_item_ellipse_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit ellipse object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - - /*---------------------------*/ - /* Appearance Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Appearance"))); - - /* ------ Line box ------ */ - data->line = gl_prop_line_new (_("Outline")); - gl_prop_line_set_params (GL_PROP_LINE (data->line), - object->arg.ellipse.line_width, - object->arg.ellipse.line_color); - gtk_box_pack_start (GTK_BOX (wvbox), data->line, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->line), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Fill box ------ */ - data->fill = gl_prop_fill_new (_("Fill")); - gl_prop_fill_set_params (GL_PROP_FILL (data->fill), - object->arg.ellipse.fill_color); - gtk_box_pack_start (GTK_BOX (wvbox), data->fill, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->fill), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*----------------------------*/ - /* Position/Size Notebook Tab */ - /*----------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Position/Size"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Size Frame ------ */ - data->size = gl_prop_size_new (_("Size")); - gl_prop_size_set_params (GL_PROP_SIZE (data->size), - object->arg.ellipse.w, object->arg.ellipse.h, - data->keep_aspect_ratio_flag, - display->label->width, display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->size, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->size), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------- Get updated line width & color ------ */ - gl_prop_line_get_params (GL_PROP_LINE (data->line), - &object->arg.ellipse.line_width, - &object->arg.ellipse.line_color); - /* ------- Get updated fill color ------ */ - gl_prop_fill_get_params (GL_PROP_FILL (data->fill), - &object->arg.ellipse.fill_color); - break; - - case 1: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - - /* ------ get updated size ------ */ - gl_prop_size_get_size (GL_PROP_SIZE (data->size), - &object->arg.ellipse.w, - &object->arg.ellipse.h, - &data->keep_aspect_ratio_flag); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_ellipse_update (data->item); - gl_display_select_item (display, data->item); - -} - -/****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/****************************************************************************/ -GdkCursor * -gl_item_ellipse_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_ellipse_bits, - cursor_ellipse_width, - cursor_ellipse_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_ellipse_mask_bits, - cursor_ellipse_mask_width, - cursor_ellipse_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_ellipse_x_hot, - cursor_ellipse_y_hot); - } - - return cursor; -} - -/****************************************************************************/ -/* Canvas event handler (ellipse mode) */ -/****************************************************************************/ -int -gl_item_ellipse_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glLabelObject *object; - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (display->canvas)->window, - FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, NULL, event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_ELLIPSE); - object->x = x; - object->y = y; - object->arg.ellipse.w = 0.0; - object->arg.ellipse.h = 0.0; - object->arg.ellipse.line_width = 1.0; - object->arg.ellipse.line_color = - GNOME_CANVAS_COLOR_A (0, 0, 255, 128); - object->arg.ellipse.fill_color = - GNOME_CANVAS_COLOR_A (128, 128, 128, 128); - item = gl_item_ellipse_new (object, display); - x0 = x; - y0 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - if ((x0 == x) || (y0 == y)) { - x = x0 + 36.0; - y = y0 + 36.0; - } - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.ellipse.w = MAX (x, x0) - MIN (x, x0); - object->arg.ellipse.h = MAX (y, y0) - MIN (y, y0); - object->arg.ellipse.line_color = - GNOME_CANVAS_COLOR_A (0, 0, 0, 255); - object->arg.ellipse.fill_color = - GNOME_CANVAS_COLOR_A (0, 255, 0, 255); - item_ellipse_update (item); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, &x, &y); - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.ellipse.w = MAX (x, x0) - MIN (x, x0); - object->arg.ellipse.h = MAX (y, y0) - MIN (y, y0); - item_ellipse_update (item); - return TRUE; - } else { - return FALSE; - } - - default: - return FALSE; - } - -} diff --git a/glabels1/src/item_ellipse.h b/glabels1/src/item_ellipse.h deleted file mode 100644 index c4cf54e..0000000 --- a/glabels1/src/item_ellipse.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_ellipse.h: GLabels Ellipse Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_ELLIPSE_H__ -#define __ITEM_ELLIPSE_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_ellipse_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_ellipse_highlight (GnomeCanvasItem * item); - -extern void gl_item_ellipse_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_ellipse_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_ellipse_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_ellipse_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_ellipse_get_create_cursor (void); - -extern gint gl_item_ellipse_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/item_image.c b/glabels1/src/item_image.c deleted file mode 100644 index 4eee6c6..0000000 --- a/glabels1/src/item_image.c +++ /dev/null @@ -1,612 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_image.c: GLabels Image Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> - -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <gdk-pixbuf/gnome-canvas-pixbuf.h> - -#include "display.h" -#include "item_image.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_position.h" -#include "prop_size.h" - -#include "pixmaps/cursor_image.xbm" -#include "pixmaps/cursor_image_mask.xbm" - -#include "pixmaps/checkerboard.xpm" - -#include "debug.h" - -#define RED(x) ( ((x)>>24) & 0xff ) -#define GREEN(x) ( ((x)>>16) & 0xff ) -#define BLUE(x) ( ((x)>>8) & 0xff ) -#define ALPHA(x) ( (x) & 0xff ) - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - gboolean keep_aspect_ratio_flag; - - /* Page 0 widgets */ - GtkWidget *pixmap_entry; - - /* Page 1 widgets */ - GtkWidget *position; - GtkWidget *size; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/* Save state of image file entry */ -static gchar *image_path = NULL; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_image_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void size_reset_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, - gint page, PropertyDialogPassback * data); - -/****************************************************************************/ -/* Create a image object */ -/****************************************************************************/ -GnomeCanvasItem * -gl_item_image_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; - - if (object->arg.image.image == NULL) { - object->arg.image.image = - gdk_pixbuf_new_from_xpm_data ((const char **) - checkerboard_xpm); - } - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_pixbuf_get_type (), - "x", object->x, - "y", object->y, - "width_set", TRUE, - "height_set", TRUE, - "width", object->arg.image.w, - "height", object->arg.image.h, - "pixbuf", object->arg.image.image, NULL); - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - return item; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update an image object */ -/*--------------------------------------------------------------------------*/ -static void -item_image_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - gdouble affine[6]; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - if (object->arg.image.image == NULL) { - object->arg.image.image = - gdk_pixbuf_new_from_xpm_data ((const char **) - checkerboard_xpm); - } - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, - "x", object->x, - "y", object->y, - "width_set", TRUE, - "height_set", TRUE, - "width", object->arg.image.w, - "height", object->arg.image.h, - "pixbuf", object->arg.image.image, NULL); - - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - gl_display_set_modified (display); -} - -/****************************************************************************/ -/* Return a selection canvas item/group for given item */ -/****************************************************************************/ -void -gl_item_image_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_BOX_RESIZABLE); -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_image_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - - *w = object->arg.image.w; - *h = object->arg.image.h; -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_image_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - object->arg.image.w = w; - object->arg.image.h = h; - - item_image_update (item); -} - -/****************************************************************************/ -/* Get image item bounds. */ -/****************************************************************************/ -void -gl_item_image_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); -} - -/****************************************************************************/ -/* Create and run an edit dialog on a image object. */ -/****************************************************************************/ -void -gl_item_image_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - GtkWidget *wbutton; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - gdouble image_w, image_h; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit image object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - gtk_object_set_data (GTK_OBJECT (dialog), "data", data); - - /*---------------------------*/ - /* Image Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Image"))); - - /* image entry */ - data->pixmap_entry = - gnome_pixmap_entry_new ("image", "Load image", TRUE); - gnome_pixmap_entry_set_preview_size (GNOME_PIXMAP_ENTRY - (data->pixmap_entry), 128, 128); - - /* Set default path for image entry */ - if (object->arg.image.filename != NULL) { - /* Set default path to the directory containing image. */ - if (image_path != NULL) - g_free (image_path); - image_path = g_dirname (object->arg.image.filename); - if (image_path != NULL) { - image_path = g_strconcat (image_path, "/", NULL); - } - } else if (image_path == NULL) { - /* First time, set it to our CWD. */ - image_path = g_get_current_dir (); - } - /* Otherwise, leave it in the last directory that we got an image. */ - gnome_file_entry_set_default_path (GNOME_FILE_ENTRY - (GNOME_PIXMAP_ENTRY - (data->pixmap_entry)->fentry), - image_path); - - if (object->arg.image.filename != NULL) { - gtk_entry_set_text (GTK_ENTRY - (gnome_pixmap_entry_gtk_entry - (GNOME_PIXMAP_ENTRY (data->pixmap_entry))), - object->arg.image.filename); - } - gtk_box_pack_start (GTK_BOX (wvbox), data->pixmap_entry, FALSE, FALSE, - 0); - gtk_signal_connect_object (GTK_OBJECT - (gnome_pixmap_entry_gtk_entry - (GNOME_PIXMAP_ENTRY (data->pixmap_entry))), - "changed", GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*----------------------------*/ - /* Position/Size Notebook Tab */ - /*----------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Position/Size"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Size Frame ------ */ - data->size = gl_prop_size_new (_("Size")); - image_w = gdk_pixbuf_get_width (object->arg.image.image); - image_h = gdk_pixbuf_get_height (object->arg.image.image); - gl_prop_size_set_params (GL_PROP_SIZE (data->size), - object->arg.image.w, object->arg.image.h, - data->keep_aspect_ratio_flag, - display->label->width, display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->size, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->size), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Size Reset Button ------ */ - wbutton = gtk_button_new_with_label (_("Reset image size")); - gtk_box_pack_start (GTK_BOX (wvbox), wbutton, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (wbutton), "clicked", - GTK_SIGNAL_FUNC (size_reset_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback to reset size to original image size. */ -/*---------------------------------------------------------------------------*/ -static void -size_reset_cb (glPropertyBox * propertybox) -{ - PropertyDialogPassback *data = NULL; - glDisplay *display; - gchar *filename, *ext; - GdkPixbuf *image; - gdouble image_w, image_h; - - data = gtk_object_get_data (GTK_OBJECT (propertybox), "data"); - - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - filename = - gnome_pixmap_entry_get_filename (GNOME_PIXMAP_ENTRY - (data->pixmap_entry)); - if (filename != NULL) { - ext = strrchr (filename, '.'); - if (g_strcasecmp (ext, ".tga") != 0) { - image = gdk_pixbuf_new_from_file (filename); - } else { - gnome_error_dialog (_ - ("Image format not currently supported")); - return; - } - } else { - return; - } - image_w = gdk_pixbuf_get_width (image); - image_h = gdk_pixbuf_get_height (image); - gdk_pixbuf_unref (image); - - data->keep_aspect_ratio_flag = TRUE; - - gl_prop_size_set_params (GL_PROP_SIZE (data->size), - image_w, image_h, - data->keep_aspect_ratio_flag, - display->label->width, display->label->height); - - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - gchar *filename, *ext; - gdouble image_w, image_h; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------ Update image ------ */ - filename = - gnome_pixmap_entry_get_filename (GNOME_PIXMAP_ENTRY - (data->pixmap_entry)); - if (filename != NULL) { - ext = strrchr (filename, '.'); - if (g_strcasecmp (ext, ".tga") != 0) { - - g_free (object->arg.image.filename); - object->arg.image.filename = filename; - gdk_pixbuf_unref (object->arg.image.image); - object->arg.image.image = - gdk_pixbuf_new_from_file (object->arg.image. - filename); - - /* save state of image entry. */ - if (image_path != NULL) - g_free (image_path); - image_path = g_dirname (filename); - if (image_path != NULL) { - image_path = - g_strconcat (image_path, "/", NULL); - } - - } else { - gnome_error_dialog (_ - ("Image format not currently supported")); - } - } - break; - - case 1: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - - /* ------ get updated size ------ */ - gl_prop_size_get_size (GL_PROP_SIZE (data->size), - &object->arg.image.w, - &object->arg.image.h, - &data->keep_aspect_ratio_flag); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_image_update (data->item); - gl_display_select_item (display, data->item); - - /* update size controls */ - image_w = gdk_pixbuf_get_width (object->arg.image.image); - image_h = gdk_pixbuf_get_height (object->arg.image.image); - gl_prop_size_set_params (GL_PROP_SIZE (data->size), - object->arg.image.w, object->arg.image.h, - data->keep_aspect_ratio_flag, - display->label->width, display->label->height); -} - -/****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/****************************************************************************/ -GdkCursor * -gl_item_image_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_image_bits, - cursor_image_width, - cursor_image_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_image_mask_bits, - cursor_image_mask_width, - cursor_image_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_image_x_hot, - cursor_image_y_hot); - } - - return cursor; -} - -/****************************************************************************/ -/* Canvas event handler (image mode) */ -/****************************************************************************/ -gint -gl_item_image_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glLabelObject *object; - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (display->canvas)->window, - FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, NULL, event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_IMAGE); - object->x = x; - object->y = y; - object->arg.image.w = 1.0; - object->arg.image.h = 1.0; - object->arg.image.image = NULL; - object->arg.image.filename = NULL; - item = gl_item_image_new (object, display); - x0 = x; - y0 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - if ((x0 == x) || (y0 == y)) { - x = x0 + 24.0; - y = y0 + 24.0; - } - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.image.w = MAX (x, x0) - MIN (x, x0); - object->arg.image.h = MAX (y, y0) - MIN (y, y0); - item_image_update (item); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, &x, &y); - object->x = MIN (x, x0); - object->y = MIN (y, y0); - object->arg.image.w = MAX (x, x0) - MIN (x, x0); - object->arg.image.h = MAX (y, y0) - MIN (y, y0); - item_image_update (item); - return TRUE; - } else { - return FALSE; - } - - default: - return FALSE; - } - -} diff --git a/glabels1/src/item_image.h b/glabels1/src/item_image.h deleted file mode 100644 index 674a9c0..0000000 --- a/glabels1/src/item_image.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_image.h: GLabels Image Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_IMAGE_H__ -#define __ITEM_IMAGE_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_image_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_image_highlight (GnomeCanvasItem * item); - -extern void gl_item_image_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_image_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_image_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_image_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_image_get_create_cursor (void); - -extern gint gl_item_image_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/item_line.c b/glabels1/src/item_line.c deleted file mode 100644 index 9d14abe..0000000 --- a/glabels1/src/item_line.c +++ /dev/null @@ -1,481 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_line.c: GLabels Line Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> -#include <math.h> - -#include "display.h" -#include "item_line.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_line.h" -#include "prop_position.h" -#include "prop_vector.h" - -#include "pixmaps/cursor_line.xbm" -#include "pixmaps/cursor_line_mask.xbm" - -#include "debug.h" - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - - /* Page 0 widgets */ - GtkWidget *line; - - /* Page 1 widgets */ - GtkWidget *position; - GtkWidget *vector; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_line_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, - gint page, PropertyDialogPassback * data); - -/****************************************************************************/ -/* Create a line object */ -/****************************************************************************/ -GnomeCanvasItem * -gl_item_line_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; - GnomeCanvasPoints *points; - - points = gnome_canvas_points_new (2); - points->coords[0] = object->x; - points->coords[1] = object->y; - points->coords[2] = object->x + object->arg.line.dx; - points->coords[3] = object->y + object->arg.line.dy; - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_line_get_type (), - "points", points, - "width_units", - object->arg.line.line_width, - "fill_color_rgba", - object->arg.line.line_color, NULL); - - gnome_canvas_points_free (points); - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - return item; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update a line object */ -/*--------------------------------------------------------------------------*/ -static void -item_line_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - GnomeCanvasPoints *points; - gdouble affine[6]; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - points = gnome_canvas_points_new (2); - points->coords[0] = object->x; - points->coords[1] = object->y; - points->coords[2] = object->x + object->arg.line.dx; - points->coords[3] = object->y + object->arg.line.dy; - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, - "points", points, - "width_units", object->arg.line.line_width, - "fill_color_rgba", object->arg.line.line_color, - NULL); - - gnome_canvas_points_free (points); - - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - gl_display_set_modified (display); -} - -/****************************************************************************/ -/* Create a selection canvas item/group for given item */ -/****************************************************************************/ -void -gl_item_line_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_LINE_RESIZABLE); -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_line_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - - *w = object->arg.line.dx; - *h = object->arg.line.dy; -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_line_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - object->arg.line.dx = w; - object->arg.line.dy = h; - - item_line_update (item); -} - -/****************************************************************************/ -/* Get line item bounds. */ -/****************************************************************************/ -void -gl_item_line_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); -} - -/****************************************************************************/ -/* Create and run an edit dialog on a line object. */ -/****************************************************************************/ -void -gl_item_line_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit line object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - - /*---------------------------*/ - /* Appearance Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Appearance"))); - - /* ------ Begin Line box ------ */ - data->line = gl_prop_line_new (_("Line")); - gl_prop_line_set_params (GL_PROP_LINE (data->line), - object->arg.line.line_width, - object->arg.line.line_color); - gtk_box_pack_start (GTK_BOX (wvbox), data->line, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->line), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*----------------------------*/ - /* Position/Size Notebook Tab */ - /*----------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Position/Size"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /* ------ Size Frame ------ */ - data->vector = gl_prop_vector_new (_("Size")); - gl_prop_vector_set_params (GL_PROP_VECTOR (data->vector), - object->arg.line.dx, object->arg.line.dy, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->vector, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->vector), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------- Get updated line width & color ------ */ - gl_prop_line_get_params (GL_PROP_LINE (data->line), - &object->arg.line.line_width, - &object->arg.line.line_color); - break; - - case 1: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - /* ------ get updated size ------ */ - gl_prop_vector_get_params (GL_PROP_VECTOR (data->vector), - &object->arg.line.dx, - &object->arg.line.dy); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_line_update (data->item); - gl_display_select_item (display, data->item); - -} - -/****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/****************************************************************************/ -GdkCursor * -gl_item_line_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_line_bits, - cursor_line_width, - cursor_line_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_line_mask_bits, - cursor_line_mask_width, - cursor_line_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_line_x_hot, - cursor_line_y_hot); - } - - return cursor; -} - -/****************************************************************************/ -/* Canvas event handler (line mode) */ -/****************************************************************************/ -gint -gl_item_line_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - static gdouble x0, y0; - static gboolean dragging = FALSE; - static GnomeCanvasItem *item; - static glLabelObject *object; - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (display->canvas)->window, - FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, - NULL, NULL, event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_LINE); - object->x = x; - object->y = y; - object->arg.line.dx = 0.0; - object->arg.line.dy = 0.0; - object->arg.line.line_width = 1.0; - object->arg.line.line_color = - GNOME_CANVAS_COLOR_A (0, 0, 255, 128); - item = gl_item_line_new (object, display); - x0 = x; - y0 = y; - return TRUE; - - default: - return FALSE; - } - - case GDK_BUTTON_RELEASE: - switch (event->button.button) { - case 1: - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - if ((x0 == x) && (y0 == y)) { - x = x0 + 36.0; - y = y0 + 36.0; - } - object->x = x0; - object->y = y0; - object->arg.line.dx = (x - x0); - object->arg.line.dy = (y - y0); - object->arg.line.line_color = - GNOME_CANVAS_COLOR (0, 0, 0); - item_line_update (item); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_window_to_world (canvas, - event->motion.x, - event->motion.y, &x, &y); - object->x = x0; - object->y = y0; - object->arg.line.dx = (x - x0); - object->arg.line.dy = (y - y0); - item_line_update (item); - return TRUE; - } else { - return FALSE; - } - - default: - return FALSE; - } - -} diff --git a/glabels1/src/item_line.h b/glabels1/src/item_line.h deleted file mode 100644 index 3bb48fe..0000000 --- a/glabels1/src/item_line.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_line.h: GLabels Line Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_LINE_H__ -#define __ITEM_LINE_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_line_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_line_highlight (GnomeCanvasItem * item); - -extern void gl_item_line_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_line_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_line_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_line_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_line_get_create_cursor (void); - -extern gint gl_item_line_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/item_text.c b/glabels1/src/item_text.c deleted file mode 100644 index 0a0172a..0000000 --- a/glabels1/src/item_text.c +++ /dev/null @@ -1,780 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_text.c: GLabels Text Object (canvas item) module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> - -#include "display.h" -#include "item_text.h" - -#include "highlight.h" - -#include "mdi.h" -#include "propertybox.h" -#include "prop_text_entry.h" -#include "prop_text.h" -#include "prop_position.h" - -#include "pixmaps/cursor_text.xbm" -#include "pixmaps/cursor_text_mask.xbm" - -#ifdef HACKTEXT -#include "gnome-canvas-hacktext.h" -#include <libgnomeprint/gnome-glyphlist.h> -#include "hack.h" -#endif - -#include "debug.h" - -#define DEFAULT_FONT_FAMILY "Helvetica" -#define DEFAULT_FONT_SIZE 14.0 -#define DEFAULT_FONT_WEIGHT GNOME_FONT_BOOK -#define DEFAULT_FONT_ITALIC_FLAG FALSE - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GnomeCanvasItem *item; - - /* Page 0 widgets */ - GtkWidget *text_entry; - - /* Page 1 widgets */ - GtkWidget *text; - - /* Page 2 widgets */ - GtkWidget *position; -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void item_text_update (GnomeCanvasItem * item); - -static void changed_cb (glPropertyBox * propertybox); -static void apply_cb (glPropertyBox * propertybox, - gint page, PropertyDialogPassback * data); - -#ifdef HACKTEXT -static void draw_hacktext (GnomeCanvasItem * group, - gchar * text, - gchar * font_family, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - gdouble font_size, - guint color, - GtkJustification just, - gdouble scale); - -static void hacktext_get_size (gchar * text, - gchar * font_family, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - gdouble font_size, - gdouble * w, - gdouble * h); -#endif - -/****************************************************************************/ -/* Create a text object */ -/****************************************************************************/ -GnomeCanvasItem * -gl_item_text_new (glLabelObject * object, - glDisplay * display) -{ - GnomeCanvasGroup *group; - GnomeCanvasItem *item; -#ifndef HACKTEXT - GdkFont *gdk_font; - GnomeDisplayFont *display_font; - GtkAnchorType anchor; -#endif - gchar *text; - - text = gl_text_node_lines_expand (object->arg.text.lines, NULL); - -#ifdef HACKTEXT - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_group_get_type (), - "x", object->x, "y", object->y, NULL); - draw_hacktext (item, - text, - object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.font_size, - object->arg.text.color, - object->arg.text.just, display->scale); - -#else - - display_font = gnome_get_display_font (object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text. - font_italic_flag, - object->arg.text.font_size, - display->scale); - gdk_font = gnome_display_font_get_gdk_font (display_font); - - switch (object->arg.text.just) { - case GTK_JUSTIFY_LEFT: - anchor = GTK_ANCHOR_NW; - break; - case GTK_JUSTIFY_CENTER: - anchor = GTK_ANCHOR_N; - break; - case GTK_JUSTIFY_RIGHT: - anchor = GTK_ANCHOR_NE; - break; - default: - anchor = GTK_ANCHOR_NW; - break; - } - - group = gnome_canvas_root (GNOME_CANVAS (display->canvas)); - item = gnome_canvas_item_new (group, gnome_canvas_text_get_type (), - "x", object->x, - "y", object->y, - "text", g_strdup (text), - "font_gdk", gdk_font, - "justification", object->arg.text.just, - "anchor", anchor, - "fill_color_rgba", object->arg.text.color, - NULL); - -#endif - - /* Squirrel away pointers to object and display in the canvas item. */ - gtk_object_set_data (GTK_OBJECT (item), "label_object", object); - gtk_object_set_data (GTK_OBJECT (item), "display", display); - gtk_object_set_data (GTK_OBJECT (item), "highlight", NULL); - - gtk_signal_connect (GTK_OBJECT (item), "event", - GTK_SIGNAL_FUNC (gl_display_item_event_handler), - display); - - gl_display_new_item_menu (item); - - gl_display_set_modified (display); - - g_free (text); - return item; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update a text object */ -/*--------------------------------------------------------------------------*/ -static void -item_text_update (GnomeCanvasItem * item) -{ - glLabelObject *object; - glDisplay *display; - gdouble affine[6]; -#ifdef HACKTEXT - GList *item_list, *li; -#else - GdkFont *gdk_font; - GnomeDisplayFont *display_font; - GtkAnchorType anchor; -#endif - gchar *text; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - text = gl_text_node_lines_expand (object->arg.text.lines, NULL); - -#ifdef HACKTEXT - - item_list = gtk_object_get_data (GTK_OBJECT (item), "item_list"); - for (li = item_list; li != NULL; li = li->next) { - gtk_object_destroy (GTK_OBJECT (li->data)); - } - g_list_free (item_list); - gtk_object_set_data (GTK_OBJECT (item), "item_list", NULL); - - draw_hacktext (item, - text, - object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.font_size, - object->arg.text.color, - object->arg.text.just, display->scale); - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, "x", object->x, "y", object->y, NULL); - -#else - - display_font = gnome_get_display_font (object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text. - font_italic_flag, - object->arg.text.font_size, - display->scale); - gdk_font = gnome_display_font_get_gdk_font (display_font); - - switch (object->arg.text.just) { - case GTK_JUSTIFY_LEFT: - anchor = GTK_ANCHOR_NW; - break; - case GTK_JUSTIFY_CENTER: - anchor = GTK_ANCHOR_N; - break; - case GTK_JUSTIFY_RIGHT: - anchor = GTK_ANCHOR_NE; - break; - default: - anchor = GTK_ANCHOR_NW; - break; - } - - art_affine_identity (affine); - gnome_canvas_item_affine_absolute (item, affine); - gnome_canvas_item_set (item, - "x", object->x, - "y", object->y, - "text", g_strdup (text), - "font_gdk", gdk_font, - "justification", object->arg.text.just, - "anchor", anchor, - "fill_color_rgba", object->arg.text.color, NULL); - -#endif - - g_free (text); - - gl_display_set_modified (display); -} - -/****************************************************************************/ -/* Highlight item. */ -/****************************************************************************/ -void -gl_item_text_highlight (GnomeCanvasItem * item) -{ - gl_highlight (item, GL_HIGHLIGHT_SIMPLE); -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_text_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h) -{ - glLabelObject *object; -#ifndef HACKTEXT - GtkArg arg_info; - gdouble x1, y1, x2, y2; -#else - gchar *text; -#endif - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - *x = object->x; - *y = object->y; - -#ifdef HACKTEXT - text = gl_text_node_lines_expand (object->arg.text.lines, NULL); - - hacktext_get_size (text, - object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.font_size, w, h); - - g_free (text); -#else - - gnome_canvas_item_get_bounds (item, &x1, &y1, &x2, &y2); - *h = y2 - y1; - - /* workaround: the above bounding box is too wide, correct the width. */ - arg_info.name = "text_width"; - gtk_object_getv (GTK_OBJECT (item), 1, &arg_info); - *w = GTK_VALUE_DOUBLE (arg_info); - -#endif -} - -/****************************************************************************/ -/* Get position and size of object. */ -/****************************************************************************/ -void -gl_item_text_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h) -{ - glLabelObject *object; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - object->x = x; - object->y = y; - - /* Ignore w,h for now */ - - item_text_update (item); -} - -/****************************************************************************/ -/* Get text item bounds. */ -/****************************************************************************/ -void -gl_item_text_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2) -{ -#ifdef HACKTEXT - - glLabelObject *object; - gdouble w, h, x_offset, y_offset; - gchar *text; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - - text = gl_text_node_lines_expand (object->arg.text.lines, NULL); - - hacktext_get_size (text, - object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.font_size, &w, &h); - - g_free (text); - - switch (object->arg.text.just) { - case GTK_JUSTIFY_LEFT: - x_offset = 0.0; - break; - case GTK_JUSTIFY_CENTER: - x_offset = -w / 2.0; - break; - case GTK_JUSTIFY_RIGHT: - x_offset = -w; - break; - default: - x_offset = 0.0; - break; /* shouldn't happen */ - } - - y_offset = 0.0; - - *x1 = object->x + x_offset; - *y1 = object->y + y_offset; - *x2 = *x1 + w; - *y2 = *y1 + h; - -#else - - GtkArg arg_info; - - gnome_canvas_item_get_bounds (item, x1, y1, x2, y2); - - /* workaround: the above bounding box is too wide, correct the width. */ - arg_info.name = "text_width"; - gtk_object_getv (GTK_OBJECT (item), 1, &arg_info); - *x2 = *x1 + GTK_VALUE_DOUBLE (arg_info); - -#endif - -} - -/****************************************************************************/ -/* Create and run an edit dialog on a text object. */ -/****************************************************************************/ -void -gl_item_text_edit_dialog (GnomeCanvasItem * item) -{ - GtkWidget *dialog; - static PropertyDialogPassback *data = NULL; - glLabelObject *object; - glDisplay *display; - GtkWidget *wvbox; - - object = gtk_object_get_data (GTK_OBJECT (item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (item), "display"); - - /*-----------------------------------------------------------------*/ - /* Build dialog with notebook. */ - /*-----------------------------------------------------------------*/ - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - data->item = item; - - dialog = gl_property_box_new (); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Edit text object properties")); - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), data); - - /*---------------------------*/ - /* Text Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Text"))); - - /* Text entry widget */ - data->text_entry = - gl_prop_text_entry_new (_("Text"), object->parent->merge_fields); - gl_prop_text_entry_set_text (GL_PROP_TEXT_ENTRY (data->text_entry), - (object->parent->merge_type != - GL_MERGE_NONE), object->arg.text.lines); - gtk_box_pack_start (GTK_BOX (wvbox), data->text_entry, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->text_entry), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*---------------------------*/ - /* Appearance Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Appearance"))); - - /* ------ Begin Text Properties box ------ */ - data->text = gl_prop_text_new (_("Text Properties")); - gl_prop_text_set_params (GL_PROP_TEXT (data->text), - object->arg.text.font_family, - object->arg.text.font_size, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.color, object->arg.text.just); - gtk_box_pack_start (GTK_BOX (wvbox), data->text, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->text), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*---------------------------*/ - /* Position Notebook Tab */ - /*---------------------------*/ - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 10); - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, - gtk_label_new (_("Position"))); - - /* ------ Position Frame ------ */ - data->position = gl_prop_position_new (_("Position")); - gl_prop_position_set_params (GL_PROP_POSITION (data->position), - object->x, object->y, - display->label->width, - display->label->height); - gtk_box_pack_start (GTK_BOX (wvbox), data->position, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (data->position), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (dialog)); - - /*-----------------------------------------------------------------*/ - /* Run dialog, and update state of object if "Applied." */ - /*-----------------------------------------------------------------*/ - gtk_widget_show_all (GTK_WIDGET (dialog)); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*---------------------------------------------------------------------------*/ -static void -changed_cb (glPropertyBox * propertybox) -{ - gl_property_box_changed (propertybox); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" callback. */ -/*---------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint page, - PropertyDialogPassback * data) -{ - glLabelObject *object; - glDisplay *display; - - object = gtk_object_get_data (GTK_OBJECT (data->item), "label_object"); - display = gtk_object_get_data (GTK_OBJECT (data->item), "display"); - - switch (page) { - - case 0: - /* ------- Get updated text ------ */ - gl_text_node_lines_free (&object->arg.text.lines); - object->arg.text.lines = - gl_prop_text_entry_get_text (GL_PROP_TEXT_ENTRY - (data->text_entry)); - break; - - case 1: - /* ------ Get updated text parameter information ------ */ - gl_prop_text_get_params (GL_PROP_TEXT (data->text), - &object->arg.text.font_family, - &object->arg.text.font_size, - &object->arg.text.font_weight, - &object->arg.text.font_italic_flag, - &object->arg.text.color, - &object->arg.text.just); - break; - - case 2: - /* ------ get updated position ------ */ - gl_prop_position_get_position (GL_PROP_POSITION - (data->position), &object->x, - &object->y); - break; - - default: - return; - } - - /* ------ Udate state of object ------ */ - item_text_update (data->item); - gl_display_select_item (display, data->item); - -} - -/****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/****************************************************************************/ -GdkCursor * -gl_item_text_get_create_cursor (void) -{ - static GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - if (!cursor) { - pixmap_data = gdk_bitmap_create_from_data (NULL, - cursor_text_bits, - cursor_text_width, - cursor_text_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - cursor_text_mask_bits, - cursor_text_mask_width, - cursor_text_mask_height); - cursor = - gdk_cursor_new_from_pixmap (pixmap_data, pixmap_mask, &fg, - &bg, cursor_text_x_hot, - cursor_text_y_hot); - } - - return cursor; -} - -/****************************************************************************/ -/* Canvas event handler (text mode) */ -/****************************************************************************/ -gint -gl_item_text_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - glDisplay *display = GL_DISPLAY (data); - gdouble x, y; - glLabelObject *object; - GnomeCanvasItem *item; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - switch (event->button.button) { - case 1: - gnome_canvas_window_to_world (canvas, - event->button.x, - event->button.y, &x, &y); - object = - gl_label_object_new (display->label, - GL_LABEL_OBJECT_TEXT); - object->x = x; - object->y = y; - object->arg.text.lines = - gl_text_node_lines_new_from_text (_("Text")); - object->arg.text.font_family = - g_strdup (DEFAULT_FONT_FAMILY); - object->arg.text.font_size = DEFAULT_FONT_SIZE; - object->arg.text.font_weight = DEFAULT_FONT_WEIGHT; - object->arg.text.font_italic_flag = - DEFAULT_FONT_ITALIC_FLAG; - object->arg.text.just = GTK_JUSTIFY_LEFT; - object->arg.text.color = GNOME_CANVAS_COLOR (0, 0, 0); - item = gl_item_text_new (object, display); - gl_display_add_item (display, item); - gl_display_unselect_all (display); - gl_display_select_item (display, item); - gl_display_arrow_mode (display); - return TRUE; - - default: - return FALSE; - } - - default: - return FALSE; - } - -} - -#ifdef HACKTEXT -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw hacktext to item (group). */ -/*--------------------------------------------------------------------------*/ -static void -draw_hacktext (GnomeCanvasItem * group, - gchar * text, - gchar * font_family, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - gdouble font_size, - guint color, - GtkJustification just, - gdouble scale) -{ - GnomeFont *font; - GnomeGlyphList *glyphlist; - gdouble x_offset, y_offset; - gint i; - gdouble w; - gchar **line, *utf8_text; - GnomeCanvasItem *item; - GList *item_list = NULL; - - font = gnome_font_new_closest (font_family, - font_weight, - font_italic_flag, font_size); - - line = g_strsplit (text, "\n", -1); - - for (i = 0; line[i] != NULL; i++) { - - utf8_text = gl_hack_text_to_utf8 (line[i]); - - w = gl_hack_get_width_string (font, line[i]); - - glyphlist = gnome_glyphlist_from_text_sized_dumb (font, - color, - 0.0, 0.0, - utf8_text, - strlen - (utf8_text)); - switch (just) { - case GTK_JUSTIFY_LEFT: - x_offset = 0.0; - break; - case GTK_JUSTIFY_CENTER: - x_offset = -w / 2.0; - break; - case GTK_JUSTIFY_RIGHT: - x_offset = -w; - break; - default: - x_offset = 0.0; - break; /* shouldn't happen */ - } - - y_offset = - (i + 1) * font_size - gnome_font_get_descender (font); - - item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (group), - gnome_canvas_hacktext_get_type (), - "x", x_offset, - "y", y_offset, - "glyphlist", glyphlist, NULL); - item_list = g_list_prepend (item_list, item); - - g_free (utf8_text); - } - - g_strfreev (line); - - /* attach item list to group, so we can get at these again */ - gtk_object_set_data (GTK_OBJECT (group), "item_list", item_list); -} -#endif - -#ifdef HACKTEXT -/*--------------------------------------------------------------------------*/ -/* PRIVATE. get size of hacktext item. */ -/*--------------------------------------------------------------------------*/ -static void -hacktext_get_size (gchar * text, - gchar * font_family, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - gdouble font_size, - gdouble * w, - gdouble * h) -{ - GnomeFont *font; - gchar **line; - gdouble wline; - gint i; - - *w = 0.0; - *h = 0.0; - - font = gnome_font_new_closest (font_family, - font_weight, - font_italic_flag, font_size); - - line = g_strsplit (text, "\n", -1); - - for (i = 0; line[i] != NULL; i++) { - - wline = gl_hack_get_width_string (font, line[i]); - - if (wline > *w) - *w = wline; - *h += font_size; - - } - - g_strfreev (line); - -} -#endif diff --git a/glabels1/src/item_text.h b/glabels1/src/item_text.h deleted file mode 100644 index 091e062..0000000 --- a/glabels1/src/item_text.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * item_text.h: GLabels Text Object (canvas item) module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __ITEM_TEXT_H__ -#define __ITEM_TEXT_H__ - -#include <gnome.h> - -#include "label.h" - -extern GnomeCanvasItem *gl_item_text_new (glLabelObject * object, - glDisplay * display); - -extern void gl_item_text_highlight (GnomeCanvasItem * item); - -extern void gl_item_text_get_position_size (GnomeCanvasItem * item, - gdouble * x, - gdouble * y, - gdouble * w, - gdouble * h); - -extern void gl_item_text_set_position_size (GnomeCanvasItem * item, - gdouble x, - gdouble y, - gdouble w, - gdouble h); - -extern void gl_item_text_get_bounds (GnomeCanvasItem * item, - gdouble * x1, - gdouble * y1, - gdouble * x2, - gdouble * y2); - -extern void gl_item_text_edit_dialog (GnomeCanvasItem * item); - -extern GdkCursor *gl_item_text_get_create_cursor (void); - -extern gint gl_item_text_create_event_handler (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data); - -#endif diff --git a/glabels1/src/label.c b/glabels1/src/label.c deleted file mode 100644 index c33f97c..0000000 --- a/glabels1/src/label.c +++ /dev/null @@ -1,1212 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * label.c: GLabels label module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> - -/* LibXML */ -#include <tree.h> -#include <parser.h> - -#include "label.h" -#include "template.h" - -#include "debug.h" - -#define NAME_SPACE "http://snaught.com/glabels/0.4/" -#define COMPAT01_NAME_SPACE "http://snaught.com/glabels/0.1/" - -static glLabelStatus xml_doc_to_label (xmlDocPtr doc, glLabel ** label); -static gboolean xml_parse_media_description (xmlNodePtr node, glLabel * label); -static void xml_parse_object(xmlNodePtr node, glLabelObject * object, - gboolean compat01_flag); -static void xml_parse_text_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_text_props_compat01( xmlNodePtr node, - glLabelObject *object ); -static void xml_parse_box_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_line_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_ellipse_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_image_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_barcode_props (xmlNodePtr node, glLabelObject * object); -static void xml_parse_merge_properties (xmlNodePtr node, glLabel * label); - -static glLabelStatus xml_label_to_doc (glLabel * label, xmlDocPtr * doc); -static void xml_create_media_description (xmlNodePtr root, xmlNsPtr ns, - glLabel * label); -static void xml_create_object (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_text_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_box_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_line_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_ellipse_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_image_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_barcode_props (xmlNodePtr root, xmlNsPtr ns, - glLabelObject * object); -static void xml_create_merge_properties (xmlNodePtr root, xmlNsPtr ns, - glLabel * label); - -static const gchar *just_to_text (GtkJustification just); -static GtkJustification text_to_just (const gchar * text); - -static const gchar *weight_to_text (GnomeFontWeight weight); -static GnomeFontWeight text_to_weight (const gchar * text); - -/****************************************************************************/ -/* Create a new label. */ -/****************************************************************************/ -glLabel * -gl_label_new (void) -{ - glLabel *label; - - label = g_new0 (glLabel, 1); - - return label; -} - -/****************************************************************************/ -/* Create a new label. */ -/****************************************************************************/ -glLabel * -gl_label_new_with_template (const gchar * tmplt_name, - gboolean rotate_flag) -{ - glLabel *label; - glTemplate *template; - - label = gl_label_new (); - - label->template_name = g_strdup (tmplt_name); - label->template = template = gl_template_from_name (tmplt_name); - label->rotate_flag = rotate_flag; - - switch (template->style) { - - case GL_TEMPLATE_STYLE_RECT: - if (!rotate_flag) { - label->width = template->label_width; - label->height = template->label_height; - } else { - label->width = template->label_height; - label->height = template->label_width; - } - break; - - case GL_TEMPLATE_STYLE_ROUND: - case GL_TEMPLATE_STYLE_CD: - label->width = label->height = 2.0 * template->label_radius; - break; - - default: - WARN ("Unknown template label style"); - break; - } - - label->objects = NULL; - - return label; -} - -/****************************************************************************/ -/* Free a previously allocated label. */ -/****************************************************************************/ -void -gl_label_free (glLabel ** label) -{ - GList *p, *p_next; - glLabelObject *object; - - if (*label != NULL) { - g_free ((*label)->template_name); - (*label)->template_name = NULL; - - gl_template_free (&(*label)->template); - - for (p = (*label)->objects; p != NULL; p = p_next) { - p_next = p->next; /* NOTE: p will be left dangling */ - object = (glLabelObject *) p->data; - gl_label_object_free (&object); - } - - g_free (*label); - *label = NULL; - } -} - -/****************************************************************************/ -/* Open and read label from xml file. */ -/****************************************************************************/ -glLabelStatus -gl_label_open_xml (glLabel ** label, - const gchar * filename) -{ - xmlDocPtr doc; - glLabelStatus status; - - xmlUseNewParser (TRUE); - doc = xmlParseFile (filename); - if (!doc) { - WARN (_("xmlParseFile error")); - *label = NULL; - return LABEL_ERROR_OPEN_XML_PARSE; - } - - status = xml_doc_to_label (doc, label); - - xmlFreeDoc (doc); - - return status; -} - -/****************************************************************************/ -/* Read label from xml buffer. */ -/****************************************************************************/ -glLabelStatus -gl_label_open_xml_buffer (glLabel ** label, - const gchar * buffer) -{ - xmlDocPtr doc; - glLabelStatus status; - - xmlUseNewParser (TRUE); - doc = xmlParseDoc ((xmlChar *) buffer); - if (!doc) { - WARN (_("xmlParseFile error")); - *label = NULL; - return LABEL_ERROR_OPEN_XML_PARSE; - } - - status = xml_doc_to_label (doc, label); - - xmlFreeDoc (doc); - - return status; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse xml doc structure and create label. */ -/*--------------------------------------------------------------------------*/ -static glLabelStatus -xml_doc_to_label (xmlDocPtr doc, - glLabel ** label) -{ - xmlNodePtr root, node; - xmlNsPtr ns; - glLabelObject *object; - glLabelStatus status = LABEL_OK; - gboolean compat01_flag = FALSE; - - LIBXML_TEST_VERSION; - - gl_label_free (label); - - root = xmlDocGetRootElement (doc); - if (!root || !root->name) { - WARN (_("No document root")); - return LABEL_ERROR_OPEN_XML_PARSE; - } - ns = xmlSearchNsByHref (doc, root, NAME_SPACE); - if (ns == NULL) { - /* Try compatability mode */ - ns = xmlSearchNsByHref (doc, root, COMPAT01_NAME_SPACE); - if (ns != NULL) compat01_flag = TRUE; - } - if (ns == NULL) { - WARN (_ - ("document of the wrong type, glabels Namespace not found")); - return LABEL_ERROR_OPEN_XML_PARSE; - } - - if (g_strcasecmp (root->name, "Label") != 0) { - WARN (_("Bad root node = \"%s\""), root->name); - return LABEL_ERROR_OPEN_XML_PARSE; - } - - *label = gl_label_new (); - - (*label)->rotate_flag = - !(g_strcasecmp (xmlGetProp (root, "rotate"), "false") == 0); - (*label)->width = g_strtod (xmlGetProp (root, "width"), NULL); - (*label)->height = g_strtod (xmlGetProp (root, "height"), NULL); - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - if (g_strcasecmp (node->name, "Media_Type") == 0) { - if (!xml_parse_media_description (node, *label)) { - status = LABEL_UNKNOWN_MEDIA; - } - } else if (g_strcasecmp (node->name, "Text") == 0) { - object = - gl_label_object_new (*label, GL_LABEL_OBJECT_TEXT); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Box") == 0) { - object = - gl_label_object_new (*label, GL_LABEL_OBJECT_BOX); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Line") == 0) { - object = - gl_label_object_new (*label, GL_LABEL_OBJECT_LINE); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Ellipse") == 0) { - object = - gl_label_object_new (*label, - GL_LABEL_OBJECT_ELLIPSE); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Image") == 0) { - object = - gl_label_object_new (*label, GL_LABEL_OBJECT_IMAGE); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Barcode") == 0) { - object = - gl_label_object_new (*label, - GL_LABEL_OBJECT_BARCODE); - xml_parse_object (node, object, compat01_flag); - } else if (g_strcasecmp (node->name, "Merge_Properties") == 0) { - xml_parse_merge_properties (node, *label); - } else { - if (!xmlNodeIsText (node)) { - WARN (_("bad node = \"%s\""), node->name); - } - } - } - - return status; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse Media Description node. */ -/*--------------------------------------------------------------------------*/ -static gboolean -xml_parse_media_description (xmlNodePtr node, - glLabel * label) -{ - label->template_name = xmlNodeGetContent (node); - label->template = gl_template_from_name (label->template_name); - if (label->template == NULL) { - WARN ("Undefined template \"%s\"", label->template_name); - /* Get a default */ - label->template = gl_template_from_name (NULL); - return FALSE; - } - return TRUE; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Object Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object (xmlNodePtr object_node, - glLabelObject * object, - gboolean compat01_flag) -{ - object->x = g_strtod (xmlGetProp (object_node, "x"), NULL); - object->y = g_strtod (xmlGetProp (object_node, "y"), NULL); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - if (compat01_flag) { - xml_parse_text_props_compat01 (object_node, object); - } else { - xml_parse_text_props (object_node, object); - } - break; - case GL_LABEL_OBJECT_BOX: - xml_parse_box_props (object_node, object); - break; - case GL_LABEL_OBJECT_LINE: - xml_parse_line_props (object_node, object); - break; - case GL_LABEL_OBJECT_ELLIPSE: - xml_parse_ellipse_props (object_node, object); - break; - case GL_LABEL_OBJECT_IMAGE: - xml_parse_image_props (object_node, object); - break; - case GL_LABEL_OBJECT_BARCODE: - xml_parse_barcode_props (object_node, object); - break; - default: - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Text Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_text_props (xmlNodePtr object_node, - glLabelObject * object) -{ - xmlNodePtr line_node, text_node; - glTextNode *node_text; - GList *nodes; - - object->arg.text.font_family = xmlGetProp (object_node, "font_family"); - object->arg.text.font_size = - g_strtod (xmlGetProp (object_node, "font_size"), NULL); - object->arg.text.font_weight = - text_to_weight (xmlGetProp (object_node, "font_weight")); - object->arg.text.font_italic_flag = - !(g_strcasecmp (xmlGetProp (object_node, "font_italic"), "false") == - 0); - - object->arg.text.just = - text_to_just (xmlGetProp (object_node, "justify")); - - sscanf (xmlGetProp (object_node, "color"), "%x", - &object->arg.text.color); - - object->arg.text.lines = NULL; - for (line_node = object_node->xmlChildrenNode; line_node != NULL; - line_node = line_node->next) { - - if (g_strcasecmp (line_node->name, "Line") == 0) { - - nodes = NULL; - for (text_node = line_node->xmlChildrenNode; - text_node != NULL; text_node = text_node->next) { - - if (g_strcasecmp (text_node->name, "Field") == - 0) { - node_text = g_new0 (glTextNode, 1); - node_text->field_flag = TRUE; - node_text->data = - xmlGetProp (text_node, "name"); - nodes = - g_list_append (nodes, node_text); - } else if (xmlNodeIsText (text_node)) { - node_text = g_new0 (glTextNode, 1); - node_text->field_flag = FALSE; - node_text->data = - xmlNodeGetContent (text_node); - nodes = - g_list_append (nodes, node_text); - } else { - WARN ("Unexpected Text Line child: \"%s\"", - text_node->name); - } - - } - object->arg.text.lines = - g_list_append (object->arg.text.lines, nodes); - - } else { - WARN ("Unexpected Text child: \"%s\"", line_node->name); - } - - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML label->Text node (Compatability with 0.1 version) */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_text_props_compat01( xmlNodePtr node, glLabelObject *object ) -{ - gchar *text; - - text = xmlNodeGetContent( node ); - object->arg.text.lines = gl_text_node_lines_new_from_text( text ); - g_free( text ); - - object->arg.text.font_family = xmlGetProp( node, "font_family" ); - object->arg.text.font_size = g_strtod( xmlGetProp( node, "font_size" ), - NULL ); - object->arg.text.font_weight = - text_to_weight( xmlGetProp( node, "font_weight" ) ); - object->arg.text.font_italic_flag = - !( g_strcasecmp( xmlGetProp( node, "font_italic" ), - "false" ) == 0 ); - - object->arg.text.just = text_to_just( xmlGetProp( node, "justify" ) ); - - sscanf( xmlGetProp( node, "color" ), "%x", &object->arg.text.color ); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Box Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_box_props (xmlNodePtr node, - glLabelObject * object) -{ - object->arg.box.w = g_strtod (xmlGetProp (node, "w"), NULL); - object->arg.box.h = g_strtod (xmlGetProp (node, "h"), NULL); - - object->arg.box.line_width = g_strtod (xmlGetProp (node, "line_width"), - NULL); - - sscanf (xmlGetProp (node, "line_color"), "%x", - &object->arg.box.line_color); - sscanf (xmlGetProp (node, "fill_color"), "%x", - &object->arg.box.fill_color); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Line Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_line_props (xmlNodePtr node, - glLabelObject * object) -{ - object->arg.line.dx = g_strtod (xmlGetProp (node, "dx"), NULL); - object->arg.line.dy = g_strtod (xmlGetProp (node, "dy"), NULL); - - object->arg.line.line_width = g_strtod (xmlGetProp (node, "line_width"), - NULL); - - sscanf (xmlGetProp (node, "line_color"), "%x", - &object->arg.line.line_color); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Ellipse Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_ellipse_props (xmlNodePtr node, - glLabelObject * object) -{ - object->arg.ellipse.w = g_strtod (xmlGetProp (node, "w"), NULL); - object->arg.ellipse.h = g_strtod (xmlGetProp (node, "h"), NULL); - - object->arg.ellipse.line_width = - g_strtod (xmlGetProp (node, "line_width"), NULL); - - sscanf (xmlGetProp (node, "line_color"), "%x", - &object->arg.ellipse.line_color); - sscanf (xmlGetProp (node, "fill_color"), "%x", - &object->arg.ellipse.fill_color); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Image Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_image_props (xmlNodePtr node, - glLabelObject * object) -{ - object->arg.image.w = g_strtod (xmlGetProp (node, "w"), NULL); - object->arg.image.h = g_strtod (xmlGetProp (node, "h"), NULL); - - object->arg.image.filename = xmlGetProp (node, "filename"); - - object->arg.image.image = - gdk_pixbuf_new_from_file (object->arg.image.filename); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Barcode Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_barcode_props (xmlNodePtr node, - glLabelObject * object) -{ - xmlNodePtr child; - - sscanf (xmlGetProp (node, "color"), "%x", &object->arg.barcode.color); - - object->arg.barcode.style = - gl_barcode_text_to_style (xmlGetProp (node, "style")); - - object->arg.barcode.text_flag = - !(g_strcasecmp (xmlGetProp (node, "text"), "false") == 0); - - object->arg.barcode.scale = - g_strtod (xmlGetProp (node, "scale"), NULL); - if (object->arg.barcode.scale == 0.0) { - object->arg.barcode.scale = 0.5; /* Set to a valid value */ - } - - child = node->xmlChildrenNode; - object->arg.barcode.text_node = g_new0 (glTextNode, 1); - if (g_strcasecmp (child->name, "Field") == 0) { - object->arg.barcode.text_node->field_flag = TRUE; - object->arg.barcode.text_node->data = - xmlGetProp (child, "name"); - } else if (xmlNodeIsText (child)) { - object->arg.barcode.text_node->field_flag = FALSE; - object->arg.barcode.text_node->data = - xmlNodeGetContent (child); - } else { - WARN ("Unexpected Barcode child: \"%s\"", child->name); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML merge properties tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_merge_properties (xmlNodePtr node, - glLabel * label) -{ - xmlNodePtr child; - glMergeFieldDefinition *field_def; - - label->merge_type = gl_merge_text_to_type (xmlGetProp (node, "type")); - label->merge_src = xmlGetProp (node, "src"); - - for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - - if (g_strcasecmp (child->name, "Field") == 0) { - field_def = g_new0 (glMergeFieldDefinition, 1); - field_def->key = xmlGetProp (child, "key"); - field_def->loc = xmlGetProp (child, "loc"); - label->merge_fields = - g_list_append (label->merge_fields, field_def); - } else { - WARN ("Unexpected Merge_Properties child: \"%s\"", - child->name); - } - - } - -} - -/****************************************************************************/ -/* Save label to xml label file. */ -/****************************************************************************/ -glLabelStatus -gl_label_save_xml (glLabel * label, - const gchar * filename) -{ - xmlDocPtr doc; - glLabelStatus status; - gint xml_ret; - - status = xml_label_to_doc (label, &doc); - - xml_ret = xmlSaveFile (filename, doc); - xmlFreeDoc (doc); - if (xml_ret == -1) { - WARN (_("Problem saving xml file.")); - return LABEL_ERROR_SAVE_XML_FILE; - } - - return status; -} - -/****************************************************************************/ -/* Save label to xml buffer. */ -/****************************************************************************/ -glLabelStatus -gl_label_save_xml_buffer (glLabel * label, - gchar ** buffer) -{ - xmlDocPtr doc; - glLabelStatus status; - gint size; - - status = xml_label_to_doc (label, &doc); - - xmlDocDumpMemory (doc, (xmlChar **) buffer, &size); - xmlFreeDoc (doc); - - return status; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Convert label to xml doc structure. */ -/*--------------------------------------------------------------------------*/ -static glLabelStatus -xml_label_to_doc (glLabel * label, - xmlDocPtr * doc) -{ - xmlNsPtr ns; - gchar *string; - GList *p; - glLabelObject *object; - - LIBXML_TEST_VERSION; - - *doc = xmlNewDoc ("1.0"); - (*doc)->xmlRootNode = xmlNewDocNode (*doc, NULL, "Label", NULL); - - ns = xmlNewNs ((*doc)->xmlRootNode, NAME_SPACE, "glabels"); - xmlSetNs ((*doc)->xmlRootNode, ns); - - xmlSetProp ((*doc)->xmlRootNode, "rotate", - label->rotate_flag ? "True" : "False"); - - string = g_strdup_printf ("%g", label->width); - xmlSetProp ((*doc)->xmlRootNode, "width", string); - g_free (string); - - string = g_strdup_printf ("%g", label->height); - xmlSetProp ((*doc)->xmlRootNode, "height", string); - g_free (string); - - xml_create_media_description ((*doc)->xmlRootNode, ns, label); - - for (p = label->objects; p != NULL; p = p->next) { - object = (glLabelObject *) p->data; - xml_create_object ((*doc)->xmlRootNode, ns, object); - } - - if (label->merge_type != GL_MERGE_NONE) { - xml_create_merge_properties ((*doc)->xmlRootNode, ns, label); - } - - return LABEL_OK; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Text Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_media_description (xmlNodePtr root, - xmlNsPtr ns, - glLabel * label) -{ - xmlNodePtr node; - - node = xmlNewTextChild (root, ns, "Media_Type", label->template_name); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML label object Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject * object) -{ - xmlNodePtr object_node; - gchar *string; - - object_node = xmlNewChild (root, ns, "Object", NULL); - - string = g_strdup_printf ("%g", object->x); - xmlSetProp (object_node, "x", string); - g_free (string); - - string = g_strdup_printf ("%g", object->y); - xmlSetProp (object_node, "y", string); - g_free (string); - - switch (object->type) { - case GL_LABEL_OBJECT_TEXT: - xml_create_text_props (object_node, ns, object); - break; - case GL_LABEL_OBJECT_BOX: - xml_create_box_props (object_node, ns, object); - break; - case GL_LABEL_OBJECT_LINE: - xml_create_line_props (object_node, ns, object); - break; - case GL_LABEL_OBJECT_ELLIPSE: - xml_create_ellipse_props (object_node, ns, object); - break; - case GL_LABEL_OBJECT_IMAGE: - xml_create_image_props (object_node, ns, object); - break; - case GL_LABEL_OBJECT_BARCODE: - xml_create_barcode_props (object_node, ns, object); - break; - default: - WARN ("Unknown label object"); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Text Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_text_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - xmlNodePtr line_node, field_node; - gchar *string; - GList *p_line, *p_node; - glTextNode *node_text; - - xmlNodeSetName (object_node, "Text"); - - xmlSetProp (object_node, "font_family", object->arg.text.font_family); - - string = g_strdup_printf ("%g", object->arg.text.font_size); - xmlSetProp (object_node, "font_size", string); - g_free (string); - - xmlSetProp (object_node, "font_weight", - weight_to_text (object->arg.text.font_weight)); - - if (object->arg.text.font_italic_flag) { - xmlSetProp (object_node, "font_italic", "True"); - } else { - xmlSetProp (object_node, "font_italic", "False"); - } - - xmlSetProp (object_node, "justify", - just_to_text (object->arg.text.just)); - - string = g_strdup_printf ("0x%08x", object->arg.text.color); - xmlSetProp (object_node, "color", string); - g_free (string); - - for (p_line = object->arg.text.lines; p_line != NULL; - p_line = p_line->next) { - line_node = xmlNewChild (object_node, ns, "Line", NULL); - - for (p_node = (GList *) p_line->data; p_node != NULL; - p_node = p_node->next) { - node_text = (glTextNode *) p_node->data; - - if (node_text->field_flag) { - field_node = - xmlNewChild (line_node, ns, "Field", NULL); - xmlSetProp (field_node, "name", - node_text->data); - } else { - xmlNodeAddContent (line_node, node_text->data); - } - - } - - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Box Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_box_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - gchar *string; - - xmlNodeSetName (object_node, "Box"); - - string = g_strdup_printf ("%g", object->arg.box.w); - xmlSetProp (object_node, "w", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.box.h); - xmlSetProp (object_node, "h", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.box.line_width); - xmlSetProp (object_node, "line_width", string); - g_free (string); - - string = g_strdup_printf ("0x%08x", object->arg.box.line_color); - xmlSetProp (object_node, "line_color", string); - g_free (string); - - string = g_strdup_printf ("0x%08x", object->arg.box.fill_color); - xmlSetProp (object_node, "fill_color", string); - g_free (string); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Line Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_line_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - gchar *string; - - xmlNodeSetName (object_node, "Line"); - - string = g_strdup_printf ("%g", object->arg.line.dx); - xmlSetProp (object_node, "dx", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.line.dy); - xmlSetProp (object_node, "dy", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.line.line_width); - xmlSetProp (object_node, "line_width", string); - g_free (string); - - string = g_strdup_printf ("0x%08x", object->arg.line.line_color); - xmlSetProp (object_node, "line_color", string); - g_free (string); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Ellipse Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_ellipse_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - gchar *string; - - xmlNodeSetName (object_node, "Ellipse"); - - string = g_strdup_printf ("%g", object->arg.ellipse.w); - xmlSetProp (object_node, "w", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.ellipse.h); - xmlSetProp (object_node, "h", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.ellipse.line_width); - xmlSetProp (object_node, "line_width", string); - g_free (string); - - string = g_strdup_printf ("0x%08x", object->arg.ellipse.line_color); - xmlSetProp (object_node, "line_color", string); - g_free (string); - - string = g_strdup_printf ("0x%08x", object->arg.ellipse.fill_color); - xmlSetProp (object_node, "fill_color", string); - g_free (string); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Image Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_image_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - gchar *string; - - xmlNodeSetName (object_node, "Image"); - - string = g_strdup_printf ("%g", object->arg.image.w); - xmlSetProp (object_node, "w", string); - g_free (string); - - string = g_strdup_printf ("%g", object->arg.image.h); - xmlSetProp (object_node, "h", string); - g_free (string); - - xmlSetProp (object_node, "filename", object->arg.image.filename); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label->Barcode Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_barcode_props (xmlNodePtr object_node, - xmlNsPtr ns, - glLabelObject * object) -{ - xmlNodePtr child; - gchar *string; - - xmlNodeSetName (object_node, "Barcode"); - - string = g_strdup_printf ("0x%08x", object->arg.barcode.color); - xmlSetProp (object_node, "color", string); - g_free (string); - - xmlSetProp (object_node, "style", - gl_barcode_style_to_text (object->arg.barcode.style)); - - if (object->arg.barcode.text_flag) { - xmlSetProp (object_node, "text", "True"); - } else { - xmlSetProp (object_node, "text", "False"); - } - - string = g_strdup_printf ("%g", object->arg.barcode.scale); - xmlSetProp (object_node, "scale", string); - g_free (string); - - if (object->arg.barcode.text_node->field_flag) { - child = xmlNewChild (object_node, ns, "Field", NULL); - xmlSetProp (child, "name", - object->arg.barcode.text_node->data); - } else { - xmlNodeSetContent (object_node, - object->arg.barcode.text_node->data); - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label Merge Properties Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_merge_properties (xmlNodePtr root, - xmlNsPtr ns, - glLabel * label) -{ - xmlNodePtr node, child; - gchar *string; - GList *p; - glMergeFieldDefinition *field_def; - - node = xmlNewChild (root, ns, "Merge_Properties", NULL); - - string = gl_merge_type_to_text (label->merge_type); - xmlSetProp (node, "type", string); - g_free (string); - - xmlSetProp (node, "src", label->merge_src); - - for (p = label->merge_fields; p != NULL; p = p->next) { - field_def = (glMergeFieldDefinition *) p->data; - - child = xmlNewChild (node, ns, "Field", NULL); - xmlSetProp (child, "key", field_def->key); - xmlSetProp (child, "loc", field_def->loc); - } - -} - -/****************************************************************************/ -/* Create a new label object of the given type. */ -/****************************************************************************/ -glLabelObject * -gl_label_object_new (glLabel * label, - glLabelObjectType type) -{ - glLabelObject *object; - - object = g_new0 (glLabelObject, 1); - object->parent = label; - object->type = type; - - if (label != NULL) { - label->objects = g_list_append (label->objects, object); - } - - return object; -} - -/****************************************************************************/ -/* Create a new label object from an existing object */ -/****************************************************************************/ -glLabelObject * -gl_label_object_new_from_object (glLabel * label, - glLabelObject * src_object) -{ - glLabelObject *object; - GList *p_line, *nodes, *p_node; - glTextNode *node, *src_node; - - object = g_new0 (glLabelObject, 1); - *object = *src_object; - - /* deep copy */ - switch (object->type) { - - case GL_LABEL_OBJECT_TEXT: - /* deep copy */ - gl_text_node_lines_print (src_object->arg.text.lines); - object->arg.text.lines = NULL; - for (p_line = src_object->arg.text.lines; p_line != NULL; - p_line = p_line->next) { - nodes = NULL; - for (p_node = (GList *) p_line->data; p_node != NULL; - p_node = p_node->next) { - src_node = (glTextNode *) p_node->data; - node = g_new0 (glTextNode, 1); - node->field_flag = src_node->field_flag; - node->data = g_strdup (src_node->data); - nodes = g_list_append (nodes, node); - } - object->arg.text.lines = - g_list_append (object->arg.text.lines, nodes); - } - object->arg.text.font_family = - g_strdup (src_object->arg.text.font_family); - break; - - case GL_LABEL_OBJECT_IMAGE: - object->arg.image.filename - = g_strdup (src_object->arg.image.filename); - object->arg.image.image - = gdk_pixbuf_copy (src_object->arg.image.image); - break; - - case GL_LABEL_OBJECT_BARCODE: - object->arg.barcode.text_node = g_new0 (glTextNode, 1); - object->arg.barcode.text_node->field_flag = - src_object->arg.barcode.text_node->field_flag; - object->arg.barcode.text_node->data = - g_strdup (src_object->arg.barcode.text_node->data); - break; - - default: - break; - - } - - /* set parent */ - object->parent = label; - if (label != NULL) { - label->objects = g_list_append (label->objects, object); - } - - return object; -} - -/****************************************************************************/ -/* Free a previously allocated label object. */ -/****************************************************************************/ -void -gl_label_object_free (glLabelObject ** object) -{ - glLabel *label; - - switch ((*object)->type) { - - case GL_LABEL_OBJECT_TEXT: - gl_text_node_lines_free (&((*object)->arg.text.lines)); - g_free ((*object)->arg.text.font_family); - (*object)->arg.text.font_family = NULL; - break; - - case GL_LABEL_OBJECT_IMAGE: - g_free ((*object)->arg.image.filename); - (*object)->arg.image.filename = NULL; - gdk_pixbuf_unref ((*object)->arg.image.image); - (*object)->arg.image.image = NULL; - break; - - case GL_LABEL_OBJECT_BARCODE: - gl_text_node_free (&((*object)->arg.barcode.text_node)); - break; - - default: - break; - - } - - label = (*object)->parent; - if (label != NULL) { - label->objects = g_list_remove (label->objects, *object); - } - - g_free (*object); - *object = NULL; -} - -/****************************************************************************/ -/* Bring label object to front/top. */ -/****************************************************************************/ -void -gl_label_object_raise_to_front (glLabelObject * object) -{ - glLabel *label; - - label = object->parent; - - /* Move to end of list, representing front most object */ - label->objects = g_list_remove (label->objects, object); - label->objects = g_list_append (label->objects, object); -} - -/****************************************************************************/ -/* Send label object to rear/bottom. */ -/****************************************************************************/ -void -gl_label_object_lower_to_back (glLabelObject * object) -{ - glLabel *label; - - label = object->parent; - - /* Move to front of list, representing rear most object */ - label->objects = g_list_remove (label->objects, object); - label->objects = g_list_prepend (label->objects, object); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Utilities to deal with GTK_JUSTIFICATION types */ -/*--------------------------------------------------------------------------*/ -static const gchar * -just_to_text (GtkJustification just) -{ - switch (just) { - case GTK_JUSTIFY_LEFT: - return "Left"; - case GTK_JUSTIFY_CENTER: - return "Center"; - case GTK_JUSTIFY_RIGHT: - return "Right"; - default: - return "?"; - } -} - -static GtkJustification -text_to_just (const gchar * text) -{ - - if (g_strcasecmp (text, "Left") == 0) { - return GTK_JUSTIFY_LEFT; - } else if (g_strcasecmp (text, "Center") == 0) { - return GTK_JUSTIFY_CENTER; - } else if (g_strcasecmp (text, "Right") == 0) { - return GTK_JUSTIFY_RIGHT; - } else { - return GTK_JUSTIFY_LEFT; - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Utilities to deal with GNOME_FONT_WEIGHT types */ -/*--------------------------------------------------------------------------*/ -static const gchar * -weight_to_text (GnomeFontWeight weight) -{ - switch (weight) { - case GNOME_FONT_BOOK: - return "Regular"; - case GNOME_FONT_BOLD: - return "Bold"; - default: - return "?"; - } -} - -static GnomeFontWeight -text_to_weight (const gchar * text) -{ - - if (g_strcasecmp (text, "Regular") == 0) { - return GNOME_FONT_BOOK; - } else if (g_strcasecmp (text, "Bold") == 0) { - return GNOME_FONT_BOLD; - } else { - return GNOME_FONT_BOOK; - } - -} diff --git a/glabels1/src/label.h b/glabels1/src/label.h deleted file mode 100644 index e0ca5f9..0000000 --- a/glabels1/src/label.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * label.h: GLabels label module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __LABEL_H__ -#define __LABEL_H__ - -#include <gtk/gtk.h> -#include <libgnomeprint/gnome-font.h> -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include "merge.h" -#include "text_node.h" -#include "template.h" -#include "bc.h" - -typedef struct { - - gchar *template_name; - glTemplate *template; - gboolean rotate_flag; - - gdouble width, height; - - GList *objects; - - glMergeType merge_type; - gchar *merge_src; - GList *merge_fields; /* Merge Field Definitions */ - -} glLabel; - -typedef enum { - GL_LABEL_OBJECT_TEXT, - GL_LABEL_OBJECT_BOX, - GL_LABEL_OBJECT_LINE, - GL_LABEL_OBJECT_ELLIPSE, - GL_LABEL_OBJECT_IMAGE, - GL_LABEL_OBJECT_BARCODE, - GL_LABEL_OBJECT_N_TYPES -} glLabelObjectType; - -typedef struct { - - glLabel *parent; - - glLabelObjectType type; - gdouble x, y; - - union { - - struct { - GList *lines; /* list of glLabelTextNode lists */ - gchar *font_family; - gdouble font_size; - GnomeFontWeight font_weight; - gboolean font_italic_flag; - GtkJustification just; - guint color; - } text; - - struct { - gdouble w, h; - gdouble line_width; - guint line_color; - guint fill_color; - } box; - - struct { - gdouble dx, dy; - gdouble line_width; - guint line_color; - } line; - - struct { - gdouble w, h; - gdouble line_width; - guint line_color; - guint fill_color; - } ellipse; - - struct { - gchar *filename; - gdouble w, h; - GdkPixbuf *image; - } image; - - struct { - glTextNode *text_node; - glBarcodeStyle style; - guint color; - gboolean text_flag; - gdouble scale; - } barcode; - - } arg; - -} glLabelObject; - -typedef enum { - LABEL_UNKNOWN_MEDIA = 1, - LABEL_OK = 0, - LABEL_ERROR_OPEN_XML_PARSE = -10, - LABEL_ERROR_SAVE_XML_FILE = -20, -} glLabelStatus; - -extern glLabel *gl_label_new (void); -extern glLabel *gl_label_new_with_template (const gchar * tmplt_name, - gboolean rotate_flag); -extern void gl_label_free (glLabel ** label); - -extern glLabelStatus gl_label_open_xml (glLabel ** label, - const gchar * filename); -extern glLabelStatus gl_label_open_xml_buffer (glLabel ** label, - const gchar * buffer); - -extern glLabelStatus gl_label_save_xml (glLabel * label, - const gchar * filename); - -glLabelStatus gl_label_save_xml_buffer (glLabel * label, - gchar ** buffer); - -extern glLabelObject *gl_label_object_new (glLabel * label, - glLabelObjectType type); - -extern glLabelObject *gl_label_object_new_from_object (glLabel * label, - glLabelObject * object); - -extern void gl_label_object_free (glLabelObject ** object); - -extern void gl_label_object_raise_to_front (glLabelObject * object); -extern void gl_label_object_lower_to_back (glLabelObject * object); - -#endif diff --git a/glabels1/src/mdi.c b/glabels1/src/mdi.c deleted file mode 100644 index 4a1b17a..0000000 --- a/glabels1/src/mdi.c +++ /dev/null @@ -1,746 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * mdi.c: GLabels MDI module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> -#include <unistd.h> -#include <dirent.h> -#include <string.h> - -#include "mdi.h" -#include "menu.h" -#include "display.h" -#include "label.h" -#include "util.h" - -#define DONT_DISPLAY_EXTENSION - -/*============================================*/ -/* Private types. */ -/*============================================*/ -typedef struct _Document Document; -struct _Document { - glLabel *label; - gchar *filename; - gint id; -}; - -/*============================================*/ -/* Private globals. */ -/*============================================*/ -static GnomeMDI *mdi = NULL; -static gint i_unnamed = 0; -static gint next_id = 0; - -/*===========================================*/ -/* Private function prototypes. */ -/*===========================================*/ -static void set_filename (GnomeMDIChild * child, const gchar * filename); - -static gboolean remove_child_handler (GnomeMDI * mdi, GnomeMDIChild * child, - gpointer data); - -static GnomeMDIChild *child_creator (const char *name, glLabel * label, - const char *abs_filename); - -static void child_destroyed (GnomeMDIChild * child, gpointer data); - -static void app_created_handler (GnomeMDI * mdi, GnomeApp * app, gpointer data); - -static GtkWidget *view_creator (GnomeMDIChild * child, gpointer data); - -static gchar *construct_name (GnomeMDIChild * child, const gchar * filename); - -static gboolean close_save (GnomeMDIChild * child); - -static gboolean close_save_as_dialog (GnomeMDIChild * child); - -static void close_save_as_ok_cb (GtkWidget * widget, GtkFileSelection * fsel); - -static void close_save_as_cancel_cb (GtkWidget * widget, GtkFileSelection * fsel); - -static void close_save_as_destroy_cb (GtkWidget * widget, gboolean * destroy_flag); - -/*--------------------------------------------------------------------------*/ -/* Initialize mdi module. */ -/*--------------------------------------------------------------------------*/ -GnomeMDI * -gl_mdi_init (void) -{ - mdi = GNOME_MDI (gnome_mdi_new (PACKAGE, "gLabels")); - - gl_menu_install_menus (mdi); - gl_menu_install_toolbar (mdi); - - gtk_signal_connect (GTK_OBJECT (mdi), "destroy", - GTK_SIGNAL_FUNC (gtk_main_quit), NULL); - - gtk_signal_connect (GTK_OBJECT (mdi), "remove_child", - GTK_SIGNAL_FUNC (remove_child_handler), NULL); - - gtk_signal_connect (GTK_OBJECT (mdi), "app-created", - GTK_SIGNAL_FUNC (app_created_handler), NULL); - - return mdi; -} - -/*--------------------------------------------------------------------------*/ -/* Get active window/app. */ -/*--------------------------------------------------------------------------*/ -GnomeApp * -gl_mdi_get_active_window (void) -{ - return gnome_mdi_get_active_window (mdi); -} - -/*--------------------------------------------------------------------------*/ -/* Create a new view/child with a blank document. */ -/*--------------------------------------------------------------------------*/ -gboolean -gl_mdi_new_child (const gchar * tmplt_name, - gboolean rotate_flag) -{ - gchar *name = NULL; - GnomeMDIChild *child; - - i_unnamed++; - name = g_strdup_printf ("Label%d", i_unnamed); - child = child_creator (name, - gl_label_new_with_template (tmplt_name, - rotate_flag), NULL); - g_free (name); - if (child == NULL) { - return FALSE; - } - - gnome_mdi_add_child (mdi, child); - gnome_mdi_add_view (mdi, child); - - return TRUE; -} - -/*--------------------------------------------------------------------------*/ -/* Create a new view, from xml document. */ -/*--------------------------------------------------------------------------*/ -gboolean -gl_mdi_new_child_from_xml_file (const gchar * filename) -{ - GList *p_child; - GnomeMDIChild *child; - Document *document; - gchar *abs_filename, *name; - glLabel *label = NULL; - glLabelStatus status; - GtkWidget *wdialog; - gchar *msg; - GnomeApp *app; - - abs_filename = gl_util_make_absolute (filename); - - for (p_child = mdi->children; p_child != NULL; p_child = p_child->next) { - child = GNOME_MDI_CHILD (p_child->data); - document = gtk_object_get_user_data (GTK_OBJECT (child)); - if (document->filename != NULL) { - if (strcmp (document->filename, abs_filename) == 0) { - msg = - g_strdup_printf (_ - ("Revert to saved copy of %s?"), - abs_filename); - wdialog = - gnome_message_box_new (msg, - GNOME_MESSAGE_BOX_QUESTION, - GNOME_STOCK_BUTTON_YES, - GNOME_STOCK_BUTTON_NO, - NULL); - g_free (msg); - app = - gnome_mdi_get_app_from_view (GTK_WIDGET - (child->views-> - data)); - gtk_window_set_transient_for (GTK_WINDOW - (wdialog), - GTK_WINDOW (app)); - if (gnome_dialog_run (GNOME_DIALOG (wdialog)) == - 0) { - gnome_mdi_remove_child (mdi, child, - FALSE); - break; - } else { - g_free (abs_filename); - return TRUE; - } - } - } - } - - status = gl_label_open_xml (&label, abs_filename); - if (status < LABEL_OK) { - g_free (abs_filename); - return FALSE; - } - if (status == LABEL_UNKNOWN_MEDIA) { - app = gl_mdi_get_active_window (); - wdialog = - gnome_error_dialog_parented (_ - ("Unknown media type. Using default."), - GTK_WINDOW (app)); - gtk_window_set_modal (GTK_WINDOW (wdialog), TRUE); - } - - name = construct_name (NULL, abs_filename); - child = child_creator (name, label, abs_filename); - g_free (name); - if (child == NULL) { - g_free (abs_filename); - return FALSE; - } - - gnome_mdi_add_child (mdi, child); - gnome_mdi_add_view (mdi, child); - - g_free (abs_filename); - return TRUE; -} - -/*--------------------------------------------------------------------------*/ -/* Save view to xml file. */ -/*--------------------------------------------------------------------------*/ -gboolean -gl_mdi_save_child_to_xml_file (GnomeMDIChild * child, - const gchar * filename) -{ - glDisplay *display; - glLabel *label; - - display = gl_mdi_get_display (child); - label = display->label; - if (gl_label_save_xml (label, filename) == LABEL_OK) { - gl_display_clear_modified (display); - set_filename (child, filename); - return TRUE; - } else { - return FALSE; - } - -} - -/*--------------------------------------------------------------------------*/ -/* Close view. */ -/*--------------------------------------------------------------------------*/ -void -gl_mdi_close_child (GnomeMDIChild * child) -{ - if (child != NULL) { - gnome_mdi_remove_child (mdi, child, FALSE); - } -} - -/*--------------------------------------------------------------------------*/ -/* Close all views, and exit if successful. */ -/*--------------------------------------------------------------------------*/ -void -gl_mdi_close_all (void) -{ - if (gnome_mdi_remove_all (mdi, FALSE)) { - gtk_object_destroy (GTK_OBJECT (mdi)); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Set filename associated with document. */ -/*--------------------------------------------------------------------------*/ -void -set_filename (GnomeMDIChild * child, - const gchar * filename) -{ - Document *document; - gchar *name; - - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - g_free (document->filename); - document->filename = g_strdup (filename); - - name = construct_name (child, filename); - gnome_mdi_child_set_name (child, name); - g_free (name); -} - -/*--------------------------------------------------------------------------*/ -/* Get filename associated with document. */ -/*--------------------------------------------------------------------------*/ -gchar * -gl_mdi_get_filename (GnomeMDIChild * child) -{ - Document *document; - - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - return g_strdup (document->filename); -} - -/*--------------------------------------------------------------------------*/ -/* Get base filename of document. */ -/*--------------------------------------------------------------------------*/ -gchar * -gl_mdi_get_basename (GnomeMDIChild * child) -{ - Document *document; - - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - if (document->filename != NULL) { - return g_strdup (g_basename (document->filename)); - } else { - return NULL; - } -} - -/*--------------------------------------------------------------------------*/ -/*--------------------------------------------------------------------------*/ -GList * -gl_mdi_get_displays_in_current_window (void) -{ - GnomeApp *app; - GList *p_child; - GnomeMDIChild *child; - GtkWidget *view; - GList *views = NULL; - - app = gnome_mdi_get_active_window (mdi); - - for (p_child = mdi->children; p_child != NULL; p_child = p_child->next) { - child = GNOME_MDI_CHILD (p_child->data); - view = GTK_WIDGET (child->views->data); - if (gnome_mdi_get_app_from_view (view) == app) { - views = g_list_prepend (views, view); - } - } - - return views; -} - -/*--------------------------------------------------------------------------*/ -/* Get label display associated with document. */ -/*--------------------------------------------------------------------------*/ -glDisplay * -gl_mdi_get_display (GnomeMDIChild * child) -{ - if (child == NULL) - return NULL; - if (child->views == NULL) - return NULL; - return GL_DISPLAY (child->views->data); -} - -/*--------------------------------------------------------------------------*/ -/* Get label associated with document. */ -/*--------------------------------------------------------------------------*/ -glLabel * -gl_mdi_get_label (GnomeMDIChild * child) -{ - glDisplay *display; - - display = gl_mdi_get_display (child); - return display->label; -} - -/*--------------------------------------------------------------------------*/ -/* Get uniq id associated with document. */ -/*--------------------------------------------------------------------------*/ -gint -gl_mdi_get_id (GnomeMDIChild * child) -{ - Document *document; - - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - return document->id; -} - -/*--------------------------------------------------------------------------*/ -/* Find child associated with given id. This allows us to verify that a */ -/* child still exists from a non-modal dialog, e.g. if you close a child */ -/* while you have a print or save as dialog open for that child. */ -/*--------------------------------------------------------------------------*/ -GnomeMDIChild * -gl_mdi_find_child (gint id) -{ - GList *p_child; - GnomeMDIChild *child; - Document *document; - - for (p_child = mdi->children; p_child != NULL; p_child = p_child->next) { - child = GNOME_MDI_CHILD (p_child->data); - document = gtk_object_get_user_data (GTK_OBJECT (child)); - if (document->id == id) { - return child; - } - } - - return NULL; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create a new child. */ -/*--------------------------------------------------------------------------*/ -static GnomeMDIChild * -child_creator (const char *name, - glLabel * label, - const char *abs_filename) -{ - GnomeMDIGenericChild *child; - Document *document; - - document = g_new0 (Document, 1); - - document->label = label; - document->filename = g_strdup (abs_filename); - document->id = next_id++; - - child = gnome_mdi_generic_child_new (name); - - gtk_object_set_user_data (GTK_OBJECT (child), document); - - gnome_mdi_generic_child_set_view_creator (child, view_creator, NULL); - - gtk_signal_connect (GTK_OBJECT (child), "destroy", - GTK_SIGNAL_FUNC (child_destroyed), document); - - return GNOME_MDI_CHILD (child); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Handle remove child signal. */ -/*--------------------------------------------------------------------------*/ -static gboolean -remove_child_handler (GnomeMDI * mdi, - GnomeMDIChild * child, - gpointer data) -{ - GtkWidget *wdialog; - gchar *msg; - GnomeApp *app = gnome_mdi_get_active_window (mdi); - Document *document; - glDisplay *display; - - display = gl_mdi_get_display (child); - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - if (gl_display_modified (display)) { - msg = - g_strdup_printf (_ - ("``%s'' has been modified.\n\nDo you wish to save it?"), - child->name); - wdialog = - gnome_message_box_new (msg, GNOME_MESSAGE_BOX_WARNING, - "Save", _("Don't save"), - GNOME_STOCK_BUTTON_CANCEL, NULL); - g_free (msg); - gtk_window_set_transient_for (GTK_WINDOW (wdialog), - GTK_WINDOW (app)); - switch (gnome_dialog_run (GNOME_DIALOG (wdialog))) { - - case 0: /* Yes / Save */ - if (document->filename != NULL) { - return close_save (child); - } else { - return close_save_as_dialog (child); - } - - case 1: /* No / Don't save */ - return TRUE; - - default: /* Cancel operation */ - return FALSE; - } - } else { - return TRUE; - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Handle destroy child signal. */ -/*--------------------------------------------------------------------------*/ -static void -child_destroyed (GnomeMDIChild * child, - gpointer data) -{ - Document *document = data; - - gl_label_free (&document->label); - g_free (document->filename); - document->filename = NULL; - - g_free (document); - gtk_object_set_user_data (GTK_OBJECT (child), NULL); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Handle "app-created" signal. */ -/*--------------------------------------------------------------------------*/ -static void -app_created_handler (GnomeMDI * mdi, - GnomeApp * app, - gpointer data) -{ - GtkWidget *status; - - status = gnome_appbar_new (FALSE, TRUE, GNOME_PREFERENCES_NEVER); - gnome_app_set_statusbar (app, status); - - gnome_app_install_menu_hints (app, - gnome_mdi_get_menubar_info (mdi-> - active_window)); - - gl_menu_install_tools_toolbar (mdi, app); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. View creator. */ -/*--------------------------------------------------------------------------*/ -static GtkWidget * -view_creator (GnomeMDIChild * child, - gpointer data) -{ - GtkWidget *widget; - Document *document; - - document = gtk_object_get_user_data (GTK_OBJECT (child)); - - widget = gl_display_new (document->label); - gtk_widget_show_all (widget); - - return widget; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct a child name, based on filename. */ -/*--------------------------------------------------------------------------*/ -static gchar * -construct_name (GnomeMDIChild * my_child, - const gchar * filename) -{ - gchar *name, *test_name, *final_name; - gint test_name_length; - GList *p_child; - gint duplicates = 0; - GnomeMDIChild *child; - - name = g_strdup (g_basename (filename)); -#ifdef DONT_DISPLAY_EXTENSION - { - gchar *p_extension = strrchr (name, '.'); - if (p_extension != NULL) - *p_extension = 0; /* wipe out extension */ - } -#endif - test_name = g_strdup_printf ("%s <", name); - test_name_length = strlen (test_name); - - for (p_child = mdi->children; p_child != NULL; p_child = p_child->next) { - child = GNOME_MDI_CHILD (p_child->data); - if (my_child != child) { - if (strcmp (child->name, name) == 0) { - duplicates++; - } - if (strncmp (child->name, test_name, test_name_length) - == 0) { - duplicates++; - } - } - } - g_free (test_name); - - if (duplicates > 0) { - final_name = g_strdup_printf ("%s <%d>", name, duplicates + 1); - } else { - final_name = g_strdup (name); - } - - g_free (name); - return final_name; - -} - -/*=================================================================*/ -/* PRIVATE. Save a document on close. */ -/*=================================================================*/ -static gboolean -close_save (GnomeMDIChild * child) -{ - Document *document = gtk_object_get_user_data (GTK_OBJECT (child)); - GtkWidget *dlg; - GnomeApp *app = gnome_mdi_get_active_window (mdi); - - if (gl_mdi_save_child_to_xml_file (child, document->filename)) { - return TRUE; - } else { - dlg = gnome_error_dialog_parented (_("Cannot save file"), - GTK_WINDOW (app)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - return FALSE; - } -} - -/*=================================================================*/ -/* PRIVATE. Special modal "Save As" dialog for closing children. */ -/*=================================================================*/ -static gboolean -close_save_as_dialog (GnomeMDIChild * child) -{ - GtkFileSelection *fsel; - GnomeApp *app = gnome_mdi_get_active_window (mdi); - gint id; - gboolean flag = FALSE; - gboolean destroy_flag = FALSE; - - g_return_val_if_fail (child != NULL, FALSE); - g_return_val_if_fail (app != NULL, FALSE); - - fsel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save As"))); - gtk_window_set_modal (GTK_WINDOW (fsel), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (fsel), GTK_WINDOW (app)); - gtk_window_set_title (GTK_WINDOW (fsel), _("Close / Save label as")); - - id = gl_mdi_get_id (child); - gtk_object_set_data (GTK_OBJECT (fsel), "id", GINT_TO_POINTER (id)); - gtk_object_set_data (GTK_OBJECT (fsel), "flag", &flag); - - gtk_signal_connect (GTK_OBJECT (fsel->ok_button), "clicked", - GTK_SIGNAL_FUNC (close_save_as_ok_cb), fsel); - - gtk_signal_connect (GTK_OBJECT (fsel->cancel_button), "clicked", - GTK_SIGNAL_FUNC (close_save_as_cancel_cb), fsel); - - gtk_signal_connect (GTK_OBJECT (fsel), "destroy", - GTK_SIGNAL_FUNC (close_save_as_destroy_cb), - &destroy_flag); - - /* show the dialog */ - gtk_widget_show (GTK_WIDGET (fsel)); - - /* Hold here and process events until we are done with this dialog. */ - gtk_main (); - - /* Destroy dialog if not already destroyed. */ - if (!destroy_flag) { - /* Disconnect our destroy callback first, so that we don't kill the - * current gtk_main() loop. */ - gtk_signal_disconnect_by_func (GTK_OBJECT (fsel), - GTK_SIGNAL_FUNC - (close_save_as_destroy_cb), - &destroy_flag); - gtk_widget_destroy (GTK_WIDGET (fsel)); - } - - /* Return flag as set by one of the above callbacks, TRUE = saved */ - return flag; -} - -/*==============================================*/ -/* PRIVATE. "Save As" ok button callback. */ -/*==============================================*/ -static void -close_save_as_ok_cb (GtkWidget * widget, - GtkFileSelection * fsel) -{ - gchar *raw_filename, *filename; - GtkWidget *dlg; - gint id = - GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (fsel), "id")); - GnomeMDIChild *child = gl_mdi_find_child (id); - gboolean *flag = gtk_object_get_data (GTK_OBJECT (fsel), "flag"); - - g_return_if_fail (GTK_IS_FILE_SELECTION (fsel)); - - if (child == NULL) { - dlg = gnome_error_dialog (_("Label no longer valid!")); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - *flag = TRUE; - gtk_widget_hide (GTK_WIDGET (fsel)); - gtk_main_quit (); - return; - } - - /* get the filename */ - raw_filename = g_strdup (gtk_file_selection_get_filename (fsel)); - - if (!raw_filename || (raw_filename[strlen (raw_filename) - 1] == '/')) { - - dlg = gnome_warning_dialog_parented (_("Must supply file name"), - GTK_WINDOW (fsel)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - - } else { - - filename = gl_util_add_extension (raw_filename); - - if (!gl_mdi_save_child_to_xml_file (child, filename)) { - - dlg = - gnome_error_dialog_parented (_ - ("Error writing file"), - GTK_WINDOW (fsel)); - gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); - - } else { - *flag = TRUE; - gtk_widget_hide (GTK_WIDGET (fsel)); - gtk_main_quit (); - } - - g_free (filename); - } - - g_free (raw_filename); -} - -/*==============================================*/ -/* PRIVATE. "Save As" cancel button callback. */ -/*==============================================*/ -static void -close_save_as_cancel_cb (GtkWidget * widget, - GtkFileSelection * fsel) -{ - gboolean *flag = gtk_object_get_data (GTK_OBJECT (fsel), "flag"); - - g_return_if_fail (GTK_IS_FILE_SELECTION (fsel)); - - *flag = FALSE; - gtk_widget_hide (GTK_WIDGET (fsel)); - gtk_main_quit (); -} - -/*==============================================*/ -/* PRIVATE. "Save As" destroy callback. */ -/*==============================================*/ -static void -close_save_as_destroy_cb (GtkWidget * widget, - gboolean * destroy_flag) -{ - *destroy_flag = TRUE; - gtk_main_quit (); -} diff --git a/glabels1/src/mdi.h b/glabels1/src/mdi.h deleted file mode 100644 index faeeedc..0000000 --- a/glabels1/src/mdi.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * mdi.h: GLabels MDI module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MDI_H__ -#define __MDI_H__ - -#include <gnome.h> -#include <display.h> - -extern GnomeMDI *gl_mdi_init (void); -extern GnomeApp *gl_mdi_get_active_window (void); - -extern gboolean gl_mdi_new_child (const gchar * tmplt_name, - gboolean rotate_flag); -extern gboolean gl_mdi_new_child_from_xml_file (const gchar * filename); - -extern gboolean gl_mdi_save_child_to_xml_file (GnomeMDIChild * child, - const gchar * filename); - -extern void gl_mdi_close_child (GnomeMDIChild * child); -extern void gl_mdi_close_all (void); - -extern gchar *gl_mdi_get_filename (GnomeMDIChild * child); -extern gchar *gl_mdi_get_basename (GnomeMDIChild * child); - -extern GList *gl_mdi_get_displays_in_current_window (void); -extern glDisplay *gl_mdi_get_display (GnomeMDIChild * child); -extern glLabel *gl_mdi_get_label (GnomeMDIChild * child); - -extern gint gl_mdi_get_id (GnomeMDIChild * child); -extern GnomeMDIChild *gl_mdi_find_child (gint id); - -#endif /* __MDI_H__ */ diff --git a/glabels1/src/media_select.c b/glabels1/src/media_select.c deleted file mode 100644 index 6d82946..0000000 --- a/glabels1/src/media_select.c +++ /dev/null @@ -1,457 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * media_select.c: media selection widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "media_select.h" -#include "template.h" -#include "mini_preview.h" -#include "prefs.h" -#include "util.h" - -#include "debug.h" - -#define MINI_PREVIEW_WIDTH 160 -#define MINI_PREVIEW_HEIGHT 200 - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glMediaSelectSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint media_select_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_media_select_class_init (glMediaSelectClass * class); -static void gl_media_select_init (glMediaSelect * media_select); -static void gl_media_select_destroy (GtkObject * object); - -static void gl_media_select_construct (glMediaSelect * media_select); - -static void page_size_entry_changed_cb (GtkEntry * entry, gpointer user_data); -static void template_entry_changed_cb (GtkEntry * entry, gpointer user_data); - -static void details_update (glMediaSelect * media_select, gchar * name); - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_media_select_get_type (void) -{ - static guint media_select_type = 0; - - if (!media_select_type) { - GtkTypeInfo media_select_info = { - "glMediaSelect", - sizeof (glMediaSelect), - sizeof (glMediaSelectClass), - (GtkClassInitFunc) gl_media_select_class_init, - (GtkObjectInitFunc) gl_media_select_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - media_select_type = gtk_type_unique (gtk_vbox_get_type (), - &media_select_info); - } - - return media_select_type; -} - -static void -gl_media_select_class_init (glMediaSelectClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_media_select_destroy; - - media_select_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMediaSelectClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, media_select_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_media_select_init (glMediaSelect * media_select) -{ - media_select->page_size_entry = NULL; - media_select->template_entry = NULL; - - media_select->mini_preview = NULL; - - media_select->desc_label = NULL; - media_select->sheet_size_label = NULL; - media_select->number_label = NULL; - media_select->label_size_label = NULL; -} - -static void -gl_media_select_destroy (GtkObject * object) -{ - glMediaSelect *media_select; - glMediaSelectClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MEDIA_SELECT (object)); - - media_select = GL_MEDIA_SELECT (object); - class = GL_MEDIA_SELECT_CLASS (GTK_OBJECT (media_select)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_media_select_new (void) -{ - glMediaSelect *media_select; - - media_select = gtk_type_new (gl_media_select_get_type ()); - - gl_media_select_construct (media_select); - - return GTK_WIDGET (media_select); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_media_select_construct (glMediaSelect * media_select) -{ - GtkWidget *whbox, *wvbox, *wcombo, *wvbox1, *whbox1; - gchar *name; - GList *template_names, *page_sizes = NULL; - const gchar *page_size; - - page_size = gl_prefs_get_page_size (); - - wvbox = GTK_WIDGET (media_select); - - whbox = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (wvbox), whbox, TRUE, TRUE, GNOME_PAD); - - /* Page size selection control */ - wcombo = gtk_combo_new (); - page_sizes = g_list_append (page_sizes, "US-Letter"); - page_sizes = g_list_append (page_sizes, "A4"); - gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), page_sizes); - g_list_free (page_sizes); - media_select->page_size_entry = GTK_COMBO (wcombo)->entry; - gtk_entry_set_editable (GTK_ENTRY (media_select->page_size_entry), - FALSE); - gtk_widget_set_usize (media_select->page_size_entry, 100, 0); - gtk_entry_set_text (GTK_ENTRY (media_select->page_size_entry), - page_size); - gtk_box_pack_start (GTK_BOX (whbox), wcombo, FALSE, FALSE, GNOME_PAD); - - /* Actual selection control */ - template_names = gl_template_get_name_list (page_size); - media_select->template_combo = gtk_combo_new (); - gtk_combo_set_popdown_strings (GTK_COMBO (media_select->template_combo), - template_names); - gl_template_free_name_list (&template_names); - media_select->template_entry = - GTK_COMBO (media_select->template_combo)->entry; - gtk_entry_set_editable (GTK_ENTRY (media_select->template_entry), - FALSE); - gtk_widget_set_usize (media_select->template_entry, 400, 0); - gtk_box_pack_start (GTK_BOX (whbox), media_select->template_combo, - FALSE, FALSE, GNOME_PAD); - - whbox = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (wvbox), whbox, TRUE, TRUE, GNOME_PAD); - - /* mini_preview canvas */ - media_select->mini_preview = gl_mini_preview_new ( MINI_PREVIEW_HEIGHT, - MINI_PREVIEW_WIDTH); - gtk_box_pack_start (GTK_BOX (whbox), media_select->mini_preview, - FALSE, FALSE, GNOME_PAD); - - /* Label column */ - wvbox1 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox), wvbox1, FALSE, FALSE, 0); - - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), - gtk_label_new (_("Description:")), - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), - gtk_label_new (_("Page size:")), - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), - gtk_label_new (_("Label size:")), - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), - gtk_label_new (_("Layout:")), - FALSE, FALSE, GNOME_PAD); - - /* detail widgets column */ - wvbox1 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox), wvbox1, FALSE, FALSE, 0); - - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - media_select->desc_label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (whbox1), media_select->desc_label, - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - media_select->sheet_size_label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (whbox1), media_select->sheet_size_label, - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - media_select->label_size_label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (whbox1), media_select->label_size_label, - FALSE, FALSE, GNOME_PAD); - whbox1 = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (wvbox1), whbox1, FALSE, FALSE, 0); - media_select->number_label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (whbox1), media_select->number_label, - FALSE, FALSE, GNOME_PAD); - - /* Update mini_preview and details from default template */ - name = - gtk_editable_get_chars (GTK_EDITABLE (media_select->template_entry), - 0, -1); - gl_mini_preview_set_label (GL_MINI_PREVIEW (media_select->mini_preview), - name); - details_update (media_select, name); - g_free (name); - - /* Connect signals to controls */ - gtk_signal_connect (GTK_OBJECT (media_select->page_size_entry), - "changed", - GTK_SIGNAL_FUNC (page_size_entry_changed_cb), - media_select); - gtk_signal_connect (GTK_OBJECT (media_select->template_entry), - "changed", - GTK_SIGNAL_FUNC (template_entry_changed_cb), - media_select); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change in selection */ -/*--------------------------------------------------------------------------*/ -static void -page_size_entry_changed_cb (GtkEntry * entry, - gpointer user_data) -{ - glMediaSelect *media_select = GL_MEDIA_SELECT (user_data); - gchar *page_size; - GList *template_names; - - /* Update template selections for new page size */ - page_size = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); - template_names = gl_template_get_name_list (page_size); - gtk_combo_set_popdown_strings (GTK_COMBO (media_select->template_combo), - template_names); - gl_template_free_name_list (&template_names); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change in selection */ -/*--------------------------------------------------------------------------*/ -static void -template_entry_changed_cb (GtkEntry * entry, - gpointer user_data) -{ - glMediaSelect *media_select = GL_MEDIA_SELECT (user_data); - gchar *name; - - /* Update mini_preview canvas & details with template */ - name = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); - gl_mini_preview_set_label (GL_MINI_PREVIEW (media_select->mini_preview), - name); - details_update (media_select, name); - g_free (name); - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (user_data), media_select_signals[CHANGED]); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. update "details" widgets from new template. */ -/*--------------------------------------------------------------------------*/ -static void -details_update (glMediaSelect * media_select, - gchar * name) -{ - glTemplate *template; - gchar *text; - glPrefsUnits units; - const gchar *units_string; - gdouble units_per_point; - - units = gl_prefs_get_units (); - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - - /* Fetch template */ - template = gl_template_from_name (name); - - gtk_label_set_text (GTK_LABEL (media_select->desc_label), - template->description); - - gtk_label_set_text (GTK_LABEL (media_select->sheet_size_label), - template->page_size); - - text = g_strdup_printf (_("%d x %d (%d per sheet)"), - template->nx, template->ny, - template->nx * template->ny); - - gtk_label_set_text (GTK_LABEL (media_select->number_label), text); - g_free (text); - - if ( units == GL_PREFS_UNITS_INCHES ) { - gchar *xstr, *ystr; - - xstr = gl_util_fraction (template->label_height - * units_per_point); - ystr = gl_util_fraction (template->label_width - * units_per_point); - text = g_strdup_printf (_("%s x %s %s"), - xstr, ystr, units_string); - g_free (xstr); - g_free (ystr); - } else { - text = g_strdup_printf (_("%.5g x %.5g %s"), - template->label_height*units_per_point, - template->label_width*units_per_point, - units_string); - } - gtk_label_set_text (GTK_LABEL (media_select->label_size_label), text); - g_free (text); - - gl_template_free( &template ); -} - -/****************************************************************************/ -/* query selected label template name. */ -/****************************************************************************/ -gchar * -gl_media_select_get_name (glMediaSelect * media_select) -{ - return - gtk_editable_get_chars (GTK_EDITABLE (media_select->template_entry), - 0, -1); -} - -/****************************************************************************/ -/* set selected label template name. */ -/****************************************************************************/ -void -gl_media_select_set_name (glMediaSelect * media_select, - gchar * name) -{ - gint pos; - - gtk_signal_handler_block_by_func (GTK_OBJECT - (media_select->template_entry), - GTK_SIGNAL_FUNC - (template_entry_changed_cb), - media_select); - gtk_editable_delete_text (GTK_EDITABLE (media_select->template_entry), - 0, -1); - gtk_signal_handler_unblock_by_func (GTK_OBJECT - (media_select->template_entry), - GTK_SIGNAL_FUNC - (template_entry_changed_cb), - media_select); - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (media_select->template_entry), - name, strlen (name), &pos); -} - -/****************************************************************************/ -/* query selected label template page size. */ -/****************************************************************************/ -gchar * -gl_media_select_get_page_size (glMediaSelect * media_select) -{ - return - gtk_editable_get_chars (GTK_EDITABLE - (media_select->page_size_entry), 0, -1); -} - -/****************************************************************************/ -/* set selected label template page size. */ -/****************************************************************************/ -void -gl_media_select_set_page_size (glMediaSelect * media_select, - gchar * page_size) -{ - gint pos; - - gtk_signal_handler_block_by_func (GTK_OBJECT - (media_select->page_size_entry), - GTK_SIGNAL_FUNC - (page_size_entry_changed_cb), - media_select); - gtk_editable_delete_text (GTK_EDITABLE (media_select->page_size_entry), - 0, -1); - gtk_signal_handler_unblock_by_func (GTK_OBJECT - (media_select->page_size_entry), - GTK_SIGNAL_FUNC - (page_size_entry_changed_cb), - media_select); - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (media_select->page_size_entry), - page_size, strlen (page_size), &pos); -} diff --git a/glabels1/src/media_select.h b/glabels1/src/media_select.h deleted file mode 100644 index 4d4af21..0000000 --- a/glabels1/src/media_select.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * media_select.h: media selection widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __MEDIA_SELECT_H__ -#define __MEDIA_SELECT_H__ - -#include <gnome.h> - -#define GL_TYPE_MEDIA_SELECT (gl_media_select_get_type ()) -#define GL_MEDIA_SELECT(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MEDIA_SELECT, glMediaSelect )) -#define GL_MEDIA_SELECT_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MEDIA_SELECT, glMediaSelectClass)) -#define GL_IS_MEDIA_SELECT(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MEDIA_SELECT)) -#define GL_IS_MEDIA_SELECT_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MEDIA_SELECT)) - -typedef struct _glMediaSelect glMediaSelect; -typedef struct _glMediaSelectClass glMediaSelectClass; - -struct _glMediaSelect { - GtkVBox parent_widget; - - GtkWidget *page_size_entry; - GtkWidget *template_combo; - GtkWidget *template_entry; - - GtkWidget *mini_preview; - - GtkWidget *desc_label; - GtkWidget *sheet_size_label; - GtkWidget *number_label; - GtkWidget *label_size_label; -}; - -struct _glMediaSelectClass { - GtkVBoxClass parent_class; - - void (*changed) (glMediaSelect * media_select, gpointer user_data); -}; - -extern guint gl_media_select_get_type (void); - -extern GtkWidget *gl_media_select_new (void); - -extern gchar *gl_media_select_get_name (glMediaSelect * media_select); - -extern void gl_media_select_set_name (glMediaSelect * media_select, - gchar * name); - -extern gchar *gl_media_select_get_page_size (glMediaSelect * media_select); - -extern void gl_media_select_set_page_size (glMediaSelect * media_select, - gchar * page_size); - -#endif diff --git a/glabels1/src/menu.c b/glabels1/src/menu.c deleted file mode 100644 index 283e2f5..0000000 --- a/glabels1/src/menu.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * menu.c: Menu module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "menu.h" -#include "stock.h" -#include "file.h" -#include "print_dialog.h" -#include "edit.h" -#include "prefs.h" -#include "tools.h" - -#ifdef PACKAGE_DATA_DIR -#define LOGO_PIXMAP (PACKAGE_DATA_DIR "/pixmaps/glabels/glabels-about-logo.png") -#else -#define LOGO_PIXMAP gnome_pixmap_file("glabels/glabels-about-logo.png") -#endif - -/*===========================================*/ -/* Private function prototypes. */ -/*===========================================*/ -static void about_cb (GtkWidget * widget, gpointer data); -static void nothing_cb (GtkWidget * widget, gpointer data); - -/*===========================================*/ -/* Menu definitions */ -/*===========================================*/ - -static GnomeUIInfo menu_file[] = { - GNOMEUIINFO_MENU_NEW_ITEM (N_("_New"), - N_("Make a new, empty label"), - gl_file_new_cb, NULL), - - GNOMEUIINFO_MENU_OPEN_ITEM (gl_file_open_cb, NULL), - - GNOMEUIINFO_MENU_SAVE_ITEM (gl_file_save_cb, NULL), - - GNOMEUIINFO_MENU_SAVE_AS_ITEM (gl_file_save_as_cb, NULL), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_MENU_PRINT_ITEM (gl_print_dialog_cb, NULL), - - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_MENU_CLOSE_ITEM (gl_file_close_cb, NULL), - GNOMEUIINFO_MENU_EXIT_ITEM (gl_file_exit_cb, NULL), - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_edit[] = { -#ifdef UNDO_REDO - GNOMEUIINFO_MENU_UNDO_ITEM (nothing_cb, NULL), - GNOMEUIINFO_MENU_REDO_ITEM (nothing_cb, NULL), - - GNOMEUIINFO_SEPARATOR, -#endif - - GNOMEUIINFO_MENU_CUT_ITEM (gl_edit_cut_cb, NULL), - GNOMEUIINFO_MENU_COPY_ITEM (gl_edit_copy_cb, NULL), - GNOMEUIINFO_MENU_PASTE_ITEM (gl_edit_paste_cb, NULL), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_MENU_SELECT_ALL_ITEM (gl_edit_select_all_cb, NULL), - GNOMEUIINFO_ITEM_NONE (N_("U_nselect All "), - N_("Remove all selections"), - gl_edit_unselect_cb), - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_tools[] = { - - GNOMEUIINFO_ITEM_STOCK (N_("Select"), - N_("Select, move and modify objects"), - gl_tools_arrow_cb, GL_STOCK_PIXMAP_ARROW), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_NONE (N_("Text"), N_("Create text object"), - gl_tools_text_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Box"), N_("Create box/rectangle object"), - gl_tools_box_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Line"), N_("Create line object"), - gl_tools_line_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Ellipse"), - N_("Create ellipse/circle object"), - gl_tools_ellipse_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Image"), N_("Create image object"), - gl_tools_image_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Barcode"), N_("Create barcode object"), - gl_tools_barcode_cb), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_NONE (N_("Zoom in"), N_("Zoom in"), - gl_tools_zoomin_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Zoom out"), N_("Zoom out"), - gl_tools_zoomout_cb), - - GNOMEUIINFO_ITEM_NONE (N_("Zoom 1:1"), N_("Zoom to 1:1"), - gl_tools_zoom1to1_cb), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_NONE (N_("Merge properties"), - N_("Edit merge properties"), - gl_tools_merge_properties_cb), - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_settings[] = { - GNOMEUIINFO_MENU_PREFERENCES_ITEM (gl_prefs_cb, NULL), - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_windows[] = { - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_help[] = { - GNOMEUIINFO_HELP ("glabels"), - GNOMEUIINFO_MENU_ABOUT_ITEM (about_cb, NULL), - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_main[] = { - GNOMEUIINFO_MENU_FILE_TREE (menu_file), - GNOMEUIINFO_MENU_EDIT_TREE (menu_edit), - GNOMEUIINFO_SUBTREE (N_("_Tools"), menu_tools), - GNOMEUIINFO_MENU_SETTINGS_TREE (menu_settings), - GNOMEUIINFO_MENU_WINDOWS_TREE (menu_windows), - GNOMEUIINFO_MENU_HELP_TREE (menu_help), - GNOMEUIINFO_END -}; - -/*===========================================*/ -/* Toolbar definitions */ -/*===========================================*/ -static GnomeUIInfo toolbar[] = { - GNOMEUIINFO_ITEM_STOCK (N_(" New "), N_("New Label/Card"), - gl_file_new_cb, GNOME_STOCK_PIXMAP_NEW), - GNOMEUIINFO_ITEM_STOCK (N_(" Open "), N_("Open a file"), - gl_file_open_cb, GNOME_STOCK_PIXMAP_OPEN), - GNOMEUIINFO_ITEM_STOCK (N_(" Save "), N_("Save current file"), - gl_file_save_cb, GNOME_STOCK_PIXMAP_SAVE), - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_ITEM_STOCK (N_(" Print "), N_("Print current file"), - gl_print_dialog_cb, GNOME_STOCK_PIXMAP_PRINT), - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_END -}; - -/*****************************************************************************/ -/* Drawing tools toolbar definitions */ -/*****************************************************************************/ -static GnomeUIInfo tools_toolbar[] = { - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Select, move and modify objects"), - gl_tools_arrow_cb, GL_STOCK_PIXMAP_ARROW), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create text object"), - gl_tools_text_cb, GL_STOCK_PIXMAP_TEXT), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create box/rectangle object"), - gl_tools_box_cb, GL_STOCK_PIXMAP_BOX), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create line object"), - gl_tools_line_cb, GL_STOCK_PIXMAP_LINE), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create ellipse/circle object"), - gl_tools_ellipse_cb, GL_STOCK_PIXMAP_ELLIPSE), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create image object"), - gl_tools_image_cb, GL_STOCK_PIXMAP_IMAGE), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Create barcode object"), - gl_tools_barcode_cb, GL_STOCK_PIXMAP_BARCODE), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Zoom in"), - gl_tools_zoomin_cb, GL_STOCK_PIXMAP_ZOOMIN), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Zoom out"), - gl_tools_zoomout_cb, GL_STOCK_PIXMAP_ZOOMOUT), - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Zoom to 1:1"), - gl_tools_zoom1to1_cb, - GL_STOCK_PIXMAP_ZOOM1TO1), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (NULL, N_("Merge properties"), - gl_tools_merge_properties_cb, - GL_STOCK_PIXMAP_MERGE), - - GNOMEUIINFO_END -}; - - -/****************************************************************************/ -/* Install menus templates in mdi. */ -/****************************************************************************/ -void -gl_menu_install_menus (GnomeMDI * mdi) -{ - gnome_mdi_set_menubar_template (mdi, menu_main); - gnome_mdi_set_child_list_path (mdi, GNOME_MENU_WINDOWS_PATH); -} - -/****************************************************************************/ -/* Install toolbar in application window. */ -/****************************************************************************/ -void -gl_menu_install_toolbar (GnomeMDI * mdi) -{ - gnome_mdi_set_toolbar_template (mdi, toolbar); -} - -/*****************************************************************************/ -/* Install drawing tools toolbar in application window. */ -/*****************************************************************************/ -void -gl_menu_install_tools_toolbar (GnomeMDI * mdi, - GnomeApp * app) -{ - GtkWidget *toolbar; - - toolbar = gtk_toolbar_new (GTK_ORIENTATION_VERTICAL, - GTK_TOOLBAR_ICONS); - - gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar), tools_toolbar, - NULL, mdi); - gnome_app_add_toolbar (GNOME_APP (app), GTK_TOOLBAR (toolbar), - "ToolsToolbar", GNOME_DOCK_ITEM_BEH_NORMAL, - GNOME_DOCK_LEFT, 1, 1, 0); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE about menu callback. */ -/*--------------------------------------------------------------------------*/ -static void -about_cb (GtkWidget * widget, - gpointer data) -{ - static GtkWidget *dialog = NULL; - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - - if (dialog != NULL) { - g_assert (GTK_WIDGET_REALIZED (dialog)); - gdk_window_show (dialog->window); - gdk_window_raise (dialog->window); - } else { - const gchar *authors[] = { - "Jim Evins <evins@snaught.com>", - NULL - }; - gchar *copy_text = "Copyright 2001 Jim Evins"; - gchar *about_text = - _("A label and business card creation program for GNOME.\n" - " \n" - "Glabels 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.\n" " \n" - "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.\n"); - - dialog = gnome_about_new ("glabels", VERSION, - copy_text, authors, about_text, - LOGO_PIXMAP); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (app)); - - gtk_signal_connect (GTK_OBJECT (dialog), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &dialog); - - gtk_widget_show (dialog); - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. place-holder callback. */ -/*--------------------------------------------------------------------------*/ -static void -nothing_cb (GtkWidget * widget, - gpointer data) -{ - GtkWidget *dialog; - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - - dialog = gnome_ok_dialog (_("Function is not implemented!")); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (app)); -} diff --git a/glabels1/src/menu.h b/glabels1/src/menu.h deleted file mode 100644 index 01e119d..0000000 --- a/glabels1/src/menu.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * menu.h: Menu module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MENU_H__ -#define __MENU_H__ - -#include <gnome.h> - -extern void gl_menu_install_menus (GnomeMDI * mdi); -extern void gl_menu_install_toolbar (GnomeMDI * mdi); -extern void gl_menu_install_tools_toolbar (GnomeMDI * mdi, GnomeApp * app); - - -#endif diff --git a/glabels1/src/merge.c b/glabels1/src/merge.c deleted file mode 100644 index 603ae25..0000000 --- a/glabels1/src/merge.c +++ /dev/null @@ -1,460 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge.c: document merge module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> - -#include "merge.h" -#include "merge_text.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ -typedef struct { - gchar *short_text; - gchar *long_text; -} TypeTexts; - -typedef struct { - - glMergeInput * (*open) (glMergeType, GList *, gchar *); - void (*close) (glMergeInput *); - glMergeRecord * (*get_record) (glMergeInput *); - GList * (*get_raw_record) (glMergeInput *); - -} BackendFunctions; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static TypeTexts type_text[GL_MERGE_N_TYPES]; - -static BackendFunctions func[GL_MERGE_N_TYPES]; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*****************************************************************************/ -/* Initialize module. */ -/*****************************************************************************/ -void -gl_merge_init (void) -{ - gint i; - - /* Register backend functions and data. */ - - i = GL_MERGE_NONE; - func[i].open = NULL; - func[i].close = NULL; - func[i].get_record = NULL; - func[i].get_raw_record = NULL; - type_text[i].short_text = "None"; - type_text[i].long_text = _("None"); - - i = GL_MERGE_TEXT_TAB; - func[i].open = gl_merge_text_open; - func[i].close = gl_merge_text_close; - func[i].get_record = gl_merge_text_get_record; - func[i].get_raw_record = gl_merge_text_get_raw_record; - type_text[i].short_text = "Text/Tab"; - type_text[i].long_text = _("Text with tab separators"); - - i = GL_MERGE_TEXT_COMMA; - func[i].open = gl_merge_text_open; - func[i].close = gl_merge_text_close; - func[i].get_record = gl_merge_text_get_record; - func[i].get_raw_record = gl_merge_text_get_raw_record; - type_text[i].short_text = "Text/Comma"; - type_text[i].long_text = _("Text with comma separators (CSV)"); - - i = GL_MERGE_TEXT_COLON; - func[i].open = gl_merge_text_open; - func[i].close = gl_merge_text_close; - func[i].get_record = gl_merge_text_get_record; - func[i].get_raw_record = gl_merge_text_get_raw_record; - type_text[i].short_text = "Text/Colon"; - type_text[i].long_text = _("Text with colon separators"); - -} - -/*****************************************************************************/ -/* Lookup type from short text. */ -/*****************************************************************************/ -glMergeType -gl_merge_text_to_type (gchar * text) -{ - glMergeType type; - - for (type = 0; type < GL_MERGE_N_TYPES; type++) { - if (g_strcasecmp (text, type_text[type].short_text) == 0) { - return type; - } - } - - return GL_MERGE_NONE; - -} - -/*****************************************************************************/ -/* Lookup short text for given type. */ -/*****************************************************************************/ -gchar * -gl_merge_type_to_text (glMergeType type) -{ - return g_strdup (type_text[type].short_text); -} - -/*****************************************************************************/ -/* Lookup type from long descriptive text. */ -/*****************************************************************************/ -glMergeType -gl_merge_long_text_to_type (gchar * text) -{ - glMergeType type; - - for (type = 0; type < GL_MERGE_N_TYPES; type++) { - if (g_strcasecmp (text, type_text[type].long_text) == 0) { - return type; - } - } - - return GL_MERGE_NONE; -} - -/*****************************************************************************/ -/* Lookup longer, more descriptive text for given type. */ -/*****************************************************************************/ -gchar * -gl_merge_type_to_long_text (glMergeType type) -{ - return g_strdup (type_text[type].long_text); -} - -/*****************************************************************************/ -/* Retrieve a list of descriptive texts for all available types. */ -/*****************************************************************************/ -GList * -gl_merge_get_long_texts_list (void) -{ - glMergeType type; - GList *list = NULL; - - for (type = 0; type < GL_MERGE_N_TYPES; type++) { - - list = g_list_append (list, gl_merge_type_to_long_text (type)); - - } - - return list; -} - -/*****************************************************************************/ -/* Free list of descriptive texts. */ -/*****************************************************************************/ -void -gl_merge_free_long_texts_list (GList ** list) -{ - GList *p; - - for (p = *list; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (*list); - *list = NULL; -} - -/*****************************************************************************/ -/* Free list of field definitions. */ -/*****************************************************************************/ -void -gl_merge_free_field_def_list (GList ** list) -{ - GList *p; - glMergeFieldDefinition *field_def; - - for (p = *list; p != NULL; p = p->next) { - field_def = (glMergeFieldDefinition *) p->data; - - g_free (field_def->key); - field_def->key = NULL; - g_free (field_def->loc); - field_def->loc = NULL; - - g_free (p->data); - p->data = NULL; - } - - g_list_free (*list); - *list = NULL; - -} - -/*****************************************************************************/ -/* Extract a list of valid keys from field definitions list */ -/*****************************************************************************/ -GList * -gl_merge_get_key_list (GList * field_defs) -{ - GList *p, *keys; - glMergeFieldDefinition *field_def; - - keys = NULL; - for (p = field_defs; p != NULL; p = p->next) { - field_def = (glMergeFieldDefinition *) p->data; - - keys = g_list_append (keys, g_strdup (field_def->key)); - } - - return keys; -} - -/*****************************************************************************/ -/* Free a list of keys. */ -/*****************************************************************************/ -void -gl_merge_free_key_list (GList ** keys) -{ - GList *p; - - for (p = *keys; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (*keys); - *keys = NULL; -} - -/*****************************************************************************/ -/* Lookup key for given locator. */ -/*****************************************************************************/ -gchar * -gl_merge_find_key (GList * field_defs, - gchar * loc) -{ - GList *p; - glMergeFieldDefinition *field_def; - - for (p = field_defs; p != NULL; p = p->next) { - field_def = (glMergeFieldDefinition *) p->data; - - if (strcmp (loc, field_def->loc) == 0) { - return g_strdup (field_def->key); - } - - } - - return NULL; -} - -/*****************************************************************************/ -/* Open merge source front-end. */ -/*****************************************************************************/ -glMergeInput * -gl_merge_open (glMergeType type, - GList * field_defs, - gchar * src) -{ - return func[type].open (type, field_defs, src); -} - -/*****************************************************************************/ -/* Close merge source front-end. */ -/*****************************************************************************/ -void -gl_merge_close (glMergeInput * input) -{ - if ( input != NULL ) { - func[input->type].close (input); - } -} - -/*****************************************************************************/ -/* Get next record from merge source, NULL if exhausted (front-end). */ -/*****************************************************************************/ -glMergeRecord * -gl_merge_get_record (glMergeInput * input) -{ - if ( input == NULL ) { - return NULL; - } - return func[input->type].get_record (input); -} - -/*****************************************************************************/ -/* Get next record (raw) from merge source, NULL if exhausted (front-end). */ -/*****************************************************************************/ -GList * -gl_merge_get_raw_record (glMergeInput * input) -{ - if ( input == NULL ) { - return NULL; - } - return func[input->type].get_raw_record (input); -} - -/*****************************************************************************/ -/* Free a merge record (list of fields) */ -/*****************************************************************************/ -void -gl_merge_free_record (glMergeRecord ** record) -{ - GList *p; - glMergeField *field; - - for (p = (*record)->field_list; p != NULL; p = p->next) { - field = (glMergeField *) p->data; - - g_free (field->key); - field->key = NULL; - g_free (field->value); - field->value = NULL; - - g_free (p->data); - p->data = NULL; - - } - g_list_free ((*record)->field_list); - (*record)->field_list = NULL; - - g_free (*record); - *record = NULL; -} - -/*****************************************************************************/ -/* Free a merge record (list of fields) */ -/*****************************************************************************/ -void -gl_merge_free_raw_record (GList ** record) -{ - GList *p; - glMergeRawField *field; - - for (p = *record; p != NULL; p = p->next) { - field = (glMergeRawField *) p->data; - - g_free (field->loc); - field->loc = NULL; - g_free (field->value); - field->value = NULL; - - g_free (p->data); - p->data = NULL; - - } - - g_list_free (*record); - *record = NULL; -} - -/*****************************************************************************/ -/* Find key in given record and evaluate. */ -/*****************************************************************************/ -extern gchar * -gl_merge_eval_key (gchar * key, - glMergeRecord * record) -{ - GList *p; - glMergeField *field; - - if ( record != NULL ) { - for (p = record->field_list; p != NULL; p = p->next) { - field = (glMergeField *) p->data; - - if (strcmp (key, field->key) == 0) { - return g_strdup (field->value); - } - - } - } - return NULL; -} - -/*****************************************************************************/ -/* Read all records from merge source. */ -/*****************************************************************************/ -GList * -gl_merge_read_data(glMergeType type, - GList *field_defs, - gchar *src) -{ - glMergeInput *mp; - glMergeRecord *record; - GList *record_list = NULL; - - mp = gl_merge_open (type, field_defs, src); - while ( (record = gl_merge_get_record (mp)) != NULL ) { - record_list = g_list_append( record_list, record ); - } - gl_merge_close(mp); - - return record_list; -} - -/*****************************************************************************/ -/* Free a list of records. */ -/*****************************************************************************/ -void -gl_merge_free_data (GList ** record_list) -{ - GList *p; - glMergeRecord *record; - - for (p = *record_list; p != NULL; p = p->next) { - record = (glMergeRecord *) p->data; - - gl_merge_free_record( &record ); - - } - - g_list_free (*record_list); - *record_list = NULL; -} - -/*****************************************************************************/ -/* Count selected records. */ -/*****************************************************************************/ -gint -gl_merge_count_records (GList *record_list) -{ - GList *p; - glMergeRecord *record; - gint count; - - count = 0; - for ( p=record_list; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) count ++; - } - return count; -} - diff --git a/glabels1/src/merge.h b/glabels1/src/merge.h deleted file mode 100644 index ce87019..0000000 --- a/glabels1/src/merge.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge.h: document merge module header file - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MERGE_H__ -#define __MERGE_H__ - -#include <glib.h> - -typedef enum { - - GL_MERGE_NONE, - GL_MERGE_TEXT_TAB, - GL_MERGE_TEXT_COMMA, - GL_MERGE_TEXT_COLON, - - GL_MERGE_N_TYPES -} glMergeType; - -typedef struct { - glMergeType type; - GList *field_defs; - gpointer handle; -} glMergeInput; - -typedef struct { - gchar *key; - gchar *loc; -} glMergeFieldDefinition; - -typedef struct { - gchar *loc; - gchar *value; -} glMergeRawField; - -typedef struct { - gchar *key; - gchar *value; -} glMergeField; - -typedef struct { - gboolean select_flag; - GList *field_list; /* List of glMergeFields */ -} glMergeRecord; - -extern void - gl_merge_init (void); - -extern glMergeType gl_merge_text_to_type (gchar * text); -extern gchar *gl_merge_type_to_text (glMergeType type); -extern glMergeType gl_merge_long_text_to_type (gchar * text); -extern gchar *gl_merge_type_to_long_text (glMergeType type); -extern GList *gl_merge_get_long_texts_list (void); -extern void gl_merge_free_long_texts_list (GList ** list); - -extern void gl_merge_free_field_def_list (GList ** field_defs); - -extern GList *gl_merge_get_key_list (GList * field_defs); -extern void gl_merge_free_key_list (GList ** keys); - -extern gchar *gl_merge_find_key (GList * field_defs, gchar * loc); - -extern glMergeInput *gl_merge_open (glMergeType type, GList * field_defs, - gchar * src); -extern void gl_merge_close (glMergeInput * input); -extern glMergeRecord *gl_merge_get_record (glMergeInput * input); -extern GList *gl_merge_get_raw_record (glMergeInput * input); -extern void gl_merge_free_record (glMergeRecord ** record); -extern void gl_merge_free_raw_record (GList ** record); -extern gchar *gl_merge_eval_key (gchar * key, glMergeRecord * record); - -extern GList *gl_merge_read_data (glMergeType type, GList * field_defs, - gchar * src); -extern void gl_merge_free_data (GList **record_list); -extern gint gl_merge_count_records (GList *record_list); - -#endif diff --git a/glabels1/src/merge_properties.c b/glabels1/src/merge_properties.c deleted file mode 100644 index a2fc1c2..0000000 --- a/glabels1/src/merge_properties.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_properties.c: document merge properties dialog module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include "mdi.h" -#include "display.h" -#include "merge.h" -#include "merge_ui.h" -#include "merge_properties.h" - -#include "debug.h" - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef struct { - GtkWidget *dialog; - - glDisplay *display; - glLabel *label; - gchar *name; - - GtkWidget *type_entry; - GtkWidget *src_entry; - GtkWidget *field_ws; - - glMergeType src_type; - gchar *field_ws_src; - -} PropertyDialogPassback; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void create_merge_dialog_widgets (GnomeDialog * dialog, - PropertyDialogPassback * data); - -static void type_changed_cb (GtkWidget * widget, PropertyDialogPassback * data); -static void src_changed_cb (GtkWidget * widget, PropertyDialogPassback * data); - -static void ok_cb (GtkWidget * widget, PropertyDialogPassback * data); - -/****************************************************************************/ -/* Launch merge properties dialog. */ -/****************************************************************************/ -void -gl_merge_properties_dialog (glDisplay * display, - gchar * basename) -{ - static PropertyDialogPassback *data = NULL; - GtkWidget *dialog; - - if (data == NULL) { - data = g_new0 (PropertyDialogPassback, 1); - } - - dialog = gnome_dialog_new (_("Edit document-merge properties"), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, NULL); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (gl_mdi_get_active_window ())); - - data->dialog = dialog; - data->display = display; - data->label = display->label; - data->name = basename; - - data->type_entry = NULL; - data->src_entry = NULL; - data->field_ws = NULL; - - create_merge_dialog_widgets (GNOME_DIALOG (dialog), data); - - gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0, - GTK_SIGNAL_FUNC (ok_cb), data); - - gnome_dialog_button_connect_object (GNOME_DIALOG (dialog), 1, - GTK_SIGNAL_FUNC - (gtk_widget_destroy), - GTK_OBJECT (dialog)); - - gtk_widget_show_all (GTK_WIDGET (dialog)); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create and add start page to druid. */ -/*--------------------------------------------------------------------------*/ -static void -create_merge_dialog_widgets (GnomeDialog * dialog, - PropertyDialogPassback * data) -{ - GtkWidget *wvbox, *wframe, *whbox, *wtable, *wlabel, *wcombo, *wscroll; - GList *texts; - glMergeType type; - gchar *src; - GList *fields; - - type = data->label->merge_type; - src = data->label->merge_src; - fields = data->label->merge_fields; - - wvbox = dialog->vbox; - - wframe = gtk_frame_new (_("Source")); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - whbox = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_container_add (GTK_CONTAINER (wframe), whbox); - - wtable = gtk_table_new (2, 2, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_box_pack_start (GTK_BOX (whbox), wtable, FALSE, FALSE, GNOME_PAD); - - wlabel = gtk_label_new (_("Format:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - - wcombo = gtk_combo_new (); - gtk_widget_set_usize (wcombo, 400, -1); - texts = gl_merge_get_long_texts_list (); - gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), texts); - gl_merge_free_long_texts_list (&texts); - data->type_entry = GTK_COMBO (wcombo)->entry; - gtk_entry_set_editable (GTK_ENTRY (data->type_entry), FALSE); - gtk_table_attach_defaults (GTK_TABLE (wtable), wcombo, 1, 2, 0, 1); - gtk_entry_set_text (GTK_ENTRY (data->type_entry), - gl_merge_type_to_long_text (type)); - - wlabel = gtk_label_new (_("Location:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - - data->src_entry = gl_merge_ui_src_new (); - gtk_table_attach_defaults (GTK_TABLE (wtable), data->src_entry, 1, 2, 1, - 2); - gl_merge_ui_src_set_type (GL_MERGE_UI_SRC (data->src_entry), type); - gl_merge_ui_src_set_value (GL_MERGE_UI_SRC (data->src_entry), src); - - wframe = gtk_frame_new (_("Fields")); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wscroll = gtk_scrolled_window_new (NULL, NULL); - gtk_container_set_border_width (GTK_CONTAINER (wscroll), 5); - gtk_widget_set_usize (wscroll, 500, 300); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (wscroll), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_add (GTK_CONTAINER (wframe), wscroll); - - data->field_ws = gl_merge_ui_field_ws_new (); - gtk_container_set_border_width (GTK_CONTAINER (data->field_ws), 10); - gl_merge_ui_field_ws_set_type_src (GL_MERGE_UI_FIELD_WS - (data->field_ws), type, src); - gl_merge_ui_field_ws_set_field_defs (GL_MERGE_UI_FIELD_WS - (data->field_ws), fields); - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (wscroll), - data->field_ws); - - gtk_signal_connect (GTK_OBJECT (data->type_entry), "changed", - GTK_SIGNAL_FUNC (type_changed_cb), data); - gtk_signal_connect (GTK_OBJECT (data->src_entry), "changed", - GTK_SIGNAL_FUNC (src_changed_cb), data); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. type "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -type_changed_cb (GtkWidget * widget, - PropertyDialogPassback * data) -{ - glMergeType type; - gchar *type_text; - - type_text = gtk_editable_get_chars (GTK_EDITABLE (data->type_entry), - 0, -1); - type = gl_merge_long_text_to_type (type_text); - g_free (type_text); - - gl_merge_ui_src_set_type (GL_MERGE_UI_SRC (data->src_entry), type); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. source "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -src_changed_cb (GtkWidget * widget, - PropertyDialogPassback * data) -{ - glMergeType type; - gchar *type_text, *src; - - type_text = gtk_editable_get_chars (GTK_EDITABLE (data->type_entry), - 0, -1); - type = gl_merge_long_text_to_type (type_text); - g_free (type_text); - - src = gl_merge_ui_src_get_value (GL_MERGE_UI_SRC (data->src_entry)); - gl_merge_ui_field_ws_set_type_src (GL_MERGE_UI_FIELD_WS - (data->field_ws), type, src); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "OK" callback. */ -/*--------------------------------------------------------------------------*/ -static void -ok_cb (GtkWidget * widget, - PropertyDialogPassback * data) -{ - gchar *type_text; - - type_text = gtk_editable_get_chars (GTK_EDITABLE (data->type_entry), - 0, -1); - data->label->merge_type = gl_merge_long_text_to_type (type_text); - g_free (type_text); - - data->label->merge_src = - gl_merge_ui_src_get_value (GL_MERGE_UI_SRC (data->src_entry)); - - gl_merge_free_field_def_list (&data->label->merge_fields); - data->label->merge_fields = - gl_merge_ui_field_ws_get_field_defs (GL_MERGE_UI_FIELD_WS - (data->field_ws)); - - gl_display_set_modified (data->display); - - gtk_widget_destroy (data->dialog); -} diff --git a/glabels1/src/merge_properties.h b/glabels1/src/merge_properties.h deleted file mode 100644 index ba13439..0000000 --- a/glabels1/src/merge_properties.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_properties.h: document merge properties dialog module header file - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MERGE_PROPERTIES_H__ -#define __MERGE_PROPERTIES_H__ - -#include <gnome.h> - -extern void gl_merge_properties_dialog (glDisplay * display, gchar * basename); - -#endif diff --git a/glabels1/src/merge_text.c b/glabels1/src/merge_text.c deleted file mode 100644 index c39b05b..0000000 --- a/glabels1/src/merge_text.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_text.c: text-file merge backend module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <gnome.h> - -#include "merge_text.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static GList * parse_line ( FILE *handle, gchar delim ); -static void free_fields( GList **fields ); - - -/****************************************************************************/ -/* Open merge source. */ -/****************************************************************************/ -glMergeInput * -gl_merge_text_open (glMergeType type, - GList * field_defs, - gchar * src) -{ - FILE *fp; - glMergeInput *input; - - fp = fopen (src, "r"); - if (fp == NULL) { - return NULL; - } - - input = g_new0 (glMergeInput, 1); - input->type = type; - input->field_defs = field_defs; - input->handle = fp; - - return input; -} - -/****************************************************************************/ -/* Close merge source. */ -/****************************************************************************/ -void -gl_merge_text_close (glMergeInput * input) -{ - if (input != NULL) { - - fclose ((FILE *) input->handle); - g_free (input); - - } -} - -/****************************************************************************/ -/* Get next record from merge source, NULL if no records left (i.e EOF) */ -/****************************************************************************/ -glMergeRecord * -gl_merge_text_get_record (glMergeInput * input) -{ - gchar *loc; - GList *fields, *p; - gint i_field; - glMergeRecord *record = NULL; - glMergeField *field; - - if (input != NULL) { - - switch (input->type) { - case GL_MERGE_TEXT_TAB: - fields = parse_line( input->handle, '\t' ); - break; - case GL_MERGE_TEXT_COLON: - fields = parse_line( input->handle, ':' ); - break; - case GL_MERGE_TEXT_COMMA: - fields = parse_line( input->handle, ',' ); - break; - default: - WARN ("Unexpected merge type"); - return NULL; - } - - if ( fields != NULL ) { - record = g_new0 (glMergeRecord, 1); - record->select_flag = TRUE; - i_field = 1; - for (p=fields; p != NULL; p=p->next) { - loc = g_strdup_printf ("%d", i_field++); - field = g_new0 (glMergeField, 1); - field->value = g_strdup (p->data); - field->key = gl_merge_find_key (input->field_defs, loc); - record->field_list = g_list_append (record->field_list, field); - g_free (loc); - } - free_fields (&fields); - return record; - } - - } - return NULL; -} - -/****************************************************************************/ -/* Retrieve a list of raw fields (columns in this case) */ -/****************************************************************************/ -GList * -gl_merge_text_get_raw_record (glMergeInput * input) -{ - GList *list = NULL; - GList *fields, *p; - gint i_field; - glMergeRawField *raw_field; - - if (input != NULL) { - - switch (input->type) { - case GL_MERGE_TEXT_TAB: - fields = parse_line( input->handle, '\t' ); - break; - case GL_MERGE_TEXT_COLON: - fields = parse_line( input->handle, ':' ); - break; - case GL_MERGE_TEXT_COMMA: - fields = parse_line( input->handle, ',' ); - break; - default: - WARN ("Unexpected merge type"); - return NULL; - } - - if ( fields != NULL ) { - i_field = 1; - for (p=fields; p != NULL; p=p->next) { - raw_field = g_new0 (glMergeRawField, 1); - raw_field->loc = g_strdup_printf ("%d", - i_field++); - raw_field->value = g_strdup (p->data); - list = g_list_append (list, raw_field); - } - free_fields (&fields); - } - - } - return list; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Parse line (quoted values may span multiple lines). */ -/*---------------------------------------------------------------------------*/ -static GList * parse_line ( FILE *handle, - gchar delim ) -{ - GList *list = NULL; - GString *string; - gint c; - enum { BEGIN, NORMAL, NORMAL_ESCAPED, - QUOTED, QUOTED_ESCAPED, QUOTED_QUOTE1, - DONE } state; - - state = BEGIN; - string = g_string_new( "" ); - while ( state != DONE ) { - c=getc (handle); - - switch (state) { - - case BEGIN: - switch (c) { - case '\\': - state = NORMAL_ESCAPED; - break; - case '"': - state = QUOTED; - break; - case '\r': - /* Strip CR. */ - state = NORMAL; - break; - case '\n': - case EOF: - state = DONE; - break; - default: - if ( c != delim ) { - string = g_string_append_c (string, c); - } else { - list = g_list_append (list, - g_strdup (string->str)); - string = g_string_assign( string, "" ); - } - state = NORMAL; - break; - } - break; - - case NORMAL: - switch (c) { - case '\\': - state = NORMAL_ESCAPED; - break; - case '"': - state = QUOTED; - break; - case '\r': - /* Strip CR. */ - break; - case '\n': - case EOF: - list = g_list_append (list, - g_strdup (string->str)); - state = DONE; - break; - default: - if ( c != delim ) { - string = g_string_append_c (string, c); - } else { - list = g_list_append (list, - g_strdup (string->str)); - string = g_string_assign( string, "" ); - } - break; - } - break; - - case NORMAL_ESCAPED: - switch (c) { - case 'n': - string = g_string_append_c (string, '\n'); - state = NORMAL; - break; - case 't': - string = g_string_append_c (string, '\t'); - state = NORMAL; - break; - case '\r': - /* Strip CR, stay ESCAPED. */ - break; - case EOF: - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = NORMAL; - break; - } - break; - - case QUOTED: - switch (c) { - case '\\': - state = QUOTED_ESCAPED; - break; - case '"': - state = QUOTED_QUOTE1; - break; - case '\r': - /* Strip CR. */ - break; - case EOF: - /* File ended mid way through quoted item */ - list = g_list_append (list, - g_strdup (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - break; - } - break; - - case QUOTED_ESCAPED: - switch (c) { - case 'n': - string = g_string_append_c (string, '\n'); - state = QUOTED; - break; - case 't': - string = g_string_append_c (string, '\t'); - state = QUOTED; - break; - case '\r': - /* Strip CR, stay ESCAPED. */ - break; - case EOF: - /* File ended mid way through quoted item */ - list = g_list_append (list, - g_strdup (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = QUOTED; - break; - } - break; - - case QUOTED_QUOTE1: - switch (c) { - case '"': - /* insert quotes in string, stay quoted. */ - string = g_string_append_c (string, c); - state = QUOTED; - break; - case '\r': - /* Strip CR, return to NORMAL. */ - state = NORMAL; - break; - case '\n': - case EOF: - /* line or file ended after quoted item */ - list = g_list_append (list, - g_strdup (string->str)); - state = DONE; - break; - default: - if ( c != delim ) { - string = g_string_append_c (string, c); - } else { - list = g_list_append (list, - g_strdup (string->str)); - string = g_string_assign( string, "" ); - } - state = NORMAL; - break; - } - break; - - default: - g_assert_not_reached(); - break; - } - - } - g_string_free( string, TRUE ); - - return list; -} - -/*---------------------------------------------------------------------------*/ -/* Free list of fields. */ -/*---------------------------------------------------------------------------*/ -void -free_fields (GList ** list) -{ - GList *p; - - for (p = *list; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (*list); - *list = NULL; -} - diff --git a/glabels1/src/merge_text.h b/glabels1/src/merge_text.h deleted file mode 100644 index b1dddef..0000000 --- a/glabels1/src/merge_text.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_text.h: text-file merge backend module header file - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MERGE_TEXT_H__ -#define __MERGE_TEXT_H__ - -#include <gtk/gtk.h> - -#include "merge.h" - -extern glMergeInput *gl_merge_text_open (glMergeType type, GList * field_defs, - gchar * src); -extern void gl_merge_text_close (glMergeInput * input); -extern glMergeRecord *gl_merge_text_get_record (glMergeInput * input); -extern GList *gl_merge_text_get_raw_record (glMergeInput * input); - -#endif diff --git a/glabels1/src/merge_ui.c b/glabels1/src/merge_ui.c deleted file mode 100644 index fb42254..0000000 --- a/glabels1/src/merge_ui.c +++ /dev/null @@ -1,498 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_ui.c: document merge user interface module - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include "merge_ui.h" - -/* Backends */ -#include "merge_ui_text.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef struct { - - GtkWidget * (*src_new) (glMergeType); - void (*src_set_value) (); - gchar * (*src_get_value) (); - - GtkWidget * (*field_ws_new) (glMergeType, gchar *); - void (*field_ws_set_field_defs) (); - GList * (*field_ws_get_field_defs) (); - -} BackendFunctions; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint merge_ui_src_signals[LAST_SIGNAL] = { 0 }; -static gint merge_ui_field_ws_signals[LAST_SIGNAL] = { 0 }; - -static BackendFunctions func[GL_MERGE_N_TYPES]; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_ui_src_class_init (glMergeUISrcClass * class); -static void gl_merge_ui_src_init (glMergeUISrc * src); -static void gl_merge_ui_src_destroy (GtkObject * object); - -static void src_changed_cb (glMergeUISrc * src); - -static void gl_merge_ui_field_ws_class_init (glMergeUIFieldWSClass * class); -static void gl_merge_ui_field_ws_init (glMergeUIFieldWS * field_ws); -static void gl_merge_ui_field_ws_destroy (GtkObject * object); - -static void field_ws_changed_cb (glMergeUIFieldWS * field_ws); - -/*****************************************************************************/ -/* Initialize module. */ -/*****************************************************************************/ -void -gl_merge_ui_init (void) -{ - gint i; - - /* Register backend functions. */ - - i = GL_MERGE_NONE; - func[i].src_new = NULL; - func[i].src_set_value = NULL; - func[i].src_get_value = NULL; - func[i].field_ws_new = NULL; - func[i].field_ws_set_field_defs = NULL; - func[i].field_ws_get_field_defs = NULL; - - i = GL_MERGE_TEXT_TAB; - func[i].src_new = gl_merge_ui_text_src_new; - func[i].src_set_value = gl_merge_ui_text_src_set_value; - func[i].src_get_value = gl_merge_ui_text_src_get_value; - func[i].field_ws_new = gl_merge_ui_text_field_ws_new; - func[i].field_ws_set_field_defs = - gl_merge_ui_text_field_ws_set_field_defs; - func[i].field_ws_get_field_defs = - gl_merge_ui_text_field_ws_get_field_defs; - - i = GL_MERGE_TEXT_COMMA; - func[i].src_new = gl_merge_ui_text_src_new; - func[i].src_set_value = gl_merge_ui_text_src_set_value; - func[i].src_get_value = gl_merge_ui_text_src_get_value; - func[i].field_ws_new = gl_merge_ui_text_field_ws_new; - func[i].field_ws_set_field_defs = - gl_merge_ui_text_field_ws_set_field_defs; - func[i].field_ws_get_field_defs = - gl_merge_ui_text_field_ws_get_field_defs; - - i = GL_MERGE_TEXT_COLON; - func[i].src_new = gl_merge_ui_text_src_new; - func[i].src_set_value = gl_merge_ui_text_src_set_value; - func[i].src_get_value = gl_merge_ui_text_src_get_value; - func[i].field_ws_new = gl_merge_ui_text_field_ws_new; - func[i].field_ws_set_field_defs = - gl_merge_ui_text_field_ws_set_field_defs; - func[i].field_ws_get_field_defs = - gl_merge_ui_text_field_ws_get_field_defs; - -} - -/*****************************************************************************/ -/* Boilerplate Object stuff. */ -/*****************************************************************************/ -guint -gl_merge_ui_src_get_type (void) -{ - static guint merge_ui_src_type = 0; - - if (!merge_ui_src_type) { - GtkTypeInfo merge_ui_src_info = { - "glMergeUISrc", - sizeof (glMergeUISrc), - sizeof (glMergeUISrcClass), - (GtkClassInitFunc) gl_merge_ui_src_class_init, - (GtkObjectInitFunc) gl_merge_ui_src_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - merge_ui_src_type = gtk_type_unique (gtk_vbox_get_type (), - &merge_ui_src_info); - } - - return merge_ui_src_type; -} - -static void -gl_merge_ui_src_class_init (glMergeUISrcClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_merge_ui_src_destroy; - - merge_ui_src_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMergeUISrcClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - merge_ui_src_signals, LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_merge_ui_src_init (glMergeUISrc * src) -{ - src->backend_widget = NULL; -} - -static void -gl_merge_ui_src_destroy (GtkObject * object) -{ - glMergeUISrc *src; - glMergeUISrcClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MERGE_UI_SRC (object)); - - src = GL_MERGE_UI_SRC (object); - class = GL_MERGE_UI_SRC_CLASS (GTK_OBJECT (src)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_merge_ui_src_new (void) -{ - glMergeUISrc *src; - - src = gtk_type_new (gl_merge_ui_src_get_type ()); - - src->type = GL_MERGE_NONE; - src->backend_widget = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (src->backend_widget), 0, 0.5); - gtk_box_pack_start (GTK_BOX (src), src->backend_widget, FALSE, FALSE, - 0); - - return GTK_WIDGET (src); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when our backend widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -src_changed_cb (glMergeUISrc * src) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (src), merge_ui_src_signals[CHANGED]); -} - -/*****************************************************************************/ -/* Set type. */ -/*****************************************************************************/ -void -gl_merge_ui_src_set_type (glMergeUISrc * src, - glMergeType type) -{ - - if (type != src->type) { - - gtk_widget_destroy (src->backend_widget); - - src->type = type; - - if (type != GL_MERGE_NONE) { - src->backend_widget = (func[type].src_new) (type); - } else { - src->backend_widget = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (src->backend_widget), - 0, 0.5); - } - - gtk_box_pack_start (GTK_BOX (src), src->backend_widget, - FALSE, FALSE, 0); - - if (GTK_WIDGET_VISIBLE (src)) { - gtk_widget_show_all (src->backend_widget); - } - - if (type != GL_MERGE_NONE) { - gtk_signal_connect_object (GTK_OBJECT - (src->backend_widget), - "changed", - GTK_SIGNAL_FUNC - (src_changed_cb), - GTK_OBJECT (src)); - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (src), - merge_ui_src_signals[CHANGED]); - } - -} - -/*****************************************************************************/ -/* Set src. */ -/*****************************************************************************/ -void -gl_merge_ui_src_set_value (glMergeUISrc * src, - gchar * text) -{ - glMergeType type; - - type = src->type; - - if (type != GL_MERGE_NONE) { - func[type].src_set_value (src->backend_widget, text); - } else { - return; - } - -} - -/*****************************************************************************/ -/* Get src name. */ -/*****************************************************************************/ -gchar * -gl_merge_ui_src_get_value (glMergeUISrc * src) -{ - glMergeType type; - - type = src->type; - - if (type != GL_MERGE_NONE) { - return func[type].src_get_value (src->backend_widget); - } else { - return NULL; - } - -} - -/*****************************************************************************/ -/* Boilerplate Object stuff. */ -/*****************************************************************************/ -guint -gl_merge_ui_field_ws_get_type (void) -{ - static guint merge_ui_field_ws_type = 0; - - if (!merge_ui_field_ws_type) { - GtkTypeInfo merge_ui_field_ws_info = { - "glMergeUIFieldWS", - sizeof (glMergeUIFieldWS), - sizeof (glMergeUIFieldWSClass), - (GtkClassInitFunc) gl_merge_ui_field_ws_class_init, - (GtkObjectInitFunc) gl_merge_ui_field_ws_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - merge_ui_field_ws_type = gtk_type_unique (gtk_vbox_get_type (), - &merge_ui_field_ws_info); - } - - return merge_ui_field_ws_type; -} - -static void -gl_merge_ui_field_ws_class_init (glMergeUIFieldWSClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_merge_ui_field_ws_destroy; - - merge_ui_field_ws_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMergeUIFieldWSClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - merge_ui_field_ws_signals, LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_merge_ui_field_ws_init (glMergeUIFieldWS * field_ws) -{ - field_ws->type = GL_MERGE_NONE; - field_ws->src = NULL; - field_ws->backend_widget = NULL; -} - -static void -gl_merge_ui_field_ws_destroy (GtkObject * object) -{ - glMergeUIFieldWS *field_ws; - glMergeUIFieldWSClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MERGE_UI_FIELD_WS (object)); - - field_ws = GL_MERGE_UI_FIELD_WS (object); - class = GL_MERGE_UI_FIELD_WS_CLASS (GTK_OBJECT (field_ws)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_merge_ui_field_ws_new (void) -{ - glMergeUIFieldWS *field_ws; - - field_ws = gtk_type_new (gl_merge_ui_field_ws_get_type ()); - - field_ws->type = GL_MERGE_NONE; - field_ws->backend_widget = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (field_ws->backend_widget), 0, 0.5); - gtk_box_pack_start (GTK_BOX (field_ws), field_ws->backend_widget, - FALSE, FALSE, 0); - - return GTK_WIDGET (field_ws); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when our backend widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -field_ws_changed_cb (glMergeUIFieldWS * field_ws) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (field_ws), - merge_ui_field_ws_signals[CHANGED]); -} - -/*****************************************************************************/ -/* set type and src data, create appropriate backend widget. */ -/*****************************************************************************/ -void -gl_merge_ui_field_ws_set_type_src (glMergeUIFieldWS * field_ws, - glMergeType type, - gchar * src) -{ - - if (field_ws->src != NULL) - g_free (field_ws->src); - if (field_ws->backend_widget != NULL) { - gtk_widget_destroy (field_ws->backend_widget); - } - - field_ws->type = type; - field_ws->src = g_strdup (src); - - if (type != GL_MERGE_NONE) { - field_ws->backend_widget = - (func[type].field_ws_new) (type, src); - } else { - field_ws->backend_widget = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (field_ws->backend_widget), 0, - 0.5); - } - - gtk_box_pack_start (GTK_BOX (field_ws), field_ws->backend_widget, - FALSE, FALSE, 0); - - if (type != GL_MERGE_NONE) { - gtk_signal_connect_object (GTK_OBJECT - (field_ws->backend_widget), - "changed", - GTK_SIGNAL_FUNC - (field_ws_changed_cb), - GTK_OBJECT (field_ws)); - } - - if (GTK_WIDGET_VISIBLE (field_ws)) { - gtk_widget_show_all (field_ws->backend_widget); - } - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (field_ws), - merge_ui_field_ws_signals[CHANGED]); - -} - -/*****************************************************************************/ -/* Set field definitions (associate ids with raw fields). */ -/*****************************************************************************/ -void -gl_merge_ui_field_ws_set_field_defs (glMergeUIFieldWS * field_ws, - GList * field_defs) -{ - glMergeType type; - - type = field_ws->type; - - if (type != GL_MERGE_NONE) { - - (func[type].field_ws_set_field_defs) (field_ws->backend_widget, - field_defs); - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (field_ws), - merge_ui_field_ws_signals[CHANGED]); - - } -} - -/*****************************************************************************/ -/* Get field definitions (associate ids with raw fields). */ -/*****************************************************************************/ -GList * -gl_merge_ui_field_ws_get_field_defs (glMergeUIFieldWS * field_ws) -{ - glMergeType type; - - type = field_ws->type; - - if (type != GL_MERGE_NONE) { - - return (func[type].field_ws_get_field_defs) (field_ws-> - backend_widget); - - } else { - - return NULL; - - } - -} diff --git a/glabels1/src/merge_ui.h b/glabels1/src/merge_ui.h deleted file mode 100644 index e5a7e71..0000000 --- a/glabels1/src/merge_ui.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_ui.h: document merge user interface module header file - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MERGE_UI_H__ -#define __MERGE_UI_H__ - -#include <gnome.h> - -#include "merge.h" - -extern void - gl_merge_ui_init (void); - -/*======================================================*/ -/* Merge source selection widget */ -/*======================================================*/ -#define GL_TYPE_MERGE_UI_SRC (gl_merge_ui_src_get_type ()) -#define GL_MERGE_UI_SRC(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_SRC, glMergeUISrc )) -#define GL_MERGE_UI_SRC_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_SRC, glMergeUISrcClass)) -#define GL_IS_MERGE_UI_SRC(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_SRC)) -#define GL_IS_MERGE_UI_SRC_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_SRC)) - -typedef struct _glMergeUISrc glMergeUISrc; -typedef struct _glMergeUISrcClass glMergeUISrcClass; - -struct _glMergeUISrc { - GtkVBox parent_widget; - - glMergeType type; - GtkWidget *backend_widget; -}; - -struct _glMergeUISrcClass { - GtkVBoxClass parent_class; - - void (*changed) (glMergeUISrc * src, gpointer user_data); -}; - -extern guint gl_merge_ui_src_get_type (void); -extern GtkWidget *gl_merge_ui_src_new (void); -extern void gl_merge_ui_src_set_type (glMergeUISrc * src, glMergeType type); -extern void gl_merge_ui_src_set_value (glMergeUISrc * src, gchar * text); -extern gchar *gl_merge_ui_src_get_value (glMergeUISrc * src); - -/*======================================================*/ -/* Merge field selection/definition widget. */ -/*======================================================*/ -#define GL_TYPE_MERGE_UI_FIELD_WS (gl_merge_ui_field_ws_get_type ()) -#define GL_MERGE_UI_FIELD_WS(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_FIELD_WS, glMergeUIFieldWS )) -#define GL_MERGE_UI_FIELD_WS_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_FIELD_WS, glMergeUIFieldWSClass)) -#define GL_IS_MERGE_UI_FIELD_WS(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_FIELD_WS)) -#define GL_IS_MERGE_UI_FIELD_WS_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_FIELD_WS)) - -typedef struct _glMergeUIFieldWS glMergeUIFieldWS; -typedef struct _glMergeUIFieldWSClass glMergeUIFieldWSClass; - -struct _glMergeUIFieldWS { - GtkVBox parent_widget; - - glMergeType type; - gchar *src; - GtkWidget *backend_widget; -}; - -struct _glMergeUIFieldWSClass { - GtkVBoxClass parent_class; - - void (*changed) (glMergeUIFieldWS * field_ws, gpointer user_data); -}; - -extern guint gl_merge_ui_field_ws_get_type (void); -extern GtkWidget *gl_merge_ui_field_ws_new (void); -extern void gl_merge_ui_field_ws_set_type_src (glMergeUIFieldWS * field_ws, - glMergeType type, - gchar * src); -extern void gl_merge_ui_field_ws_set_field_defs (glMergeUIFieldWS * field_ws, - GList * field_defs); -extern GList *gl_merge_ui_field_ws_get_field_defs (glMergeUIFieldWS * field_ws); - -#endif diff --git a/glabels1/src/merge_ui_text.c b/glabels1/src/merge_ui_text.c deleted file mode 100644 index 5e7954d..0000000 --- a/glabels1/src/merge_ui_text.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_ui_text.c: text-file document merge user interface backend module - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include "merge_ui_text.h" -#include "merge_text.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef struct { - gchar *loc; - GtkWidget *entry; -} EntryNode; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint merge_ui_text_src_signals[LAST_SIGNAL] = { 0 }; -static gint merge_ui_text_field_ws_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_ui_text_src_class_init (glMergeUITextSrcClass * class); -static void gl_merge_ui_text_src_init (glMergeUITextSrc * src); -static void gl_merge_ui_text_src_destroy (GtkObject * object); -static void gl_merge_ui_text_src_construct (glMergeUITextSrc * src, - glMergeType type); - -static void src_changed_cb (glMergeUITextSrc * src); - -static void gl_merge_ui_text_field_ws_class_init (glMergeUITextFieldWSClass * class); -static void gl_merge_ui_text_field_ws_init (glMergeUITextFieldWS * field_ws); -static void gl_merge_ui_text_field_ws_destroy (GtkObject * object); -static void gl_merge_ui_text_field_ws_construct (glMergeUITextFieldWS * field_ws, - glMergeType type, - gchar * src); - -static void field_ws_changed_cb (glMergeUITextFieldWS * field_ws); - -/*****************************************************************************/ -/* Boilerplate Object stuff. */ -/*****************************************************************************/ -guint -gl_merge_ui_text_src_get_type (void) -{ - static guint merge_ui_text_src_type = 0; - - if (!merge_ui_text_src_type) { - GtkTypeInfo merge_ui_text_src_info = { - "glMergeUITextSrc", - sizeof (glMergeUITextSrc), - sizeof (glMergeUITextSrcClass), - (GtkClassInitFunc) gl_merge_ui_text_src_class_init, - (GtkObjectInitFunc) gl_merge_ui_text_src_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - merge_ui_text_src_type = gtk_type_unique (gtk_vbox_get_type (), - &merge_ui_text_src_info); - } - - return merge_ui_text_src_type; -} - -static void -gl_merge_ui_text_src_class_init (glMergeUITextSrcClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_merge_ui_text_src_destroy; - - merge_ui_text_src_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMergeUITextSrcClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - merge_ui_text_src_signals, LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_merge_ui_text_src_init (glMergeUITextSrc * src) -{ - src->type = GL_MERGE_NONE; - src->entry = NULL; -} - -static void -gl_merge_ui_text_src_destroy (GtkObject * object) -{ - glMergeUITextSrc *src; - glMergeUITextSrcClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MERGE_UI_TEXT_SRC (object)); - - src = GL_MERGE_UI_TEXT_SRC (object); - class = GL_MERGE_UI_TEXT_SRC_CLASS (GTK_OBJECT (src)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_merge_ui_text_src_new (glMergeType type) -{ - glMergeUITextSrc *src; - - src = gtk_type_new (gl_merge_ui_text_src_get_type ()); - - gl_merge_ui_text_src_construct (src, type); - - return GTK_WIDGET (src); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*---------------------------------------------------------------------------*/ -static void -gl_merge_ui_text_src_construct (glMergeUITextSrc * src, - glMergeType type) -{ - GtkWidget *wvbox, *wentry; - - wvbox = GTK_WIDGET (src); - - src->type = type; - - src->entry = - gnome_file_entry_new (NULL, _("Select merge-database source")); - gtk_box_pack_start (GTK_BOX (wvbox), src->entry, TRUE, TRUE, 0); - - wentry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (src->entry)); - gtk_signal_connect_object (GTK_OBJECT (wentry), "changed", - GTK_SIGNAL_FUNC (src_changed_cb), - GTK_OBJECT (src)); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when our backend widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -src_changed_cb (glMergeUITextSrc * src) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (src), merge_ui_text_src_signals[CHANGED]); -} - -/*****************************************************************************/ -/* Set src name. */ -/*****************************************************************************/ -void -gl_merge_ui_text_src_set_value (glMergeUITextSrc * src, - gchar * text) -{ - GtkWidget *wentry; - - wentry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (src->entry)); - - gtk_entry_set_text (GTK_ENTRY (wentry), text); -} - -/*****************************************************************************/ -/* Get src name. */ -/*****************************************************************************/ -gchar * -gl_merge_ui_text_src_get_value (glMergeUITextSrc * src) -{ - return gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (src->entry), - TRUE); -} - -/*****************************************************************************/ -/* Boilerplate Object stuff. */ -/*****************************************************************************/ -guint -gl_merge_ui_text_field_ws_get_type (void) -{ - static guint merge_ui_text_field_ws_type = 0; - - if (!merge_ui_text_field_ws_type) { - GtkTypeInfo merge_ui_text_field_ws_info = { - "glMergeUITextFieldWS", - sizeof (glMergeUITextFieldWS), - sizeof (glMergeUITextFieldWSClass), - (GtkClassInitFunc) gl_merge_ui_text_field_ws_class_init, - (GtkObjectInitFunc) gl_merge_ui_text_field_ws_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - merge_ui_text_field_ws_type = - gtk_type_unique (gtk_hbox_get_type (), - &merge_ui_text_field_ws_info); - } - - return merge_ui_text_field_ws_type; -} - -static void -gl_merge_ui_text_field_ws_class_init (glMergeUITextFieldWSClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - object_class->destroy = gl_merge_ui_text_field_ws_destroy; - - merge_ui_text_field_ws_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMergeUITextFieldWSClass, - changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - merge_ui_text_field_ws_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_merge_ui_text_field_ws_init (glMergeUITextFieldWS * field_ws) -{ - field_ws->type = GL_MERGE_NONE; - field_ws->entry_list = NULL; -} - -static void -gl_merge_ui_text_field_ws_destroy (GtkObject * object) -{ - glMergeUITextFieldWS *field_ws; - glMergeUITextFieldWSClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MERGE_UI_TEXT_FIELD_WS (object)); - - field_ws = GL_MERGE_UI_TEXT_FIELD_WS (object); - class = GL_MERGE_UI_TEXT_FIELD_WS_CLASS (GTK_OBJECT (field_ws)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_merge_ui_text_field_ws_new (glMergeType type, - gchar * src) -{ - glMergeUITextFieldWS *field_ws; - - field_ws = gtk_type_new (gl_merge_ui_text_field_ws_get_type ()); - - gl_merge_ui_text_field_ws_construct (field_ws, type, src); - - return GTK_WIDGET (field_ws); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_ui_text_field_ws_construct (glMergeUITextFieldWS * field_ws, - glMergeType type, - gchar * src) -{ - GtkWidget *whbox, *wtable, *wlabel, *whline, *wentry; - glMergeInput *mp; - glMergeRawField *sample_field; - GList *sample_field_list=NULL, *p; - gint n_fields, i; - EntryNode *entry_node; - - field_ws->type = type; - field_ws->entry_list = NULL; - - mp = gl_merge_open( type, NULL, src ); - sample_field_list = gl_merge_get_raw_record (mp); - gl_merge_close(mp); - n_fields = g_list_length( sample_field_list ); - - whbox = GTK_WIDGET (field_ws); - - wtable = gtk_table_new (n_fields + 2, 3, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 20); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 10); - gtk_box_pack_start (GTK_BOX (whbox), wtable, FALSE, FALSE, GNOME_PAD); - - wlabel = gtk_label_new (_("Column")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 1, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - - wlabel = gtk_label_new (_("Custom field key")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 1, 2, 0, 1); - - wlabel = gtk_label_new (_("Sample data")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 2, 3, 0, 1); - - whline = gtk_hseparator_new (); - gtk_table_attach_defaults (GTK_TABLE (wtable), whline, 0, 1, 1, 2); - whline = gtk_hseparator_new (); - gtk_table_attach_defaults (GTK_TABLE (wtable), whline, 1, 2, 1, 2); - whline = gtk_hseparator_new (); - gtk_table_attach_defaults (GTK_TABLE (wtable), whline, 2, 3, 1, 2); - - for (p = sample_field_list, i = 0; p != NULL; p = p->next, i++) { - sample_field = p->data; - - wlabel = gtk_label_new (sample_field->loc); - gtk_misc_set_alignment (GTK_MISC (wlabel), 1, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, - 0, 1, i + 2, i + 3); - - wentry = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (wentry), sample_field->loc); - gtk_widget_set_usize (wentry, 100, 0); - gtk_table_attach_defaults (GTK_TABLE (wtable), wentry, - 1, 2, i + 2, i + 3); - - gtk_signal_connect_object (GTK_OBJECT (wentry), "changed", - GTK_SIGNAL_FUNC - (field_ws_changed_cb), - GTK_OBJECT (field_ws)); - - wlabel = gtk_label_new (sample_field->value); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL(wlabel), GTK_JUSTIFY_LEFT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, - 2, 3, i + 2, i + 3); - - entry_node = g_new0 (EntryNode, 1); - entry_node->loc = g_strdup (sample_field->loc); - entry_node->entry = wentry; - field_ws->entry_list = - g_list_append (field_ws->entry_list, entry_node); - - } - - gl_merge_free_raw_record (&sample_field_list); - -} - -/*****************************************************************************/ -/* Set field definitions. (associate key with locator) */ -/*****************************************************************************/ -void -gl_merge_ui_text_field_ws_set_field_defs (glMergeUITextFieldWS * field_ws, - GList * field_defs) -{ - GList *p_entry, *p_defs; - EntryNode *entry; - glMergeFieldDefinition *def; - - for (p_entry = field_ws->entry_list; p_entry != NULL; - p_entry = p_entry->next) { - entry = (EntryNode *) p_entry->data; - - for (p_defs = field_defs; p_defs != NULL; p_defs = p_defs->next) { - def = (glMergeFieldDefinition *) p_defs->data; - - if (strcmp (entry->loc, def->loc) == 0) { - gtk_entry_set_text (GTK_ENTRY (entry->entry), - def->key); - } - } - } - -} - -/*****************************************************************************/ -/* Get field definitions. (associate key with locator) */ -/*****************************************************************************/ -GList * -gl_merge_ui_text_field_ws_get_field_defs (glMergeUITextFieldWS * field_ws) -{ - GList *p_entry, *defs_list = NULL; - EntryNode *entry; - glMergeFieldDefinition *def; - - for (p_entry = field_ws->entry_list; p_entry != NULL; - p_entry = p_entry->next) { - entry = (EntryNode *) p_entry->data; - - def = g_new0 (glMergeFieldDefinition, 1); - - def->loc = g_strdup (entry->loc); - def->key = - gtk_editable_get_chars (GTK_EDITABLE (entry->entry), 0, -1); - - defs_list = g_list_append (defs_list, def); - - } - - return defs_list; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when our backend widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -field_ws_changed_cb (glMergeUITextFieldWS * field_ws) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (field_ws), - merge_ui_text_field_ws_signals[CHANGED]); -} diff --git a/glabels1/src/merge_ui_text.h b/glabels1/src/merge_ui_text.h deleted file mode 100644 index 42006f2..0000000 --- a/glabels1/src/merge_ui_text.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * merge_ui_text.h: text-file merge user interface backend header - * - * Copyright (C) 2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __MERGE_UI_TEXT_H__ -#define __MERGE_UI_TEXT_H__ - -#include <gnome.h> - -#include "merge.h" - -/*======================================================*/ -/* Merge source selection widget */ -/*======================================================*/ -#define GL_TYPE_MERGE_UI_TEXT_SRC (gl_merge_ui_text_src_get_type ()) -#define GL_MERGE_UI_TEXT_SRC(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_TEXT_SRC, glMergeUITextSrc )) -#define GL_MERGE_UI_TEXT_SRC_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_TEXT_SRC, glMergeUITextSrcClass)) -#define GL_IS_MERGE_UI_TEXT_SRC(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_TEXT_SRC)) -#define GL_IS_MERGE_UI_TEXT_SRC_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_TEXT_SRC)) - -typedef struct _glMergeUITextSrc glMergeUITextSrc; -typedef struct _glMergeUITextSrcClass glMergeUITextSrcClass; - -struct _glMergeUITextSrc { - GtkVBox parent_widget; - - glMergeType type; - GtkWidget *entry; -}; - -struct _glMergeUITextSrcClass { - GtkVBoxClass parent_class; - - void (*changed) (glMergeUITextSrc * src, gpointer user_data); -}; - -extern guint gl_merge_ui_text_src_get_type (void); -extern GtkWidget *gl_merge_ui_text_src_new (glMergeType type); -extern void gl_merge_ui_text_src_set_value (glMergeUITextSrc * src, - gchar * text); -extern gchar *gl_merge_ui_text_src_get_value (glMergeUITextSrc * src); - -/*======================================================*/ -/* Merge field selection/definition widget. */ -/*======================================================*/ -#define GL_TYPE_MERGE_UI_TEXT_FIELD_WS (gl_merge_ui_text_field_ws_get_type ()) -#define GL_MERGE_UI_TEXT_FIELD_WS(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MERGE_UI_TEXT_FIELD_WS, glMergeUITextFieldWS )) -#define GL_MERGE_UI_TEXT_FIELD_WS_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_UI_TEXT_FIELD_WS, glMergeUITextFieldWSClass)) -#define GL_IS_MERGE_UI_TEXT_FIELD_WS(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MERGE_UI_TEXT_FIELD_WS)) -#define GL_IS_MERGE_UI_TEXT_FIELD_WS_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_UI_TEXT_FIELD_WS)) - -typedef struct _glMergeUITextFieldWS glMergeUITextFieldWS; -typedef struct _glMergeUITextFieldWSClass glMergeUITextFieldWSClass; - -struct _glMergeUITextFieldWS { - GtkHBox parent_widget; - - glMergeType type; - GList *entry_list; -}; - -struct _glMergeUITextFieldWSClass { - GtkHBoxClass parent_class; - - void (*changed) (glMergeUITextFieldWS * field_ws, gpointer user_data); -}; - -extern guint gl_merge_ui_text_field_ws_get_type (void); -extern GtkWidget *gl_merge_ui_text_field_ws_new (glMergeType type, - gchar * src); -extern void gl_merge_ui_text_field_ws_set_field_defs (glMergeUITextFieldWS * field_ws, - GList * field_defs); -extern GList *gl_merge_ui_text_field_ws_get_field_defs (glMergeUITextFieldWS * - field_ws); - -#endif diff --git a/glabels1/src/mini_preview.c b/glabels1/src/mini_preview.c deleted file mode 100644 index 21e61fa..0000000 --- a/glabels1/src/mini_preview.c +++ /dev/null @@ -1,498 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * mini_preview.c: mini preview widget module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "mini_preview.h" - -#include "debug.h" - -#define MINI_PREVIEW_MAX_PIXELS 175 - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CLICKED, - PRESSED, - LAST_SIGNAL -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint mini_preview_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_mini_preview_class_init (glMiniPreviewClass * class); -static void gl_mini_preview_init (glMiniPreview * preview); -static void gl_mini_preview_destroy (GtkObject * object); - -static void gl_mini_preview_construct (glMiniPreview * preview, - gint height, gint width); - -static GList *mini_outline_list_new (GnomeCanvas *canvas, - glTemplate *template); -static void mini_outline_list_free (GList ** list); - -static gint canvas_event_cb (GnomeCanvas * canvas, GdkEvent * event, - gpointer data); - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_mini_preview_get_type (void) -{ - static guint mini_preview_type = 0; - - if (!mini_preview_type) { - GtkTypeInfo mini_preview_info = { - "glMiniPreview", - sizeof (glMiniPreview), - sizeof (glMiniPreviewClass), - (GtkClassInitFunc) gl_mini_preview_class_init, - (GtkObjectInitFunc) gl_mini_preview_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - mini_preview_type = gtk_type_unique (gtk_hbox_get_type (), - &mini_preview_info); - } - - return mini_preview_type; -} - -static void -gl_mini_preview_class_init (glMiniPreviewClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - object_class->destroy = gl_mini_preview_destroy; - - mini_preview_signals[CLICKED] = - gtk_signal_new ("clicked", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMiniPreviewClass, clicked), - gtk_marshal_NONE__INT, - GTK_TYPE_NONE, 1, GTK_TYPE_INT); - - mini_preview_signals[PRESSED] = - gtk_signal_new ("pressed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glMiniPreviewClass, pressed), - gtk_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); - - gtk_object_class_add_signals (object_class, mini_preview_signals, - LAST_SIGNAL); - - class->clicked = NULL; - class->pressed = NULL; -} - -static void -gl_mini_preview_init (glMiniPreview * preview) -{ - preview->canvas = NULL; - preview->label_items = NULL; -} - -static void -gl_mini_preview_destroy (GtkObject * object) -{ - glMiniPreview *preview; - glMiniPreviewClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MINI_PREVIEW (object)); - - preview = GL_MINI_PREVIEW (object); - class = GL_MINI_PREVIEW_CLASS (GTK_OBJECT (preview)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_mini_preview_new (gint height, - gint width) -{ - glMiniPreview *preview; - - preview = gtk_type_new (gl_mini_preview_get_type ()); - - gl_mini_preview_construct (preview, height, width); - - return GTK_WIDGET (preview); -} - -/*--------------------------------------------------------------------------*/ -/* Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_mini_preview_construct (glMiniPreview * preview, - gint height, - gint width) -{ - GtkWidget *whbox; - GnomeCanvasGroup *group; - - whbox = GTK_WIDGET (preview); - - preview->height = height; - preview->width = width; - - /* create canvas */ - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - preview->canvas = gnome_canvas_new_aa (); - gtk_widget_pop_colormap (); - gtk_widget_pop_visual (); - gtk_box_pack_start (GTK_BOX (whbox), preview->canvas, TRUE, TRUE, 0); - gtk_widget_set_usize (preview->canvas, width, height); - gnome_canvas_set_scroll_region (GNOME_CANVAS (preview->canvas), - 0.0, 0.0, width, height); - - /* draw an initial paper outline */ - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (preview->canvas), 1.0); - group = gnome_canvas_root (GNOME_CANVAS (preview->canvas)); - preview->paper_item = - gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", 0.0, - "y1", 0.0, - "x2", (gdouble)width, - "y2", (gdouble)height, - "width_pixels", 1, - "outline_color", "black", - "fill_color", "white", NULL); - - /* create empty list of label canvas items */ - preview->label_items = NULL; - preview->labels_per_sheet = 0; - - /* Event handler */ - gtk_signal_connect (GTK_OBJECT (preview->canvas), "event", - GTK_SIGNAL_FUNC (canvas_event_cb), preview); - -} - -/****************************************************************************/ -/* Set label for mini-preview to determine geometry. */ -/****************************************************************************/ -void gl_mini_preview_set_label (glMiniPreview * preview, - gchar *name) -{ - glTemplate *template; - const GnomePaper *paper = NULL; - gdouble paper_width, paper_height; - gdouble canvas_scale; - gdouble w, h; - - /* Fetch template */ - template = gl_template_from_name (name); - - /* get paper size and set scale */ - paper = gnome_paper_with_name (template->page_size); - paper_width = gnome_paper_pswidth (paper); - paper_height = gnome_paper_psheight (paper); - w = preview->width - 4; - h = preview->height - 4; - if ( (w/paper_width) > (h/paper_height) ) { - canvas_scale = h / paper_height; - } else { - canvas_scale = w / paper_width; - } - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (preview->canvas), - canvas_scale); - gnome_canvas_set_scroll_region (GNOME_CANVAS (preview->canvas), - 0.0, 0.0, paper_width, paper_height); - - /* update paper outline */ - gnome_canvas_item_set (preview->paper_item, - "x1", 0.0, - "y1", 0.0, - "x2", paper_width, - "y2", paper_height, - NULL); - - /* update label items */ - mini_outline_list_free (&preview->label_items); - preview->label_items = - mini_outline_list_new (GNOME_CANVAS(preview->canvas), - template); - - gl_template_free( &template ); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw label outlines and return canvas item list. */ -/*--------------------------------------------------------------------------*/ -static GList * -mini_outline_list_new (GnomeCanvas * canvas, - glTemplate * template) -{ - GnomeCanvasGroup *group = NULL; - GnomeCanvasItem *item = NULL; - GList *list = NULL; - gint i, ix, iy; - gdouble x1, y1, x2, y2, y_temp; - const GnomePaper *paper = NULL; - gdouble paper_height; - - /* get paper height */ - paper = gnome_paper_with_name (template->page_size); - paper_height = gnome_paper_psheight (paper); - - group = gnome_canvas_root (canvas); - - /* draw mini label outlines */ - i = 1; - for (iy = (template->ny - 1); iy >= 0; iy--) { - for (ix = 0; ix < template->nx; ix++, i++) { - - x1 = ix * (template->dx) + template->x0; - y1 = iy * (template->dy) + template->y0; - x2 = x1 + template->label_width; - y2 = y1 + template->label_height; - - /* transform origin from lower left to upper left */ - /* and swap y's so that (y1 < y2) */ - y_temp = y2; - y2 = paper_height - y1; - y1 = paper_height - y_temp; - - switch (template->style) { - case GL_TEMPLATE_STYLE_RECT: - item = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type(), - "x1", x1, - "y1", y1, - "x2", x2, - "y2", y2, - "width_pixels", 1, - "outline_color", "black", - "fill_color", "white", - NULL); - break; - case GL_TEMPLATE_STYLE_ROUND: - case GL_TEMPLATE_STYLE_CD: - item = gnome_canvas_item_new (group, - gnome_canvas_ellipse_get_type(), - "x1", x1, - "y1", y1, - "x2", x2, - "y2", y2, - "width_pixels", 1, - "outline_color", "black", - "fill_color", "white", - NULL); - break; - default: - WARN ("Unknown label style"); - return list; - break; - } - gtk_object_set_data (GTK_OBJECT (item), "i", - GINT_TO_POINTER (i)); - - list = g_list_append (list, item); - } - } - - return list; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw label outlines and return canvas item list. */ -/*--------------------------------------------------------------------------*/ -static void -mini_outline_list_free (GList ** list) -{ - GnomeCanvasItem *item; - GList *p; - - if ( *list != NULL ) { - - for (p = *list; p != NULL; p = p->next) { - item = GNOME_CANVAS_ITEM (p->data); - gtk_object_destroy (GTK_OBJECT (item)); - } - - g_list_free (*list); - *list = NULL; - - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Canvas event handler, select first and last items. */ -/*--------------------------------------------------------------------------*/ -static gint -canvas_event_cb (GnomeCanvas * canvas, - GdkEvent * event, - gpointer data) -{ - glMiniPreview *preview = GL_MINI_PREVIEW (data); - GnomeCanvasItem *item; - static gboolean dragging = FALSE; - static gint prev_i = 0, first, last; - gint i; - gdouble x, y; - - switch (event->type) { - - case GDK_BUTTON_PRESS: - gnome_canvas_window_to_world (canvas, - event->button.x, event->button.y, - &x, &y); - switch (event->button.button) { - case 1: - /* Get item at cursor and make sure - it's a label object ("i" is valid) */ - item = gnome_canvas_get_item_at (GNOME_CANVAS (canvas), - x, y); - if (item == NULL) - break; - i = GPOINTER_TO_INT (gtk_object_get_data - (GTK_OBJECT (item), "i")); - if (i == 0) - break; - /* Go into dragging mode while remains pressed. */ - dragging = TRUE; - gdk_pointer_grab (GTK_WIDGET (canvas)->window, - FALSE, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK, NULL, NULL, - event->button.time); - gtk_signal_emit (GTK_OBJECT(preview), - mini_preview_signals[CLICKED], - i); - first = i; - last = i; - gtk_signal_emit (GTK_OBJECT(preview), - mini_preview_signals[PRESSED], - first, last); - prev_i = i; - break; - - default: - break; - } - break; - - case GDK_BUTTON_RELEASE: - gnome_canvas_window_to_world (canvas, - event->button.x, event->button.y, - &x, &y); - switch (event->button.button) { - case 1: - /* Exit dragging mode */ - dragging = FALSE; - gdk_pointer_ungrab (event->button.time); - break; - - default: - break; - } - break; - - case GDK_MOTION_NOTIFY: - gnome_canvas_window_to_world (canvas, - event->motion.x, event->motion.y, - &x, &y); - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - /* Get item at cursor and - make sure it's a label object ("i" is valid) */ - item = gnome_canvas_get_item_at (GNOME_CANVAS (canvas), - x, y); - if (item == NULL) - break; - i = GPOINTER_TO_INT (gtk_object_get_data - (GTK_OBJECT (item), "i")); - if (i == 0) - break; - if (prev_i != i) { - /* Entered into a new item */ - last = i; - gtk_signal_emit (GTK_OBJECT(preview), - mini_preview_signals[PRESSED], - MIN (first, last), - MAX (first, last)); - prev_i = i; - } - } - break; - - default: - break; - } - - return FALSE; - -} - -/****************************************************************************/ -/* Highlight given label outlines. */ -/****************************************************************************/ -void -gl_mini_preview_highlight_range (glMiniPreview * preview, - gint first_label, - gint last_label) -{ - GnomeCanvasItem *item = NULL; - GList *p = NULL; - gint i; - - for (p = preview->label_items, i = 1; p != NULL; i++, p = p->next) { - - item = GNOME_CANVAS_ITEM (p->data); - - if ((i >= first_label) && (i <= last_label)) { - gnome_canvas_item_set (item, - "fill_color", "light blue", - NULL); - } else { - gnome_canvas_item_set (item, - "fill_color", "white", NULL); - } - - } - -} - diff --git a/glabels1/src/mini_preview.h b/glabels1/src/mini_preview.h deleted file mode 100644 index 5c08dea..0000000 --- a/glabels1/src/mini_preview.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * mini_preview.h: mini-preview widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __MINI_PREVIEW_H__ -#define __MINI_PREVIEW_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_MINI_PREVIEW (gl_mini_preview_get_type ()) -#define GL_MINI_PREVIEW(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_MINI_PREVIEW, glMiniPreview )) -#define GL_MINI_PREVIEW_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_PREVIEW, glMiniPreviewClass)) -#define GL_IS_MINI_PREVIEW(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_MINI_PREVIEW)) -#define GL_IS_MINI_PREVIEW_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_PREVIEW)) - -typedef struct _glMiniPreview glMiniPreview; -typedef struct _glMiniPreviewClass glMiniPreviewClass; - -struct _glMiniPreview { - GtkHBox parent_widget; - - gint height; - gint width; - - GtkWidget *canvas; - GnomeCanvasItem *paper_item; - - gint labels_per_sheet; - GList *label_items; -}; - -struct _glMiniPreviewClass { - GtkHBoxClass parent_class; - - void (*clicked) (glMiniPreview *preview, - gint index, gpointer user_data); - void (*pressed) (glMiniPreview *preview, - gint index1, gint index2, - gpointer user_data); -}; - -extern guint gl_mini_preview_get_type (void); - -extern GtkWidget *gl_mini_preview_new (gint height, gint width); - -extern void gl_mini_preview_set_label (glMiniPreview * preview, - gchar * name); - -extern void gl_mini_preview_highlight_range (glMiniPreview * preview, - gint first_label, - gint last_label); - -#endif diff --git a/glabels1/src/pixmaps/Makefile.am b/glabels1/src/pixmaps/Makefile.am deleted file mode 100644 index 3d19710..0000000 --- a/glabels1/src/pixmaps/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -EXTRA_DIST = \ - arrow.xpm \ - text.xpm \ - box.xpm \ - line.xpm \ - ellipse.xpm \ - image.xpm \ - barcode.xpm \ - zoomin.xpm \ - zoomout.xpm \ - zoom1to1.xpm \ - merge.xpm \ - collate.xpm \ - nocollate.xpm \ - checkerboard.xpm \ - cursor_text.xbm \ - cursor_text_mask.xbm \ - cursor_box.xbm \ - cursor_box_mask.xbm \ - cursor_line.xbm \ - cursor_line_mask.xbm \ - cursor_ellipse.xbm \ - cursor_ellipse_mask.xbm \ - cursor_image.xbm \ - cursor_image_mask.xbm \ - cursor_barcode.xbm \ - cursor_barcode_mask.xbm \ - cursor_zoomin.xbm \ - cursor_zoomin_mask.xbm \ - cursor_zoomout.xbm \ - cursor_zoomout_mask.xbm - diff --git a/glabels1/src/pixmaps/arrow.xpm b/glabels1/src/pixmaps/arrow.xpm deleted file mode 100644 index 60e9e66..0000000 --- a/glabels1/src/pixmaps/arrow.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char *arrow_xpm[]={ -"24 24 2 1", -". c None", -"# c #000000", -"........................", -"........................", -"........................", -".......#................", -".......##...............", -".......###..............", -".......####.............", -".......#####............", -".......######...........", -".......#######..........", -".......########.........", -".......#####............", -".......##.##............", -".......#...##...........", -"...........##...........", -"............##..........", -"............##..........", -"........................", -"........................", -"........................", -"........................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/barcode.xpm b/glabels1/src/pixmaps/barcode.xpm deleted file mode 100644 index 9ac1581..0000000 --- a/glabels1/src/pixmaps/barcode.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char *barcode_xpm[]={ -"24 24 2 1", -". c None", -"# c #000000", -"........................", -"........................", -"........................", -"........................", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"...#.##.##.#.#.#.##.#...", -"........................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/box.xpm b/glabels1/src/pixmaps/box.xpm deleted file mode 100644 index b744068..0000000 --- a/glabels1/src/pixmaps/box.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *box_xpm[]={ -"24 24 3 1", -". c None", -"# c #000000", -"a c #ede5cf", -"........................", -"........................", -"........................", -"........................", -"...##################...", -"...##################...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##################...", -"...##################...", -"........................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/checkerboard.xpm b/glabels1/src/pixmaps/checkerboard.xpm deleted file mode 100644 index 33ab7b5..0000000 --- a/glabels1/src/pixmaps/checkerboard.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char * checkerboard_xpm[] = { -"24 24 2 1", -" c #CCCCCC", -". c #000000", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. ..", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. ..", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. ..", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. ..", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. ..", -".. .. .. .. .. .. ", -".. .. .. .. .. .. ", -" .. .. .. .. .. ..", -" .. .. .. .. .. .."}; diff --git a/glabels1/src/pixmaps/collate.xpm b/glabels1/src/pixmaps/collate.xpm deleted file mode 100644 index a781151..0000000 --- a/glabels1/src/pixmaps/collate.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *collate_xpm[]={ -"58 28 3 1", -". c None", -"# c #000000", -"a c #ffffff", -"..........................................................", -".###################..###################.................", -".#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaa##aaaaaaaa#.................", -".#aaaaaaa##aaaaaaaa#..#aaaaaa#aa#aaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaaa#aaaaaaa#..##..##..##.....", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#..##..##..##.....", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaa#aaaaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaa#aaaaaaaaaa#.................", -".#aaaaaaa###aaaaaaa#..#aaaaaa####aaaaaaa#.................", -".#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.................", -".###################..###################.................", -"..........................................................", -"..........................................................", -"..........................................................", -".................###################..###################.", -".................#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.", -".................#aaaaaaaa#aaaaaaaa#..#aaaaaaa##aaaaaaaa#.", -".................#aaaaaaa##aaaaaaaa#..#aaaaaa#aa#aaaaaaa#.", -"....##..##..##...#aaaaaaaa#aaaaaaaa#..#aaaaaaaaa#aaaaaaa#.", -"....##..##..##...#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#.", -".................#aaaaaaaa#aaaaaaaa#..#aaaaaaa#aaaaaaaaa#.", -".................#aaaaaaaa#aaaaaaaa#..#aaaaaa#aaaaaaaaaa#.", -".................#aaaaaaa###aaaaaaa#..#aaaaaa####aaaaaaa#.", -".................#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.", -".................###################..###################.", -"..........................................................", -".........................................................."}; diff --git a/glabels1/src/pixmaps/cursor_barcode.xbm b/glabels1/src/pixmaps/cursor_barcode.xbm deleted file mode 100644 index 6e8d1d6..0000000 --- a/glabels1/src/pixmaps/cursor_barcode.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_barcode_width 32 -#define cursor_barcode_height 32 -#define cursor_barcode_x_hot 7 -#define cursor_barcode_y_hot 7 -static unsigned char cursor_barcode_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, - 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, - 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, - 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, - 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, 0x00, 0xa0, 0xad, 0x5a, - 0x00, 0xa0, 0xad, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_barcode_mask.xbm b/glabels1/src/pixmaps/cursor_barcode_mask.xbm deleted file mode 100644 index 52ed3ba..0000000 --- a/glabels1/src/pixmaps/cursor_barcode_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_barcode_mask_width 32 -#define cursor_barcode_mask_height 32 -#define cursor_barcode_mask_x_hot 7 -#define cursor_barcode_mask_y_hot 7 -static unsigned char cursor_barcode_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0xf1, 0xff, 0xff, 0xc0, 0xf1, 0xff, 0xff, 0xc0, 0xf1, 0xff, 0xff, - 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, - 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, - 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, - 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, - 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_box.xbm b/glabels1/src/pixmaps/cursor_box.xbm deleted file mode 100644 index 48ae4ea..0000000 --- a/glabels1/src/pixmaps/cursor_box.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_box_width 32 -#define cursor_box_height 32 -#define cursor_box_x_hot 7 -#define cursor_box_y_hot 7 -static unsigned char cursor_box_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0xff, 0x7f, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x80, 0x01, 0x60, - 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, - 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, - 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, - 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0x01, 0x60, 0x00, 0x80, 0xff, 0x7f, - 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_box_mask.xbm b/glabels1/src/pixmaps/cursor_box_mask.xbm deleted file mode 100644 index b41e055..0000000 --- a/glabels1/src/pixmaps/cursor_box_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_box_mask_width 32 -#define cursor_box_mask_height 32 -#define cursor_box_mask_x_hot 7 -#define cursor_box_mask_y_hot 7 -static unsigned char cursor_box_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0xc1, 0xff, 0xff, - 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, - 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, - 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, - 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0x03, 0xf0, - 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, - 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff}; diff --git a/glabels1/src/pixmaps/cursor_ellipse.xbm b/glabels1/src/pixmaps/cursor_ellipse.xbm deleted file mode 100644 index 946af9a..0000000 --- a/glabels1/src/pixmaps/cursor_ellipse.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_ellipse_width 32 -#define cursor_ellipse_height 32 -#define cursor_ellipse_x_hot 7 -#define cursor_ellipse_y_hot 7 -static unsigned char cursor_ellipse_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x7c, 0x00, 0x80, 0x00, 0xef, 0x01, 0x00, 0x80, 0x01, 0x03, - 0x00, 0xc0, 0x00, 0x06, 0x00, 0x60, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x08, - 0x00, 0x30, 0x00, 0x18, 0x00, 0x30, 0x00, 0x18, 0x00, 0x10, 0x00, 0x10, - 0x00, 0x30, 0x00, 0x18, 0x00, 0x30, 0x00, 0x18, 0x00, 0x20, 0x00, 0x08, - 0x00, 0x60, 0x00, 0x0c, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x80, 0x01, 0x03, - 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_ellipse_mask.xbm b/glabels1/src/pixmaps/cursor_ellipse_mask.xbm deleted file mode 100644 index 22fb544..0000000 --- a/glabels1/src/pixmaps/cursor_ellipse_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_ellipse_mask_width 32 -#define cursor_ellipse_mask_height 32 -#define cursor_ellipse_mask_x_hot 7 -#define cursor_ellipse_mask_y_hot 7 -static unsigned char cursor_ellipse_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0xfe, 0x00, - 0xc0, 0x81, 0xff, 0x03, 0xc0, 0xc1, 0xff, 0x07, 0xc0, 0xe1, 0xff, 0x0f, - 0x00, 0xf0, 0x83, 0x1f, 0x00, 0xf0, 0x01, 0x1f, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x78, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x3c, - 0x00, 0x78, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x3c, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0xf0, 0x01, 0x1f, 0x00, 0xf0, 0x83, 0x1f, 0x00, 0xe0, 0xff, 0x0f, - 0x00, 0xc0, 0xff, 0x07, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0xfe, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_image.xbm b/glabels1/src/pixmaps/cursor_image.xbm deleted file mode 100644 index 3230836..0000000 --- a/glabels1/src/pixmaps/cursor_image.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_image_width 32 -#define cursor_image_height 32 -#define cursor_image_x_hot 7 -#define cursor_image_y_hot 7 -static unsigned char cursor_image_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0xf0, 0xff, 0x7f, 0x80, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, - 0x00, 0x10, 0x00, 0x4c, 0x00, 0x10, 0x00, 0x52, 0x00, 0x10, 0x08, 0x4c, - 0x00, 0x10, 0x14, 0x40, 0x00, 0x10, 0x22, 0x40, 0x00, 0x10, 0x41, 0x40, - 0x00, 0x90, 0xc1, 0x40, 0x00, 0x10, 0x41, 0x40, 0x00, 0xf0, 0xc1, 0x7f, - 0x00, 0x10, 0x41, 0x40, 0x00, 0x10, 0x41, 0x40, 0x00, 0x10, 0x41, 0x40, - 0x00, 0x10, 0x7f, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, - 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_image_mask.xbm b/glabels1/src/pixmaps/cursor_image_mask.xbm deleted file mode 100644 index 9c79e82..0000000 --- a/glabels1/src/pixmaps/cursor_image_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_image_mask_width 32 -#define cursor_image_mask_height 32 -#define cursor_image_mask_x_hot 7 -#define cursor_image_mask_y_hot 7 -static unsigned char cursor_image_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0xf9, 0xff, 0xff, - 0xc0, 0xf9, 0xff, 0xff, 0xc0, 0xf9, 0xff, 0xff, 0xc0, 0xf9, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, - 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff}; diff --git a/glabels1/src/pixmaps/cursor_line.xbm b/glabels1/src/pixmaps/cursor_line.xbm deleted file mode 100644 index f5e2636..0000000 --- a/glabels1/src/pixmaps/cursor_line.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_line_width 32 -#define cursor_line_height 32 -#define cursor_line_x_hot 7 -#define cursor_line_y_hot 7 -static unsigned char cursor_line_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, - 0x80, 0x00, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_line_mask.xbm b/glabels1/src/pixmaps/cursor_line_mask.xbm deleted file mode 100644 index a9359d5..0000000 --- a/glabels1/src/pixmaps/cursor_line_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_line_mask_width 32 -#define cursor_line_mask_height 32 -#define cursor_line_mask_x_hot 7 -#define cursor_line_mask_y_hot 7 -static unsigned char cursor_line_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x08, 0xc0, 0x01, 0x00, 0x1c, - 0xc0, 0x01, 0x00, 0x1e, 0xc0, 0x01, 0x00, 0x0f, 0xc0, 0x01, 0x80, 0x07, - 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, - 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_text.xbm b/glabels1/src/pixmaps/cursor_text.xbm deleted file mode 100644 index 4378c1a..0000000 --- a/glabels1/src/pixmaps/cursor_text.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_text_width 32 -#define cursor_text_height 32 -#define cursor_text_x_hot 7 -#define cursor_text_y_hot 7 -static unsigned char cursor_text_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, - 0x00, 0xc0, 0x9c, 0x01, 0x00, 0x40, 0x1c, 0x01, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_text_mask.xbm b/glabels1/src/pixmaps/cursor_text_mask.xbm deleted file mode 100644 index 543c2b7..0000000 --- a/glabels1/src/pixmaps/cursor_text_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_text_mask_width 32 -#define cursor_text_mask_height 32 -#define cursor_text_mask_x_hot 7 -#define cursor_text_mask_y_hot 7 -static unsigned char cursor_text_mask_bits[] = { - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0x00, 0xc0, 0xe1, 0xff, 0x03, 0xc0, 0xe1, 0xff, 0x03, - 0x00, 0xe0, 0xff, 0x03, 0x00, 0xe0, 0xbe, 0x03, 0x00, 0x60, 0x3e, 0x03, - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, - 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_zoomin.xbm b/glabels1/src/pixmaps/cursor_zoomin.xbm deleted file mode 100644 index beb1545..0000000 --- a/glabels1/src/pixmaps/cursor_zoomin.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_zoomin_width 32 -#define cursor_zoomin_height 32 -#define cursor_zoomin_x_hot 8 -#define cursor_zoomin_y_hot 8 -static unsigned char cursor_zoomin_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, - 0x30, 0x0c, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x88, 0x31, 0x00, 0x00, - 0x84, 0x21, 0x00, 0x00, 0xe4, 0x27, 0x00, 0x00, 0xe4, 0x27, 0x00, 0x00, - 0x84, 0x21, 0x00, 0x00, 0x8c, 0x11, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, - 0x30, 0x0c, 0x00, 0x00, 0xe0, 0x37, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_zoomin_mask.xbm b/glabels1/src/pixmaps/cursor_zoomin_mask.xbm deleted file mode 100644 index cada016..0000000 --- a/glabels1/src/pixmaps/cursor_zoomin_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_zoomin_mask_width 32 -#define cursor_zoomin_mask_height 32 -#define cursor_zoomin_mask_x_hot 8 -#define cursor_zoomin_mask_y_hot 8 -static unsigned char cursor_zoomin_mask_bits[] = { - 0xc0, 0x03, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, - 0xfc, 0x3f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, - 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, - 0xc0, 0xf3, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x07, 0x00, - 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_zoomout.xbm b/glabels1/src/pixmaps/cursor_zoomout.xbm deleted file mode 100644 index c8fac13..0000000 --- a/glabels1/src/pixmaps/cursor_zoomout.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_zoomout_width 32 -#define cursor_zoomout_height 32 -#define cursor_zoomout_x_hot 8 -#define cursor_zoomout_y_hot 8 -static unsigned char cursor_zoomout_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, - 0x30, 0x0c, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, - 0x04, 0x20, 0x00, 0x00, 0xe4, 0x27, 0x00, 0x00, 0xe4, 0x27, 0x00, 0x00, - 0x04, 0x20, 0x00, 0x00, 0x0c, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, - 0x30, 0x0c, 0x00, 0x00, 0xe0, 0x37, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/cursor_zoomout_mask.xbm b/glabels1/src/pixmaps/cursor_zoomout_mask.xbm deleted file mode 100644 index aadc97d..0000000 --- a/glabels1/src/pixmaps/cursor_zoomout_mask.xbm +++ /dev/null @@ -1,16 +0,0 @@ -#define cursor_zoomout_mask_width 32 -#define cursor_zoomout_mask_height 32 -#define cursor_zoomout_mask_x_hot 8 -#define cursor_zoomout_mask_y_hot 8 -static unsigned char cursor_zoomout_mask_bits[] = { - 0xc0, 0x03, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, - 0xfc, 0x3f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, - 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, - 0xc0, 0xf3, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x07, 0x00, - 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3e, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/glabels1/src/pixmaps/ellipse.xpm b/glabels1/src/pixmaps/ellipse.xpm deleted file mode 100644 index f186186..0000000 --- a/glabels1/src/pixmaps/ellipse.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *ellipse_xpm[]={ -"24 24 3 1", -". c None", -"# c #000000", -"a c #ede5cf", -"........................", -"........................", -"........................", -".........######.........", -".......##########.......", -"......###aaaaaa###......", -".....##aaaaaaaaa###.....", -"....###aaaaaaaaaaa##....", -"....##aaaaaaaaaaaa##....", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"...##aaaaaaaaaaaaaa##...", -"....##aaaaaaaaaaaa##....", -"....##aaaaaaaaaaa###....", -".....###aaaaaaaaa##.....", -"......###aaaaaa###......", -".......##########.......", -".........######.........", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/image.xpm b/glabels1/src/pixmaps/image.xpm deleted file mode 100644 index 116c20d..0000000 --- a/glabels1/src/pixmaps/image.xpm +++ /dev/null @@ -1,42 +0,0 @@ -/* XPM */ -static char *image_xpm[]={ -"24 24 15 1", -". c None", -"# c #000000", -"i c #004000", -"f c #008000", -"e c #00c000", -"d c #00ff00", -"k c #404000", -"a c #58a8ff", -"h c #a0a0a0", -"g c #a8dcff", -"j c #c0ffff", -"l c #ff0000", -"b c #ffff00", -"c c #ffffc0", -"m c #ffffff", -"........................", -"........................", -"..####################..", -"..#aaaaaaaaaaaaaaaaaa#..", -"..#aaaaaaaaaaaabbaaaa#..", -"..#aaaaaa#aaaabbbbaaa#..", -"..#aaaaa#c#aaaabbaaaa#..", -"..#aaaa#ccc#aaaaaadef#..", -"..#aga#cchcc#agagdeei#..", -"..#ga##cchcc##agaeefi#..", -"..#ggg#ccccc#gggggfii#..", -"..#jjj#ccccc#jjjjjjij#..", -"..#####chchc#######k##..", -"..#eee#chchc#eeeeeeke#..", -"..#eee#chccc#eeelelke#..", -"..#ffe#chccc#eleieike#..", -"..#eee#######eeieilei#..", -"..#feeeemeeeeeieeeeie#..", -"..#eeeeemmmmmmmmmeeee#..", -"..#eeeeeeeeeeeeemmeee#..", -"..#eeeeeeeeeeeeeemeee#..", -"..####################..", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/line.xpm b/glabels1/src/pixmaps/line.xpm deleted file mode 100644 index 37a24c9..0000000 --- a/glabels1/src/pixmaps/line.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char *line_xpm[]={ -"24 24 2 1", -". c None", -"# c #000000", -"........................", -"........................", -"........................", -"........................", -"...................#....", -"..................##....", -".................##.....", -"................##......", -"...............##.......", -"..............##........", -".............##.........", -"............##..........", -"...........##...........", -"..........##............", -".........##.............", -"........##..............", -".......##...............", -"......##................", -".....##.................", -"....##..................", -"....#...................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/merge.xpm b/glabels1/src/pixmaps/merge.xpm deleted file mode 100644 index 6fd5f8f..0000000 --- a/glabels1/src/pixmaps/merge.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *merge_xpm[]={ -"24 24 7 1", -". c None", -"# c #000000", -"c c #585858", -"d c #a0a0a0", -"a c #c0c000", -"b c #ffffc0", -"e c #ffffff", -"........................", -"........................", -"....##########..........", -"...##abbbbbbb#c.........", -"..#d#dbbbbbbb#c.........", -".####acdbcbcb#c.........", -".#adadbbbbbbe#c.........", -".#bccbcbcdecb#c.........", -".#bbbbbebebbe#c.........", -".#bcb##############.....", -".#bbb#eeeeeeeeeeee#.....", -".#bcd#e##############...", -".#bbb#e#eeeeeeeeeeee#...", -".#bcb#e#e##############.", -".#bbb#e#e#eeeeeeeeeeee#.", -".#bcb###e#eeeeeeeeeeee#.", -".#bbebb#e#eeeeeeeeeeee#.", -".#bccbb###eeeeeeeeeeee#.", -".#bbbebeb#eeeeeeeeeeee#.", -".#bcbbcce##############.", -".#ebebebebeee#c.........", -".#############c.........", -"..ccccccccccccc.........", -"........................"}; diff --git a/glabels1/src/pixmaps/nocollate.xpm b/glabels1/src/pixmaps/nocollate.xpm deleted file mode 100644 index a67cc13..0000000 --- a/glabels1/src/pixmaps/nocollate.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *nocollate_xpm[]={ -"58 28 3 1", -". c None", -"# c #000000", -"a c #ffffff", -"..........................................................", -".###################..###################.................", -".#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#.................", -".#aaaaaaa##aaaaaaaa#..#aaaaaaa##aaaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#..##..##..##.....", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#..##..##..##.....", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#.................", -".#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#.................", -".#aaaaaaa###aaaaaaa#..#aaaaaaa###aaaaaaa#.................", -".#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.................", -".###################..###################.................", -"..........................................................", -"..........................................................", -"..........................................................", -".................###################..###################.", -".................#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.", -".................#aaaaaaaa##aaaaaaa#..#aaaaaaaa##aaaaaaa#.", -".................#aaaaaaa#aa#aaaaaa#..#aaaaaaa#aa#aaaaaa#.", -"....##..##..##...#aaaaaaaaaa#aaaaaa#..#aaaaaaaaaa#aaaaaa#.", -"....##..##..##...#aaaaaaaaa#aaaaaaa#..#aaaaaaaaa#aaaaaaa#.", -".................#aaaaaaaa#aaaaaaaa#..#aaaaaaaa#aaaaaaaa#.", -".................#aaaaaaa#aaaaaaaaa#..#aaaaaaa#aaaaaaaaa#.", -".................#aaaaaaa####aaaaaa#..#aaaaaaa####aaaaaa#.", -".................#aaaaaaaaaaaaaaaaa#..#aaaaaaaaaaaaaaaaa#.", -".................###################..###################.", -"..........................................................", -".........................................................."}; diff --git a/glabels1/src/pixmaps/text.xpm b/glabels1/src/pixmaps/text.xpm deleted file mode 100644 index 499d740..0000000 --- a/glabels1/src/pixmaps/text.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char *text_xpm[]={ -"24 24 2 1", -". c None", -"# c #000000", -"........................", -"........................", -"........................", -"........................", -"........................", -"......###########.......", -"......##..###..##.......", -"......#...###...#.......", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -"..........###...........", -".........#####..........", -"........................", -"........................", -"........................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/zoom1to1.xpm b/glabels1/src/pixmaps/zoom1to1.xpm deleted file mode 100644 index 956f402..0000000 --- a/glabels1/src/pixmaps/zoom1to1.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *zoom1to1_xpm[]={ -"24 24 3 1", -". c None", -"# c #000000", -"a c #00ff00", -"........................", -"........................", -"........................", -"........................", -"......###.......###.....", -".....#aa#......#aa#.....", -".....#aa#......#aa#.....", -".....##a#......##a#.....", -"......#a#.......#a#.....", -"......#a#..###..#a#.....", -"......#a#..#a#..#a#.....", -"......#a#..#a#..#a#.....", -"......#a#..###..#a#.....", -"......#a#.......#a#.....", -"......#a#.......#a#.....", -"......#a#.......#a#.....", -"......#a#..###..#a#.....", -"......#a#..#a#..#a#.....", -"......#a#..#a#..#a#.....", -"......###..###..###.....", -"........................", -"........................", -"........................", -"........................"}; diff --git a/glabels1/src/pixmaps/zoomin.xpm b/glabels1/src/pixmaps/zoomin.xpm deleted file mode 100644 index 88f8b4d..0000000 --- a/glabels1/src/pixmaps/zoomin.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static char *zoomin_xpm[]={ -"24 24 11 1", -". c None", -"# c #000000", -"c c #0058c0", -"e c #00ff00", -"i c #404000", -"g c #58a8ff", -"f c #a8dcff", -"h c #c0c000", -"a c #c0ffff", -"b c #ffffc0", -"d c #ffffff", -"........................", -"........................", -"........................", -".......######...........", -"......##aaaaa##.........", -".....#aaaaaaaa##........", -"....##aab###aaac#.......", -"....#aabd#e#aafa##......", -"...#aaddd#e#faffa#......", -"...#aa####e####ga#......", -"...#ad#eeeeeee#ga#......", -"...#ad####e####ga#......", -"...#aaaff#e#fffga#......", -"...##aaaf#e#fgga#.......", -"....#aaff###ggaa#.......", -".....##afggggaa####.....", -"......##aaaaa##.#hb#....", -"........######..#ihb#...", -"................d#ihb#..", -".................d#ihb#.", -"..................d#ihb.", -"...................d#i..", -"....................d...", -"........................"}; diff --git a/glabels1/src/pixmaps/zoomout.xpm b/glabels1/src/pixmaps/zoomout.xpm deleted file mode 100644 index a1f8e86..0000000 --- a/glabels1/src/pixmaps/zoomout.xpm +++ /dev/null @@ -1,37 +0,0 @@ -/* XPM */ -static char *zoomout_xpm[]={ -"24 24 10 1", -". c None", -"# c #000000", -"f c #00ff00", -"h c #404000", -"e c #58a8ff", -"c c #a8dcff", -"g c #c0c000", -"a c #c0ffff", -"b c #ffffc0", -"d c #ffffff", -"........................", -"........................", -"........................", -".......######...........", -"......##aaaaa##.........", -".....#aaaaaaaa##........", -"....##aabbacaaaa#.......", -"....#aabdcacaaca##......", -"...#aadddccccacca#......", -"...#aa#########ea#......", -"...#ad#fffffff#ea#......", -"...#ad#########ea#......", -"...#aaaccccccccea#......", -"...##aaaccccceea#.......", -"....#aaccccceeaa#.......", -".....##aceeeeaa####.....", -"......##aaaaa##.#gb#....", -"........######..#hgb#...", -"................d#hgb#..", -".................d#hgb#.", -"..................d#hgb.", -"...................d#h..", -"....................d...", -"........................"}; diff --git a/glabels1/src/prefs.c b/glabels1/src/prefs.c deleted file mode 100644 index 8e76eec..0000000 --- a/glabels1/src/prefs.c +++ /dev/null @@ -1,470 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prefs.c: Application preferences module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include "mdi.h" -#include "propertybox.h" -#include "prefs.h" - -#include "debug.h" - -/*============================================*/ -/* Private types. */ -/*============================================*/ - -typedef struct { - glPrefsUnits default_units; - gchar *default_page_size; -} Prefs; - -/*============================================*/ -/* Private globals. */ -/*============================================*/ -static GtkWidget *dialog = NULL; - -static Prefs *prefs = NULL; - -static GtkWidget *unit_pts_radio, *unit_inches_radio, *unit_mm_radio; -static GtkWidget *page_size_us_letter_radio, *page_size_a4_radio; - -/*============================================*/ -/* Private function prototypes. */ -/*============================================*/ -static void apply_cb (glPropertyBox * propertybox, gint arg1, gpointer user_data); - -static void prefs_destroy_cb (void); - -static void prefs_changed_cb (void); - -static Prefs *read_prefs (void); - -static void sync_prefs (Prefs * p); - -static void free_prefs (Prefs * p); - -static void add_general_page (GtkWidget * dialog); - -static void set_general_page_from_prefs (Prefs * p); - -static void set_prefs_from_general_page (Prefs * p); - -/****************************************************************************/ -/* Create and display preferences dialog. */ -/****************************************************************************/ -void -gl_prefs_cb (GtkWidget * widget, - gpointer data) -{ - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - - if (prefs == NULL) { - prefs = read_prefs (); - } - - if (dialog == NULL) { - dialog = gl_property_box_new (); - gtk_window_set_title (GTK_WINDOW (dialog), - _("Glabels: Preferences")); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (app)); - - add_general_page (dialog); - - gtk_signal_connect (GTK_OBJECT (dialog), "destroy", - GTK_SIGNAL_FUNC (prefs_destroy_cb), NULL); - - gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", - GTK_SIGNAL_FUNC (prefs_destroy_cb), NULL); - - gtk_signal_connect (GTK_OBJECT (dialog), "apply", - GTK_SIGNAL_FUNC (apply_cb), NULL); - - gtk_widget_show_all (GTK_WIDGET (dialog)); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Apply" button callback. */ -/*--------------------------------------------------------------------------*/ -static void -apply_cb (glPropertyBox * propertybox, - gint arg1, - gpointer user_data) -{ - set_prefs_from_general_page (prefs); - sync_prefs (prefs); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback to finish cleaning up after tearing down dialog. */ -/*--------------------------------------------------------------------------*/ -static void -prefs_destroy_cb (void) -{ - dialog = NULL; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the dialog has changed. */ -/*--------------------------------------------------------------------------*/ -static void -prefs_changed_cb (void) -{ - gl_property_box_changed (GL_PROPERTY_BOX (dialog)); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Read and set preferences from disk. */ -/*--------------------------------------------------------------------------*/ -static Prefs * -read_prefs (void) -{ - Prefs *p; - gchar *string; - gboolean dflt; - - p = g_new0 (Prefs, 1); - - gnome_config_push_prefix ("/glabels/General/"); - - string = gnome_config_get_string_with_default ("Units=Inches", &dflt); - if (dflt) - gnome_config_set_string ("Units", "Inches"); - if (g_strcasecmp (string, "Points") == 0) { - p->default_units = GL_PREFS_UNITS_PTS; - } else if (g_strcasecmp (string, "Inches") == 0) { - p->default_units = GL_PREFS_UNITS_INCHES; - } else if (g_strcasecmp (string, "Millimeters") == 0) { - p->default_units = GL_PREFS_UNITS_MM; - } - g_free (string); - - p->default_page_size = - gnome_config_get_string_with_default ("Page_size=US-Letter", &dflt); - if (dflt) - gnome_config_set_string ("Page_size", "US-Letter"); - - gnome_config_pop_prefix (); - - return p; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Sync preferences with disk. */ -/*--------------------------------------------------------------------------*/ -static void -sync_prefs (Prefs * p) -{ - gnome_config_push_prefix ("/glabels/General/"); - switch (p->default_units) { - case GL_PREFS_UNITS_PTS: - gnome_config_set_string ("Units", "Points"); - break; - case GL_PREFS_UNITS_INCHES: - gnome_config_set_string ("Units", "Inches"); - break; - case GL_PREFS_UNITS_MM: - gnome_config_set_string ("Units", "Millimeters"); - break; - default: - WARN ("Illegal units"); - break; - } - gnome_config_set_string ("Page_size", p->default_page_size); - gnome_config_pop_prefix (); - gnome_config_sync (); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Free previously allocated preferences structure. */ -/*--------------------------------------------------------------------------*/ -static void -free_prefs (Prefs * p) -{ - g_free (p); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create and add the general page tab with controls to the dialog.*/ -/*--------------------------------------------------------------------------*/ -static void -add_general_page (GtkWidget * dialog) -{ - GtkWidget *wframe, *wlabel, *wvbox, *wvbox1; - GSList *radio_group = NULL; - - wlabel = gtk_label_new (_("General")); - - wvbox = gtk_vbox_new (FALSE, 0); - - /* ----- Display Units Frame ------------------------------------ */ - wframe = gtk_frame_new (_("Display units")); - gtk_container_set_border_width (GTK_CONTAINER (wframe), 10); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wvbox1 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox1), 10); - gtk_container_add (GTK_CONTAINER (wframe), wvbox1); - - radio_group = NULL; - - unit_pts_radio = - gtk_radio_button_new_with_label (radio_group, _("Points")); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (unit_pts_radio)); - gtk_box_pack_start (GTK_BOX (wvbox1), unit_pts_radio, FALSE, FALSE, 0); - - unit_inches_radio = - gtk_radio_button_new_with_label (radio_group, _("Inches")); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (unit_inches_radio)); - gtk_box_pack_start (GTK_BOX (wvbox1), unit_inches_radio, FALSE, FALSE, - 0); - - unit_mm_radio = - gtk_radio_button_new_with_label (radio_group, _("Millimeters")); - radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (unit_mm_radio)); - gtk_box_pack_start (GTK_BOX (wvbox1), unit_mm_radio, FALSE, FALSE, 0); - - /* ----- Display Units Frame ------------------------------------ */ - wframe = gtk_frame_new (_("Default page size")); - gtk_container_set_border_width (GTK_CONTAINER (wframe), 10); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wvbox1 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox1), 10); - gtk_container_add (GTK_CONTAINER (wframe), wvbox1); - - radio_group = NULL; - - page_size_us_letter_radio = - gtk_radio_button_new_with_label (radio_group, "US-Letter"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON - (page_size_us_letter_radio)); - gtk_box_pack_start (GTK_BOX (wvbox1), page_size_us_letter_radio, FALSE, - FALSE, 0); - - page_size_a4_radio = - gtk_radio_button_new_with_label (radio_group, "A4"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (page_size_a4_radio)); - gtk_box_pack_start (GTK_BOX (wvbox1), page_size_a4_radio, - FALSE, FALSE, 0); - - gl_property_box_append_page (GL_PROPERTY_BOX (dialog), wvbox, wlabel); - - set_general_page_from_prefs (prefs); - - gtk_signal_connect (GTK_OBJECT (unit_pts_radio), "toggled", - GTK_SIGNAL_FUNC (prefs_changed_cb), NULL); - gtk_signal_connect (GTK_OBJECT (unit_inches_radio), "toggled", - GTK_SIGNAL_FUNC (prefs_changed_cb), NULL); - gtk_signal_connect (GTK_OBJECT (unit_mm_radio), "toggled", - GTK_SIGNAL_FUNC (prefs_changed_cb), NULL); - - gtk_signal_connect (GTK_OBJECT (page_size_us_letter_radio), "toggled", - GTK_SIGNAL_FUNC (prefs_changed_cb), NULL); - gtk_signal_connect (GTK_OBJECT (page_size_a4_radio), "toggled", - GTK_SIGNAL_FUNC (prefs_changed_cb), NULL); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Initialize general tab controls from current prefs. */ -/*--------------------------------------------------------------------------*/ -static void -set_general_page_from_prefs (Prefs * p) -{ - switch (p->default_units) { - case GL_PREFS_UNITS_PTS: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (unit_pts_radio), TRUE); - break; - case GL_PREFS_UNITS_INCHES: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (unit_inches_radio), TRUE); - break; - case GL_PREFS_UNITS_MM: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (unit_mm_radio), - TRUE); - break; - default: - WARN ("Illegal units"); - break; - } - - if (g_strcasecmp (p->default_page_size, "US-Letter") == 0) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (page_size_us_letter_radio), - TRUE); - } else if (g_strcasecmp (p->default_page_size, "A4") == 0) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (page_size_a4_radio), TRUE); - } else { - WARN ("Illegal page size: %s", p->default_page_size); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Set current preferences based on general controls. */ -/*--------------------------------------------------------------------------*/ -static void -set_prefs_from_general_page (Prefs * p) -{ - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (unit_pts_radio))) { - p->default_units = GL_PREFS_UNITS_PTS; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (unit_inches_radio))) { - p->default_units = GL_PREFS_UNITS_INCHES; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (unit_mm_radio))) { - p->default_units = GL_PREFS_UNITS_MM; - } - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (page_size_us_letter_radio))) { - g_free (p->default_page_size); - p->default_page_size = g_strdup ("US-Letter"); - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (page_size_a4_radio))) { - g_free (p->default_page_size); - p->default_page_size = g_strdup ("A4"); - } - -} - -/****************************************************************************/ -/* Get desired units. */ -/****************************************************************************/ -glPrefsUnits -gl_prefs_get_units(void) -{ - return prefs->default_units; -} - -/****************************************************************************/ -/* Get desired units per point. */ -/****************************************************************************/ -gdouble -gl_prefs_get_units_per_point (void) -{ - if (prefs == NULL) { - prefs = read_prefs (); - } - - switch (prefs->default_units) { - case GL_PREFS_UNITS_PTS: - return 1.0; /* points */ - case GL_PREFS_UNITS_INCHES: - return 1.0 / 72.0; /* inches */ - case GL_PREFS_UNITS_MM: - return 0.35277778; /* mm */ - default: - WARN ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get precision for desired units. */ -/****************************************************************************/ -gint -gl_prefs_get_units_precision (void) -{ - if (prefs == NULL) { - prefs = read_prefs (); - } - - switch (prefs->default_units) { - case GL_PREFS_UNITS_PTS: - return 1; /* points */ - case GL_PREFS_UNITS_INCHES: - return 3; /* inches */ - case GL_PREFS_UNITS_MM: - return 1; /* mm */ - default: - WARN ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get step size for desired units. */ -/****************************************************************************/ -gdouble -gl_prefs_get_units_step_size (void) -{ - if (prefs == NULL) { - prefs = read_prefs (); - } - - switch (prefs->default_units) { - case GL_PREFS_UNITS_PTS: - return 0.1; /* points */ - case GL_PREFS_UNITS_INCHES: - return 0.001; /* inches */ - case GL_PREFS_UNITS_MM: - return 0.1; /* mm */ - default: - WARN ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get string representing desired units. */ -/****************************************************************************/ -const gchar * -gl_prefs_get_units_string (void) -{ - if (prefs == NULL) { - prefs = read_prefs (); - } - - switch (prefs->default_units) { - case GL_PREFS_UNITS_PTS: - return _("points"); - case GL_PREFS_UNITS_INCHES: - return _("inches"); - case GL_PREFS_UNITS_MM: - return _("mm"); - default: - WARN ("Illegal units"); /* Should not happen */ - return _("points"); - } -} - -/****************************************************************************/ -/* Get default page size. */ -/****************************************************************************/ -const gchar * -gl_prefs_get_page_size (void) -{ - if (prefs == NULL) { - prefs = read_prefs (); - } - - return prefs->default_page_size; -} diff --git a/glabels1/src/prefs.h b/glabels1/src/prefs.h deleted file mode 100644 index a279d58..0000000 --- a/glabels1/src/prefs.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prefs.h: Application preferences module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PREFS_H__ -#define __PREFS_H__ - -#include <gnome.h> - -typedef enum { - GL_PREFS_UNITS_PTS, - GL_PREFS_UNITS_INCHES, - GL_PREFS_UNITS_MM, -} glPrefsUnits; - -extern void gl_prefs_cb (GtkWidget * widget, gpointer data); - -extern glPrefsUnits gl_prefs_get_units(void); - -extern gdouble gl_prefs_get_units_per_point (void); - -extern gint gl_prefs_get_units_precision (void); - -extern gdouble gl_prefs_get_units_step_size (void); - -extern const gchar *gl_prefs_get_units_string (void); - -extern const gchar *gl_prefs_get_page_size (void); - -#endif /* __PREFS_H__ */ diff --git a/glabels1/src/print.c b/glabels1/src/print.c deleted file mode 100644 index 29e8aa7..0000000 --- a/glabels1/src/print.c +++ /dev/null @@ -1,869 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print.c: Print module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include <math.h> -#include <time.h> -#include <ctype.h> -#include <libgnome/gnome-paper.h> -#include <libgnomeprint/gnome-printer.h> - -#include "print.h" -#include "label.h" -#include "bc.h" -#include "template.h" -#include "hack.h" - -#include "debug.h" - -#define GL_PRINT_DEFAULT_PAPER "US-Letter" - -#define RED(x) ( (((x)>>24) & 0xff) / 255.0 ) -#define GREEN(x) ( (((x)>>16) & 0xff) / 255.0 ) -#define BLUE(x) ( (((x)>>8) & 0xff) / 255.0 ) -#define ALPHA(x) ( ( (x) & 0xff) / 255.0 ) - -/*===========================================*/ -/* Private types. */ -/*===========================================*/ -typedef struct _PrintInfo { - /* gnome print context */ - GnomePrintContext *pc; - - /* gLabels Template */ - glTemplate *template; - gboolean label_rotate_flag; - -} PrintInfo; - -/*===========================================*/ -/* Private function prototypes. */ -/*===========================================*/ -static PrintInfo *print_info_new (GnomePrintMaster * master, glLabel * label); -static void print_info_free (PrintInfo ** pi); - -static void print_label (PrintInfo * pi, glLabel * label, gint i, - glMergeRecord * record, gboolean outline_flag, - gboolean reverse_flag); - -static void draw_label (PrintInfo * pi, glLabel * label, - glMergeRecord * record); - -static void draw_text_object (PrintInfo * pi, glLabelObject * object, - glMergeRecord * record); -static void draw_box_object (PrintInfo * pi, glLabelObject * object); -static void draw_line_object (PrintInfo * pi, glLabelObject * object); -static void draw_ellipse_object (PrintInfo * pi, glLabelObject * object); -static void draw_image_object (PrintInfo * pi, glLabelObject * object); -static void draw_barcode_object (PrintInfo * pi, glLabelObject * object, - glMergeRecord * record); - -static void draw_outline (PrintInfo * pi, glLabel * label); -#ifdef CLIP_LABEL -static void clip_to_outline (PrintInfo * pi, glLabel * label); -#endif - -static void create_rectangle_path (GnomePrintContext * pc, - gdouble x0, gdouble y0, - gdouble w, gdouble h); -static void create_ellipse_path (GnomePrintContext * pc, - gdouble x0, gdouble y0, - gdouble rx, gdouble ry); -static void create_rounded_rectangle_path (GnomePrintContext * pc, - gdouble x0, gdouble y0, - gdouble w, gdouble h, gdouble r); - -/*****************************************************************************/ -/* Simple (no merge data) print command. */ -/*****************************************************************************/ -void -gl_print_simple (GnomePrintMaster * master, - glLabel * label, - gint n_sheets, - gint first, - gint last, - gboolean outline_flag, - gboolean reverse_flag) -{ - PrintInfo *pi; - gint i_sheet, i_label; - gchar *page_str = NULL; - - pi = print_info_new (master, label); - - for (i_sheet = 0; i_sheet < n_sheets; i_sheet++) { - - page_str = g_strdup_printf ("sheet %d", i_sheet + 1); - gnome_print_beginpage (pi->pc, page_str); - g_free (page_str); - - for (i_label = first - 1; i_label < last; i_label++) { - - print_label (pi, label, i_label, NULL, - outline_flag, reverse_flag); - - } - - gnome_print_showpage (pi->pc); - } - - print_info_free (&pi); -} - -/*****************************************************************************/ -/* Merge print command (collated copies) */ -/*****************************************************************************/ -void -gl_print_merge_collated (GnomePrintMaster * master, - glLabel * label, - GList * record_list, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag) -{ - PrintInfo *pi; - gint i_sheet, i_label, n_labels_per_page, i_copy; - gchar *str = NULL; - glMergeRecord *record; - GList *p; - - pi = print_info_new (master, label); - - n_labels_per_page = (pi->template->nx) * (pi->template->ny); - - i_sheet = 0; - i_label = first - 1; - - for ( p=record_list; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) { - for (i_copy = 0; i_copy < n_copies; i_copy++) { - - if ((i_label == 0) || (i_sheet == 0)) { - str = g_strdup_printf ("sheet %d", - ++i_sheet); - gnome_print_beginpage (pi->pc, str); - g_free (str); - } - - print_label (pi, label, i_label, record, - outline_flag, reverse_flag); - - i_label = (i_label + 1) % n_labels_per_page; - if (i_label == 0) { - gnome_print_showpage (pi->pc); - } - } - } - } - - if (i_label != 0) { - gnome_print_showpage (pi->pc); - } - - print_info_free (&pi); -} - -/*****************************************************************************/ -/* Merge print command (uncollated copies) */ -/*****************************************************************************/ -void -gl_print_merge_uncollated (GnomePrintMaster * master, - glLabel * label, - GList * record_list, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag) -{ - PrintInfo *pi; - gint i_sheet, i_label, n_labels_per_page, i_copy; - gchar *str = NULL; - glMergeRecord *record; - GList *p; - - pi = print_info_new (master, label); - - n_labels_per_page = (pi->template->nx) * (pi->template->ny); - - i_sheet = 0; - i_label = first - 1; - - for (i_copy = 0; i_copy < n_copies; i_copy++) { - - for ( p=record_list; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) { - - - if ((i_label == 0) || (i_sheet == 0)) { - str = g_strdup_printf ("sheet %d", - ++i_sheet); - gnome_print_beginpage (pi->pc, str); - g_free (str); - } - - print_label (pi, label, i_label, record, - outline_flag, reverse_flag); - - i_label = (i_label + 1) % n_labels_per_page; - if (i_label == 0) { - gnome_print_showpage (pi->pc); - } - } - } - - } - if (i_label != 0) { - gnome_print_showpage (pi->pc); - } - - print_info_free (&pi); -} - -/*****************************************************************************/ -/* Batch print. Call appropriate function above. */ -/*****************************************************************************/ -void -gl_print_batch (GnomePrintMaster * master, glLabel * label, - gint n_sheets, gint n_copies, - gboolean outline_flag, gboolean reverse_flag) -{ - gint n_per_page; - GList *record_list = NULL; - - if ( label->merge_type == GL_MERGE_NONE ) { - n_per_page = (label->template->nx)*(label->template->ny); - - gl_print_simple (master, label, n_sheets, 1, n_per_page, - outline_flag, reverse_flag); - } else { - record_list = gl_merge_read_data (label->merge_type, - label->merge_fields, - label->merge_src); - - gl_print_merge_collated (master, label, record_list, - n_copies, 1, - outline_flag, reverse_flag); - } -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. new print info structure */ -/*---------------------------------------------------------------------------*/ -static PrintInfo * -print_info_new (GnomePrintMaster * master, - glLabel * label) -{ - const GnomePaper *paper; - PrintInfo *pi = g_new0 (PrintInfo, 1); - glTemplate *template = label->template; - - if (template == NULL) { - WARN ("Undefined template \"%s\"", label->template_name); - return NULL; - } - - pi->pc = gnome_print_master_get_context (master); - - if ((template != NULL) && (template->page_size != NULL)) { - paper = gnome_paper_with_name (template->page_size); - } else { - paper = gnome_paper_with_name (GL_PRINT_DEFAULT_PAPER); - } - gnome_print_master_set_paper (master, paper); - - pi->template = template; - pi->label_rotate_flag = label->rotate_flag; - - return pi; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. free print info structure */ -/*---------------------------------------------------------------------------*/ -static void -print_info_free (PrintInfo ** pi) -{ - gnome_print_context_close ((*pi)->pc); - - g_free (*pi); - *pi = NULL; -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Print i'th label. */ -/*---------------------------------------------------------------------------*/ -static void -print_label (PrintInfo * pi, - glLabel * label, - gint i_label, - glMergeRecord * record, - gboolean outline_flag, - gboolean reverse_flag) -{ - gdouble a[6]; - gint ix, iy; - - ix = i_label % (pi->template->nx); - iy = ((pi->template->ny) - 1) - (i_label / (pi->template->nx)); - - gnome_print_gsave (pi->pc); - - /* Transform coordinate system to be relative to upper corner */ - /* of the current label */ - gnome_print_translate (pi->pc, - ix * (pi->template->dx) + pi->template->x0, - iy * (pi->template->dy) + pi->template->y0); - if (!label->rotate_flag) { - art_affine_scale (a, 1.0, -1.0); - a[5] = label->height; - gnome_print_concat (pi->pc, a); - } else { - gnome_print_rotate (pi->pc, 90.0); - gnome_print_scale (pi->pc, 1.0, -1.0); - } - if ( reverse_flag ) { - gnome_print_translate (pi->pc, label->width, 0.0); - art_affine_scale (a, -1.0, 1.0); - gnome_print_concat (pi->pc, a); - } - if (outline_flag) { - draw_outline (pi, label); - } -#ifdef CLIP_LABEL /* FIXME: this may be causing problems for some people. */ - clip_to_outline (pi, label); -#endif - draw_label (pi, label, record); - - gnome_print_grestore (pi->pc); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw label. */ -/*---------------------------------------------------------------------------*/ -static void -draw_label (PrintInfo * pi, - glLabel * label, - glMergeRecord * record) -{ - GList *p_obj; - glLabelObject *object; - - for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) { - object = (glLabelObject *) p_obj->data; - - if (object->type == GL_LABEL_OBJECT_TEXT) { - draw_text_object (pi, object, record); - } else if (object->type == GL_LABEL_OBJECT_BOX) { - draw_box_object (pi, object); - } else if (object->type == GL_LABEL_OBJECT_LINE) { - draw_line_object (pi, object); - } else if (object->type == GL_LABEL_OBJECT_ELLIPSE) { - draw_ellipse_object (pi, object); - } else if (object->type == GL_LABEL_OBJECT_IMAGE) { - draw_image_object (pi, object); - } else if (object->type == GL_LABEL_OBJECT_BARCODE) { - draw_barcode_object (pi, object, record); - } - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw text object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_text_object (PrintInfo * pi, - glLabelObject * object, - glMergeRecord * record) -{ - GnomeFont *font; - gchar **line; - gint i; - gdouble w; - gdouble x_offset, y_offset; - gdouble x, y; - gchar *text, *utf8_text; - - font = gnome_font_new_closest (object->arg.text.font_family, - object->arg.text.font_weight, - object->arg.text.font_italic_flag, - object->arg.text.font_size); - gnome_print_setfont (pi->pc, font); - - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.text.color), - GREEN (object->arg.text.color), - BLUE (object->arg.text.color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.text.color)); - - text = gl_text_node_lines_expand (object->arg.text.lines, record); - line = g_strsplit (text, "\n", -1); - g_free (text); - - for (i = 0; line[i] != NULL; i++) { - - utf8_text = gl_hack_text_to_utf8 (line[i]); - - w = gl_hack_get_width_string (font, line[i]); - - switch (object->arg.text.just) { - case GTK_JUSTIFY_LEFT: - x_offset = 0.0; - break; - case GTK_JUSTIFY_CENTER: - x_offset = -w / 2.0; - break; - case GTK_JUSTIFY_RIGHT: - x_offset = -w; - break; - default: - x_offset = 0.0; - break; /* shouldn't happen */ - } - - y_offset = (i + 1) * object->arg.text.font_size - - gnome_font_get_descender (font); - - x = object->x + x_offset; - y = object->y + y_offset; - gnome_print_moveto (pi->pc, x, y); - - gnome_print_gsave (pi->pc); - gnome_print_scale (pi->pc, 1.0, -1.0); - gnome_print_show (pi->pc, utf8_text); - gnome_print_grestore (pi->pc); - - g_free (utf8_text); - } - - g_strfreev (line); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw box object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_box_object (PrintInfo * pi, - glLabelObject * object) -{ - gdouble x, y, w, h; - - x = object->x; - y = object->y; - w = object->arg.box.w; - h = object->arg.box.h; - - /* Paint fill color */ - create_rectangle_path (pi->pc, x, y, w, h); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.box.fill_color), - GREEN (object->arg.box.fill_color), - BLUE (object->arg.box.fill_color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.box.fill_color)); - gnome_print_fill (pi->pc); - - /* Draw outline */ - create_rectangle_path (pi->pc, x, y, w, h); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.box.line_color), - GREEN (object->arg.box.line_color), - BLUE (object->arg.box.line_color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.box.line_color)); - gnome_print_setlinewidth (pi->pc, object->arg.box.line_width); - gnome_print_stroke (pi->pc); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw line object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_line_object (PrintInfo * pi, - glLabelObject * object) -{ - gdouble x, y, dx, dy; - - x = object->x; - y = object->y; - dx = object->arg.line.dx; - dy = object->arg.line.dy; - - gnome_print_moveto (pi->pc, x, y); - gnome_print_lineto (pi->pc, x + dx, y + dy); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.line.line_color), - GREEN (object->arg.line.line_color), - BLUE (object->arg.line.line_color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.line.line_color)); - gnome_print_setlinewidth (pi->pc, object->arg.line.line_width); - gnome_print_stroke (pi->pc); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw ellipse object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_ellipse_object (PrintInfo * pi, - glLabelObject * object) -{ - gdouble x0, y0, rx, ry; - - rx = object->arg.ellipse.w / 2.0; - ry = object->arg.ellipse.h / 2.0; - x0 = object->x + rx; - y0 = object->y + ry; - - /* Paint fill color */ - create_ellipse_path (pi->pc, x0, y0, rx, ry); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.ellipse.fill_color), - GREEN (object->arg.ellipse.fill_color), - BLUE (object->arg.ellipse.fill_color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.ellipse.fill_color)); - gnome_print_fill (pi->pc); - - /* Draw outline */ - create_ellipse_path (pi->pc, x0, y0, rx, ry); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.ellipse.line_color), - GREEN (object->arg.ellipse.line_color), - BLUE (object->arg.ellipse.line_color)); - gnome_print_setopacity (pi->pc, ALPHA (object->arg.ellipse.line_color)); - gnome_print_setlinewidth (pi->pc, object->arg.ellipse.line_width); - gnome_print_stroke (pi->pc); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw image object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_image_object (PrintInfo * pi, - glLabelObject * object) -{ - gdouble x, y, w, h; - GdkPixbuf *pixbuf; - - x = object->x; - y = object->y; - w = object->arg.image.w; - h = object->arg.image.h; - - pixbuf = object->arg.image.image; - - gnome_print_gsave (pi->pc); - gnome_print_translate (pi->pc, x, y + h); - gnome_print_scale (pi->pc, w, -h); - gnome_print_pixbuf (pi->pc, pixbuf); - gnome_print_grestore (pi->pc); - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw box object. */ -/*---------------------------------------------------------------------------*/ -static void -draw_barcode_object (PrintInfo * pi, - glLabelObject * object, - glMergeRecord * record) -{ - glBarcode *gbc; - glBarcodeLine *line; - glBarcodeChar *bchar; - GList *li; - gdouble x, y, y_offset; - GnomeFont *font; - gchar *text, *cstring; - - x = object->x; - y = object->y; - - text = gl_text_node_expand (object->arg.barcode.text_node, record); - gbc = gl_barcode (object->arg.barcode.style, - object->arg.barcode.text_flag, - object->arg.barcode.scale, text); - g_free (text); - - if (gbc == NULL) { - - font = gnome_font_new_closest (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, 12.0); - gnome_print_setfont (pi->pc, font); - - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.barcode.color), - GREEN (object->arg.barcode.color), - BLUE (object->arg.barcode.color)); - gnome_print_setopacity (pi->pc, - ALPHA (object->arg.barcode.color)); - - y_offset = 12.0 - gnome_font_get_descender (font); - gnome_print_moveto (pi->pc, x, y + y_offset); - - gnome_print_gsave (pi->pc); - gnome_print_scale (pi->pc, 1.0, -1.0); - gnome_print_show (pi->pc, _("Invalid barcode")); - gnome_print_grestore (pi->pc); - - } else { - - for (li = gbc->lines; li != NULL; li = li->next) { - line = (glBarcodeLine *) li->data; - - gnome_print_moveto (pi->pc, x + line->x, y + line->y); - gnome_print_lineto (pi->pc, x + line->x, - y + line->y + line->length); - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.barcode. - color), - GREEN (object->arg.barcode. - color), - BLUE (object->arg.barcode. - color)); - gnome_print_setopacity (pi->pc, - ALPHA (object->arg.barcode. - color)); - gnome_print_setlinewidth (pi->pc, line->width); - gnome_print_stroke (pi->pc); - } - - for (li = gbc->chars; li != NULL; li = li->next) { - bchar = (glBarcodeChar *) li->data; - - font = gnome_font_new_closest (GL_BARCODE_FONT_FAMILY, - GL_BARCODE_FONT_WEIGHT, - FALSE, bchar->fsize); - gnome_print_setfont (pi->pc, font); - - gnome_print_setrgbcolor (pi->pc, - RED (object->arg.barcode. - color), - GREEN (object->arg.barcode. - color), - BLUE (object->arg.barcode. - color)); - gnome_print_setopacity (pi->pc, - ALPHA (object->arg.barcode. - color)); - - y_offset = - bchar->y + bchar->fsize - - gnome_font_get_descender (font); - gnome_print_moveto (pi->pc, x + bchar->x, y + y_offset); - - cstring = g_strdup_printf ("%c", bchar->c); - gnome_print_gsave (pi->pc); - gnome_print_scale (pi->pc, 1.0, -1.0); - gnome_print_show (pi->pc, cstring); - gnome_print_grestore (pi->pc); - g_free (cstring); - - } - - gl_barcode_free (&gbc); - - } - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw outline. */ -/*---------------------------------------------------------------------------*/ -static void -draw_outline (PrintInfo * pi, - glLabel * label) -{ - gdouble w, h, r; - gdouble r1, r2; - - gnome_print_setrgbcolor (pi->pc, 0.25, 0.25, 0.25); - gnome_print_setopacity (pi->pc, 1.0); - gnome_print_setlinewidth (pi->pc, 0.25); - - switch (label->template->style) { - - case GL_TEMPLATE_STYLE_RECT: - w = label->width; - h = label->height; - r = label->template->label_round; - if (r == 0.0) { - /* simple rectangle */ - create_rectangle_path (pi->pc, 0.0, 0.0, w, h); - } else { - /* rectangle with rounded corners */ - create_rounded_rectangle_path (pi->pc, 0.0, 0.0, - w, h, r); - } - gnome_print_stroke (pi->pc); - break; - - case GL_TEMPLATE_STYLE_ROUND: - /* Round style */ - r1 = label->template->label_radius; - create_ellipse_path (pi->pc, r1, r1, r1, r1); - gnome_print_stroke (pi->pc); - break; - - case GL_TEMPLATE_STYLE_CD: - /* CD style, round label w/ concentric round hole */ - r1 = label->template->label_radius; - r2 = label->template->label_hole; - create_ellipse_path (pi->pc, r1, r1, r1, r1); - gnome_print_stroke (pi->pc); - create_ellipse_path (pi->pc, r1, r1, r2, r2); - gnome_print_stroke (pi->pc); - break; - - default: - WARN ("Unknown template label style"); - break; - } - -} - -#ifdef CLIP_LABEL -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Clip to outline. */ -/*---------------------------------------------------------------------------*/ -static void -clip_to_outline (PrintInfo * pi, - glLabel * label) -{ - gdouble w, h, r; - gdouble r1; - - switch (label->template->style) { - - case GL_TEMPLATE_STYLE_RECT: - w = label->width; - h = label->height; - r = label->template->label_round; - if (r == 0.0) { - /* simple rectangle */ - create_rectangle_path (pi->pc, 0.0, 0.0, w, h); - } else { - /* rectangle with rounded corners */ - create_rounded_rectangle_path (pi->pc, 0.0, 0.0, - w, h, r); - } - gnome_print_clip (pi->pc); - break; - - case GL_TEMPLATE_STYLE_ROUND: - case GL_TEMPLATE_STYLE_CD: - r1 = label->template->label_radius; - create_ellipse_path (pi->pc, r1, r1, r1, r1); - gnome_print_clip (pi->pc); - break; - - default: - WARN ("Unknown template label style"); - break; - } - -} -#endif - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Path creation utilities. */ -/*---------------------------------------------------------------------------*/ -static void -create_rectangle_path (GnomePrintContext * pc, - gdouble x0, - gdouble y0, - gdouble w, - gdouble h) -{ - gnome_print_newpath (pc); - gnome_print_moveto (pc, x0, y0); - gnome_print_lineto (pc, x0 + w, y0); - gnome_print_lineto (pc, x0 + w, y0 + h); - gnome_print_lineto (pc, x0, y0 + h); - gnome_print_lineto (pc, x0, y0); - gnome_print_closepath (pc); -} - -static void -create_ellipse_path (GnomePrintContext * pc, - gdouble x0, - gdouble y0, - gdouble rx, - gdouble ry) -{ - gdouble x, y; - gint i_theta; - - gnome_print_newpath (pc); - gnome_print_moveto (pc, x0 + rx, y0); - for (i_theta = 2; i_theta <= 360; i_theta += 2) { - x = x0 + rx * cos (i_theta * M_PI / 180.0); - y = y0 + ry * sin (i_theta * M_PI / 180.0); - gnome_print_lineto (pc, x, y); - } - gnome_print_closepath (pc); -} - -static void -create_rounded_rectangle_path (GnomePrintContext * pc, - gdouble x0, - gdouble y0, - gdouble w, - gdouble h, - gdouble r) -{ - gdouble x, y; - gint i_theta; - - gnome_print_newpath (pc); - - gnome_print_moveto (pc, x0 + r, y0); - for (i_theta = 5; i_theta <= 90; i_theta += 5) { - x = x0 + r - r * sin (i_theta * M_PI / 180.0); - y = y0 + r - r * cos (i_theta * M_PI / 180.0); - gnome_print_lineto (pc, x, y); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - x = x0 + r - r * cos (i_theta * M_PI / 180.0); - y = y0 + (h - r) + r * sin (i_theta * M_PI / 180.0); - gnome_print_lineto (pc, x, y); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - x = x0 + (w - r) + r * sin (i_theta * M_PI / 180.0); - y = y0 + (h - r) + r * cos (i_theta * M_PI / 180.0); - gnome_print_lineto (pc, x, y); - } - for (i_theta = 0; i_theta <= 90; i_theta += 5) { - x = x0 + (w - r) + r * cos (i_theta * M_PI / 180.0); - y = y0 + r - r * sin (i_theta * M_PI / 180.0); - gnome_print_lineto (pc, x, y); - } - gnome_print_lineto (pc, x0 + r, y0); - - gnome_print_closepath (pc); -} diff --git a/glabels1/src/print.h b/glabels1/src/print.h deleted file mode 100644 index 25aec93..0000000 --- a/glabels1/src/print.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print.h: Print module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __PRINT_H__ -#define __PRINT_H__ - -#include <gnome.h> -#include <libgnomeprint/gnome-print-master.h> -#include <libgnomeprint/gnome-print-master-preview.h> -#include "label.h" - -extern void gl_print_simple (GnomePrintMaster * master, glLabel * label, - gint n_sheets, gint first, gint last, - gboolean outline_flag, gboolean reverse_flag); - -extern void gl_print_merge_collated (GnomePrintMaster * master, - glLabel * label, - GList *record_list, - gint n_copies, gint first, - gboolean outline_flag, - gboolean reverse_flag); - -extern void gl_print_merge_uncollated (GnomePrintMaster * master, - glLabel * label, - GList *record_list, - gint n_copies, gint first, - gboolean outline_flag, - gboolean reverse_flag); - -extern void gl_print_batch (GnomePrintMaster * master, glLabel * label, - gint n_sheets, gint n_copies, - gboolean outline_flag, gboolean reverse_flag); - - -#endif diff --git a/glabels1/src/print_copies.c b/glabels1/src/print_copies.c deleted file mode 100644 index 4d8d625..0000000 --- a/glabels1/src/print_copies.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print_copies.c: custom print copies widget module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "print_copies.h" -#include "mini_preview.h" - -#include "debug.h" - -#define MINI_PREVIEW_HEIGHT 175 -#define MINI_PREVIEW_WIDTH 150 - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_print_copies_class_init (glPrintCopiesClass * class); -static void gl_print_copies_init (glPrintCopies * copies); -static void gl_print_copies_destroy (GtkObject * object); - -static void gl_print_copies_construct (glPrintCopies * copies, glLabel * label); - -static void sheets_radio_cb (GtkToggleButton * togglebutton, gpointer user_data); -static void first_spin_cb (GtkSpinButton * spinbutton, gpointer user_data); -static void last_spin_cb (GtkSpinButton * spinbutton, gpointer user_data); - -static void -preview_pressed (glMiniPreview *mini_preview, - gint first, gint last, gpointer user_data); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_print_copies_get_type (void) -{ - static guint print_copies_type = 0; - - if (!print_copies_type) { - GtkTypeInfo print_copies_info = { - "glPrintCopies", - sizeof (glPrintCopies), - sizeof (glPrintCopiesClass), - (GtkClassInitFunc) gl_print_copies_class_init, - (GtkObjectInitFunc) gl_print_copies_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - print_copies_type = gtk_type_unique (gtk_hbox_get_type (), - &print_copies_info); - } - - return print_copies_type; -} - -static void -gl_print_copies_class_init (glPrintCopiesClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - object_class->destroy = gl_print_copies_destroy; -} - -static void -gl_print_copies_init (glPrintCopies * copies) -{ - copies->labels_per_sheet = 0; - - copies->mini_preview = NULL; - - copies->sheets_radio = NULL; - copies->sheets_spin = NULL; - - copies->labels_radio = NULL; - copies->first_spin = NULL; - copies->last_spin = NULL; -} - -static void -gl_print_copies_destroy (GtkObject * object) -{ - glPrintCopies *copies; - glPrintCopiesClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PRINT_COPIES (object)); - - copies = GL_PRINT_COPIES (object); - class = GL_PRINT_COPIES_CLASS (GTK_OBJECT (copies)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_print_copies_new (glLabel * label) -{ - glPrintCopies *copies; - - copies = gtk_type_new (gl_print_copies_get_type ()); - - gl_print_copies_construct (copies, label); - - return GTK_WIDGET (copies); -} - -/*--------------------------------------------------------------------------*/ -/* Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_print_copies_construct (glPrintCopies * copies, - glLabel * label) -{ - GtkWidget *whbox, *wvbox, *whbox1; - GSList *radio_group = NULL; - GtkObject *adjust; - - whbox = GTK_WIDGET (copies); - - copies->labels_per_sheet = label->template->nx * label->template->ny; - - /* mini_preview canvas */ - copies->mini_preview = gl_mini_preview_new (MINI_PREVIEW_HEIGHT, - MINI_PREVIEW_WIDTH); - gl_mini_preview_set_label (GL_MINI_PREVIEW(copies->mini_preview), - label->template->name->data); - gtk_box_pack_start (GTK_BOX (whbox), copies->mini_preview, - TRUE, TRUE, GNOME_PAD); - - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox), wvbox, TRUE, TRUE, GNOME_PAD); - - /* Sheet controls */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (wvbox), whbox1, FALSE, FALSE, GNOME_PAD); - copies->sheets_radio = - gtk_radio_button_new_with_label (radio_group, _("Sheets:")); - gtk_box_pack_start (GTK_BOX (whbox1), copies->sheets_radio, - FALSE, FALSE, 0); - adjust = gtk_adjustment_new (1, 1.0, 10.0, 1.0, 10.0, 10.0); - copies->sheets_spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjust), - 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), copies->sheets_spin, - FALSE, FALSE, 0); - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(copies->mini_preview), - 1, copies->labels_per_sheet); - - /* Label controls */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (wvbox), whbox1, FALSE, FALSE, GNOME_PAD); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (copies->sheets_radio)); - copies->labels_radio = - gtk_radio_button_new_with_label (radio_group, _("Labels")); - gtk_box_pack_start (GTK_BOX (whbox1), copies->labels_radio, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), gtk_label_new (_("from:")), - FALSE, FALSE, 0); - adjust = gtk_adjustment_new (1, 1.0, copies->labels_per_sheet, - 1.0, 10.0, 10.0); - copies->first_spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjust), - 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), copies->first_spin, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (whbox1), gtk_label_new (_("to:")), - FALSE, FALSE, 0); - adjust = gtk_adjustment_new (copies->labels_per_sheet, - 1.0, copies->labels_per_sheet, - 1.0, 10.0, 10.0); - copies->last_spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjust), - 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), copies->last_spin, - FALSE, FALSE, 0); - gtk_widget_set_sensitive (copies->first_spin, FALSE); - gtk_widget_set_sensitive (copies->last_spin, FALSE); - - /* Connect signals to controls */ - gtk_signal_connect (GTK_OBJECT (copies->mini_preview), "pressed", - GTK_SIGNAL_FUNC (preview_pressed), copies); - gtk_signal_connect (GTK_OBJECT (copies->sheets_radio), "toggled", - GTK_SIGNAL_FUNC (sheets_radio_cb), copies); - gtk_signal_connect (GTK_OBJECT (copies->first_spin), "changed", - GTK_SIGNAL_FUNC (first_spin_cb), copies); - gtk_signal_connect (GTK_OBJECT (copies->last_spin), "changed", - GTK_SIGNAL_FUNC (last_spin_cb), copies); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Enable/Disable appropriate controls due to radio button toggle.*/ -/*--------------------------------------------------------------------------*/ -static void -sheets_radio_cb (GtkToggleButton * togglebutton, - gpointer user_data) -{ - glPrintCopies *copies = GL_PRINT_COPIES (user_data); - gint first, last; - - if (gtk_toggle_button_get_active (togglebutton)) { - - gtk_widget_set_sensitive (copies->sheets_spin, TRUE); - gtk_widget_set_sensitive (copies->first_spin, FALSE); - gtk_widget_set_sensitive (copies->last_spin, FALSE); - - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(copies->mini_preview), - 1, copies->labels_per_sheet); - - } else { - - gtk_widget_set_sensitive (copies->sheets_spin, FALSE); - gtk_widget_set_sensitive (copies->first_spin, TRUE); - gtk_widget_set_sensitive (copies->last_spin, TRUE); - - first = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->first_spin)); - last = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->last_spin)); - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(copies->mini_preview), - first, last); - - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change of first spin button */ -/*--------------------------------------------------------------------------*/ -static void -first_spin_cb (GtkSpinButton * spinbutton, - gpointer user_data) -{ - glPrintCopies *copies = GL_PRINT_COPIES (user_data); - gint first, last; - - first = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->first_spin)); - last = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->last_spin)); - - gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (copies->last_spin))-> - lower = first; - - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(copies->mini_preview), - first, last); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change of last spin button */ -/*--------------------------------------------------------------------------*/ -static void -last_spin_cb (GtkSpinButton * spinbutton, - gpointer user_data) -{ - glPrintCopies *copies = GL_PRINT_COPIES (user_data); - gint first, last; - - first = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->first_spin)); - last = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->last_spin)); - - gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (copies->first_spin))-> - upper = last; - - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(copies->mini_preview), - first, last); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Canvas event handler, select first and last items. */ -/*--------------------------------------------------------------------------*/ -static void -preview_pressed (glMiniPreview *mini_preview, - gint first, gint last, gpointer user_data) -{ - glPrintCopies *copies = GL_PRINT_COPIES (user_data); - - gl_print_copies_set_range (copies, 1, first, last); -} - -/****************************************************************************/ -/* query selected range of labels within sheet or number of sheets. */ -/****************************************************************************/ -void -gl_print_copies_get_range (glPrintCopies * copies, - gint * n_sheets, - gint * first_label, - gint * last_label) -{ - gboolean sheets_active; - - sheets_active = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (copies->sheets_radio)); - - if (sheets_active) { - *n_sheets = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->sheets_spin)); - *first_label = 1; - *last_label = copies->labels_per_sheet; - } else { - *n_sheets = 1; - *first_label = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->first_spin)); - *last_label = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->last_spin)); - } -} - -/****************************************************************************/ -/* set range of labels within sheet or number of sheets */ -/****************************************************************************/ -void -gl_print_copies_set_range (glPrintCopies * copies, - gint n_sheets, - gint first_label, - gint last_label) -{ - gint old_first_label; - - old_first_label = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (copies->first_spin)); - - if (first_label > old_first_label) { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (copies->last_spin), - last_label); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (copies->first_spin), - first_label); - } else { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (copies->first_spin), - first_label); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (copies->last_spin), - last_label); - } - if ((first_label == 1) && (last_label == copies->labels_per_sheet)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (copies->sheets_radio), TRUE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON - (copies->sheets_spin), n_sheets); - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (copies->labels_radio), TRUE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON - (copies->sheets_spin), 1.0); - } -} diff --git a/glabels1/src/print_copies.h b/glabels1/src/print_copies.h deleted file mode 100644 index 124c5a2..0000000 --- a/glabels1/src/print_copies.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print_copies.h: custom print copies widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PRINT_COPIES_H__ -#define __PRINT_COPIES_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PRINT_COPIES (gl_print_copies_get_type ()) -#define GL_PRINT_COPIES(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PRINT_COPIES, glPrintCopies )) -#define GL_PRINT_COPIES_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_COPIES, glPrintCopiesClass)) -#define GL_IS_PRINT_COPIES(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PRINT_COPIES)) -#define GL_IS_PRINT_COPIES_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_COPIES)) - -typedef struct _glPrintCopies glPrintCopies; -typedef struct _glPrintCopiesClass glPrintCopiesClass; - -struct _glPrintCopies { - GtkHBox parent_widget; - - gint labels_per_sheet; - - GtkWidget *mini_preview; - - GtkWidget *sheets_radio; - GtkWidget *sheets_spin; - - GtkWidget *labels_radio; - GtkWidget *first_spin; - GtkWidget *last_spin; -}; - -struct _glPrintCopiesClass { - GtkHBoxClass parent_class; -}; - -extern guint gl_print_copies_get_type (void); - -extern GtkWidget *gl_print_copies_new (glLabel * label); - -extern void gl_print_copies_get_range (glPrintCopies * copies, - gint * n_sheets, - gint * first_label, - gint * last_label); - -extern void gl_print_copies_set_range (glPrintCopies * copies, - gint n_sheets, - gint first_label, - gint last_label); - -#endif diff --git a/glabels1/src/print_dialog.c b/glabels1/src/print_dialog.c deleted file mode 100644 index 97aa0a3..0000000 --- a/glabels1/src/print_dialog.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print.c: Print module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#include <config.h> - -#include <math.h> -#include <time.h> -#include <ctype.h> -#include <libgnome/gnome-paper.h> -#include <libgnomeprint/gnome-printer.h> -#include <libgnomeprint/gnome-print-dialog.h> -#include <libgnomeprint/gnome-print-master.h> -#include <libgnomeprint/gnome-print-master-preview.h> - -#include "print_dialog.h" -#include "print.h" -#include "label.h" -#include "bc.h" -#include "template.h" -#include "mdi.h" -#include "hack.h" - -#include "print_copies.h" -#include "print_merge.h" - -#include "debug.h" - -#define RED(x) ( (((x)>>24) & 0xff) / 255.0 ) -#define GREEN(x) ( (((x)>>16) & 0xff) / 255.0 ) -#define BLUE(x) ( (((x)>>8) & 0xff) / 255.0 ) -#define ALPHA(x) ( ( (x) & 0xff) / 255.0 ) - -/*===========================================*/ -/* Private types. */ -/*===========================================*/ - -/*===========================================*/ -/* Private function prototypes. */ -/*===========================================*/ -static void print_sheets (GtkWidget * dlg, glLabel * label, - gboolean preview_flag, - gint n_sheets, gint first, gint last, - gboolean outline_flag, gboolean reverse_flag); - -static void print_sheets_merge (GtkWidget * dlg, glLabel * label, - GList *record_list, - gboolean preview_flag, - gint n_copies, gint first, - gboolean collate_flag, - gboolean outline_flag, gboolean reverse_flag); - - -/*****************************************************************************/ -/* "Print" menu item callback. */ -/*****************************************************************************/ -void -gl_print_dialog_cb (GtkWidget * widget, gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - GnomeApp *app = gnome_mdi_get_active_window (GNOME_MDI (data)); - GtkWidget *dlg = NULL; - GtkWidget *copies = NULL; - GtkWidget *merge = NULL; - GtkWidget *outline_check = NULL; - GtkWidget *reverse_check = NULL; - GtkWidget *wframe, *wvbox; - glLabel *label; - gint ret; - static gboolean outline_flag = FALSE; - static gboolean reverse_flag = FALSE; - static gboolean collate_flag = FALSE; - static gint first = 1, last = 1, n_sheets = 0, n_copies = 1; - GList *record_list = NULL; - gint n_records; - - g_return_if_fail (child != NULL); - g_return_if_fail (app != NULL); - - label = gl_mdi_get_label (child); - - dlg = gnome_print_dialog_new (_("Print"), 0); - - if (label->merge_type == GL_MERGE_NONE) { - - /* ----------- Add simple-copies widget ------------ */ - wframe = gtk_frame_new (_("Copies")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), wframe, - FALSE, FALSE, 0); - - copies = gl_print_copies_new (label); - gtk_container_set_border_width (GTK_CONTAINER (copies), - GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (wframe), copies); - - if (n_sheets) { - gl_print_copies_set_range (GL_PRINT_COPIES (copies), - n_sheets, first, last); - } - - } else { - - /* -------Otherwise add merge control widget ------------ */ - wframe = gtk_frame_new (_("Document merge control")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), wframe, - FALSE, FALSE, 0); - - merge = gl_print_merge_new (label); - gtk_container_set_border_width (GTK_CONTAINER (merge), - GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (wframe), merge); - - record_list = gl_merge_read_data (label->merge_type, - label->merge_fields, - label->merge_src); - n_records = gl_merge_count_records( record_list ); - gl_print_merge_set_copies (GL_PRINT_MERGE(merge), - n_copies, first, n_records, - collate_flag); - } - gtk_widget_show_all (wframe); - - /* ----------- Add custom print options area ------------ */ - wframe = gtk_frame_new (_("Options")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), wframe, - FALSE, FALSE, 0); - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), - GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (wframe), wvbox); - - /* add Outline check button */ - outline_check = - gtk_check_button_new_with_label ( - _("print outlines (to test printer alignment)")); - gtk_box_pack_start (GTK_BOX (wvbox), outline_check, FALSE, FALSE, 0); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (outline_check), - outline_flag); - - /* add Reverse check button */ - reverse_check = - gtk_check_button_new_with_label ( - _("print in reverse (i.e. a mirror image)")); - gtk_box_pack_start (GTK_BOX (wvbox), reverse_check, FALSE, FALSE, 0); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (reverse_check), - reverse_flag); - - gtk_widget_show_all (wframe); - - gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), &dlg); - - gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (app)); - - /* ----------- Now run the dialog and act ---------------- */ - ret = gnome_dialog_run (GNOME_DIALOG (dlg)); - - switch (ret) { - - case GNOME_PRINT_PRINT: - case GNOME_PRINT_PREVIEW: - outline_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (outline_check)); - reverse_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (reverse_check)); - - if (label->merge_type == GL_MERGE_NONE) { - - gl_print_copies_get_range (GL_PRINT_COPIES (copies), - &n_sheets, &first, &last); - print_sheets (dlg, label, - (ret == GNOME_PRINT_PREVIEW), - n_sheets, first, last, - outline_flag, reverse_flag); - - } else { - - gl_print_merge_get_copies (GL_PRINT_MERGE (merge), - &n_copies, &first, - &collate_flag); - print_sheets_merge (dlg, label, record_list, - (ret == GNOME_PRINT_PREVIEW), - n_copies, first, - collate_flag, - outline_flag, - reverse_flag); - } - break; - - default: - break; - - } - - if (dlg) gtk_widget_destroy (GTK_WIDGET (dlg)); - - -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. print the sheets */ -/*---------------------------------------------------------------------------*/ -static void -print_sheets (GtkWidget * dlg, - glLabel * label, - gboolean preview_flag, - gint n_sheets, - gint first, - gint last, - gboolean outline_flag, - gboolean reverse_flag) -{ - GnomePrintMaster *master; - - master = gnome_print_master_new_from_dialog (GNOME_PRINT_DIALOG (dlg)); - gl_print_simple (master, label, n_sheets, first, last, - outline_flag, reverse_flag); - gnome_print_master_close (master); - - if (preview_flag) { - GnomePrintMasterPreview *preview_widget = - gnome_print_master_preview_new (master, _("Print preview")); - gtk_widget_show (GTK_WIDGET (preview_widget)); - } else { - gnome_print_master_print (master); - } - - gtk_object_unref (GTK_OBJECT (master)); -} - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. print the sheets with merge data */ -/*---------------------------------------------------------------------------*/ -static void -print_sheets_merge (GtkWidget * dlg, - glLabel * label, - GList * record_list, - gboolean preview_flag, - gint n_copies, - gint first, - gboolean collate_flag, - gboolean outline_flag, - gboolean reverse_flag) -{ - GnomePrintMaster *master; - - master = gnome_print_master_new_from_dialog (GNOME_PRINT_DIALOG (dlg)); - if ( collate_flag ) { - gl_print_merge_collated (master, label, record_list, - n_copies, first, - outline_flag, reverse_flag); - } else { - gl_print_merge_uncollated (master, label, record_list, - n_copies, first, - outline_flag, reverse_flag); - } - gnome_print_master_close (master); - - if (preview_flag) { - GnomePrintMasterPreview *preview_widget = - gnome_print_master_preview_new (master, _("Print preview")); - gtk_widget_show (GTK_WIDGET (preview_widget)); - } else { - gnome_print_master_print (master); - } - - gtk_object_unref (GTK_OBJECT (master)); -} - diff --git a/glabels1/src/print_dialog.h b/glabels1/src/print_dialog.h deleted file mode 100644 index a55b6e5..0000000 --- a/glabels1/src/print_dialog.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print_dialog.h: Print dialog module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __PRINT_DIALOG_H__ -#define __PRINT_DIALOG_H__ - -#include <gnome.h> -#include "label.h" - -extern void gl_print_dialog_cb (GtkWidget * widget, gpointer data); - -#endif diff --git a/glabels1/src/print_merge.c b/glabels1/src/print_merge.c deleted file mode 100644 index 3ef0033..0000000 --- a/glabels1/src/print_merge.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print_merge.c: print merge widget module - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "print_merge.h" -#include "mini_preview.h" - -#include "pixmaps/collate.xpm" -#include "pixmaps/nocollate.xpm" - -#include "debug.h" - -#define MINI_PREVIEW_HEIGHT 175 -#define MINI_PREVIEW_WIDTH 150 - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_print_merge_class_init (glPrintMergeClass * class); -static void gl_print_merge_init (glPrintMerge * merge); -static void gl_print_merge_destroy (GtkObject * object); - -static void gl_print_merge_construct (glPrintMerge * merge, - glLabel * label); - -static void preview_clicked (glMiniPreview *mini_preview, - gint i_label, gpointer user_data); - -static void collate_check_cb (GtkToggleButton * togglebutton, - gpointer user_data); -static void spin_cb (GtkSpinButton * spinbutton, gpointer user_data); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_print_merge_get_type (void) -{ - static guint print_merge_type = 0; - - if (!print_merge_type) { - GtkTypeInfo print_merge_info = { - "glPrintMerge", - sizeof (glPrintMerge), - sizeof (glPrintMergeClass), - (GtkClassInitFunc) gl_print_merge_class_init, - (GtkObjectInitFunc) gl_print_merge_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - print_merge_type = gtk_type_unique (gtk_hbox_get_type (), - &print_merge_info); - } - - return print_merge_type; -} - -static void -gl_print_merge_class_init (glPrintMergeClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - object_class->destroy = gl_print_merge_destroy; -} - -static void -gl_print_merge_init (glPrintMerge * merge) -{ - merge->mini_preview = NULL; - - merge->copies_spin = NULL; - merge->first_spin = NULL; - merge->collate_image = NULL; - merge->collate_check = NULL; -} - -static void -gl_print_merge_destroy (GtkObject * object) -{ - glPrintMerge *merge; - glPrintMergeClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PRINT_MERGE (object)); - - merge = GL_PRINT_MERGE (object); - class = GL_PRINT_MERGE_CLASS (GTK_OBJECT (merge)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_print_merge_new (glLabel * label) -{ - glPrintMerge *merge; - - merge = gtk_type_new (gl_print_merge_get_type ()); - - gl_print_merge_construct (merge, label); - - return GTK_WIDGET (merge); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_print_merge_construct (glPrintMerge * merge, - glLabel * label) -{ - GtkWidget *whbox, *wvbox, *whbox1; - GtkObject *adjust; - - whbox = GTK_WIDGET (merge); - - merge->labels_per_sheet = label->template->nx * label->template->ny; - - /* mini_preview canvas */ - merge->mini_preview = gl_mini_preview_new (MINI_PREVIEW_HEIGHT, - MINI_PREVIEW_WIDTH); - gl_mini_preview_set_label( GL_MINI_PREVIEW (merge->mini_preview), - label->template->name->data ); - gtk_box_pack_start (GTK_BOX (whbox), merge->mini_preview, - TRUE, TRUE, GNOME_PAD); - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(merge->mini_preview), - 1, 1); - - wvbox = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox), wvbox, TRUE, TRUE, GNOME_PAD); - - /* First Label controls */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (wvbox), whbox1, FALSE, FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox1), - gtk_label_new (_("Start on label")), FALSE, FALSE, - 0); - adjust = - gtk_adjustment_new (1, 1.0, merge->labels_per_sheet, 1.0, 10.0, - 10.0); - merge->first_spin = - gtk_spin_button_new (GTK_ADJUSTMENT (adjust), 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), merge->first_spin, FALSE, FALSE, - 0); - gtk_box_pack_start (GTK_BOX (whbox1), gtk_label_new (_("on 1st sheet")), - FALSE, FALSE, 0); - - /* Collate controls */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_end (GTK_BOX (wvbox), whbox1, FALSE, FALSE, GNOME_PAD); - merge->collate_image = gnome_pixmap_new_from_xpm_d (nocollate_xpm); - gtk_box_pack_start (GTK_BOX (whbox1), merge->collate_image, - FALSE, FALSE, 0); - merge->collate_check = gtk_check_button_new_with_label (_("Collate")); - gtk_box_pack_start (GTK_BOX (whbox1), merge->collate_check, - FALSE, FALSE, 0); - - /* Copy controls */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_end (GTK_BOX (wvbox), whbox1, FALSE, FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (whbox1), gtk_label_new (_("Copies:")), - FALSE, FALSE, 0); - adjust = gtk_adjustment_new (1, 1.0, 10.0, 1.0, 10.0, 10.0); - merge->copies_spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjust), - 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), merge->copies_spin, - FALSE, FALSE, 0); - - /* Connect signals to controls */ - gtk_signal_connect (GTK_OBJECT (merge->mini_preview), "clicked", - GTK_SIGNAL_FUNC (preview_clicked), merge); - gtk_signal_connect (GTK_OBJECT (merge->collate_check), "toggled", - GTK_SIGNAL_FUNC (collate_check_cb), merge); - gtk_signal_connect (GTK_OBJECT (merge->copies_spin), "changed", - GTK_SIGNAL_FUNC (spin_cb), merge); - gtk_signal_connect (GTK_OBJECT (merge->first_spin), "changed", - GTK_SIGNAL_FUNC (spin_cb), merge); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Enable/Disable appropriate controls due to radio button toggle.*/ -/*--------------------------------------------------------------------------*/ -static void -collate_check_cb (GtkToggleButton * togglebutton, - gpointer user_data) -{ - glPrintMerge *merge = GL_PRINT_MERGE (user_data); - - if (gtk_toggle_button_get_active (togglebutton)) { - - gnome_pixmap_load_xpm_d (GNOME_PIXMAP (merge->collate_image), - (char **) collate_xpm); - - } else { - - gnome_pixmap_load_xpm_d (GNOME_PIXMAP (merge->collate_image), - (char **) nocollate_xpm); - - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change of first spin button */ -/*--------------------------------------------------------------------------*/ -static void -spin_cb (GtkSpinButton * spinbutton, - gpointer user_data) -{ - glPrintMerge *merge = GL_PRINT_MERGE (user_data); - gint first, last, n_copies; - - first = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (merge->first_spin)); - - n_copies = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (merge->copies_spin)); - last = first + (n_copies * merge->n_records) - 1; - gl_mini_preview_highlight_range (GL_MINI_PREVIEW(merge->mini_preview), - first, last ); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Canvas event handler, select first and last items. */ -/*--------------------------------------------------------------------------*/ -static void -preview_clicked (glMiniPreview *mini_preview, - gint first, gpointer user_data) -{ - glPrintMerge *merge = GL_PRINT_MERGE (user_data); - gint n_copies, last; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (merge->first_spin), - first); - - n_copies = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (merge->copies_spin)); - last = first + (n_copies * merge->n_records) - 1; - gl_mini_preview_highlight_range (GL_MINI_PREVIEW (merge->mini_preview), - first, last); - -} - -/****************************************************************************/ -/* query selected range of labels within sheet or number of sheets. */ -/****************************************************************************/ -void -gl_print_merge_get_copies (glPrintMerge * merge, - gint * n_copies, - gint * first_label, - gboolean * collate_flag) -{ - *n_copies = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (merge->copies_spin)); - *first_label = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (merge->first_spin)); - *collate_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (merge->collate_check)); -} - -/****************************************************************************/ -/* set range of labels within sheet or number of sheets */ -/****************************************************************************/ -void -gl_print_merge_set_copies (glPrintMerge * merge, - gint n_copies, - gint first_label, - gint n_records, - gboolean collate_flag) -{ - gint last_label; - - merge->n_records = n_records; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (merge->copies_spin), - n_copies); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (merge->first_spin), - first_label); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (merge->collate_check), - collate_flag); - - last_label = first_label + (n_copies * n_records) - 1; - gl_mini_preview_highlight_range (GL_MINI_PREVIEW (merge->mini_preview), - first_label, last_label ); -} diff --git a/glabels1/src/print_merge.h b/glabels1/src/print_merge.h deleted file mode 100644 index a2a6ef8..0000000 --- a/glabels1/src/print_merge.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * print_merge.h: print merge widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PRINT_MERGE_H__ -#define __PRINT_MERGE_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PRINT_MERGE (gl_print_merge_get_type ()) -#define GL_PRINT_MERGE(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PRINT_MERGE, glPrintMerge )) -#define GL_PRINT_MERGE_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_MERGE, glPrintMergeClass)) -#define GL_IS_PRINT_MERGE(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PRINT_MERGE)) -#define GL_IS_PRINT_MERGE_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_MERGE)) - -typedef struct _glPrintMerge glPrintMerge; -typedef struct _glPrintMergeClass glPrintMergeClass; - -struct _glPrintMerge { - GtkHBox parent_widget; - - gint labels_per_sheet; - GtkWidget *mini_preview; - - gint n_records; - - GtkWidget *copies_spin; - GtkWidget *first_spin; - GtkWidget *collate_image; - GtkWidget *collate_check; -}; - -struct _glPrintMergeClass { - GtkHBoxClass parent_class; -}; - -extern guint gl_print_merge_get_type (void); - -extern GtkWidget *gl_print_merge_new (glLabel * label); - -extern void gl_print_merge_get_copies (glPrintMerge * merge, - gint * n_copies, - gint * first_label, - gboolean * collate_flag); - -extern void gl_print_merge_set_copies (glPrintMerge * merge, - gint n_copies, - gint first_label, - gint n_records, - gboolean collate_flag); - -#endif diff --git a/glabels1/src/prop_bc.c b/glabels1/src/prop_bc.c deleted file mode 100644 index 0b0e817..0000000 --- a/glabels1/src/prop_bc.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc.c: barcode properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_bc.h" - -#include "debug.h" - -#define RED(x) ( ((x)>>24) & 0xff ) -#define GREEN(x) ( ((x)>>16) & 0xff ) -#define BLUE(x) ( ((x)>>8) & 0xff ) -#define ALPHA(x) ( (x) & 0xff ) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropBCSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_bc_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_bc_class_init (glPropBCClass * class); -static void gl_prop_bc_init (glPropBC * prop); -static void gl_prop_bc_destroy (GtkObject * object); -static void gl_prop_bc_construct (glPropBC * prop, gchar * label); -static void changed_cb (glPropBC * prop); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_bc_get_type (void) -{ - static guint prop_bc_type = 0; - - if (!prop_bc_type) { - GtkTypeInfo prop_bc_info = { - "glPropBC", - sizeof (glPropBC), - sizeof (glPropBCClass), - (GtkClassInitFunc) gl_prop_bc_class_init, - (GtkObjectInitFunc) gl_prop_bc_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_bc_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_bc_info); - } - - return prop_bc_type; -} - -static void -gl_prop_bc_class_init (glPropBCClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_bc_destroy; - - prop_bc_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropBCClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_bc_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_bc_init (glPropBC * prop) -{ - prop->scale_spin = NULL; - prop->color_picker = NULL; -} - -static void -gl_prop_bc_destroy (GtkObject * object) -{ - glPropBC *prop; - glPropBCClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_BC (object)); - - prop = GL_PROP_BC (object); - class = GL_PROP_BC_CLASS (GTK_OBJECT (prop)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_bc_new (gchar * label) -{ - glPropBC *prop; - - prop = gtk_type_new (gl_prop_bc_get_type ()); - - gl_prop_bc_construct (prop, label); - - return GTK_WIDGET (prop); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_bc_construct (glPropBC * prop, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - GtkObject *adjust; - - wvbox = GTK_WIDGET (prop); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Scale Label */ - wlabel = gtk_label_new (_("Scale:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - /* Scale widget */ - adjust = gtk_adjustment_new (100.0, 50.0, 200.0, 10.0, 10.0, 10.0); - prop->scale_spin = - gtk_spin_button_new (GTK_ADJUSTMENT (adjust), 10.0, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->scale_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - gtk_table_attach_defaults (GTK_TABLE (wtable), prop->scale_spin, 1, 2, - 0, 1); - /* % Label */ - wlabel = gtk_label_new (_("%")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 2, 3, 0, 1); - - /* Line Color Label */ - wlabel = gtk_label_new (_("Color:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - /* Line Color picker widget */ - prop->color_picker = gnome_color_picker_new (); - gtk_signal_connect_object (GTK_OBJECT (prop->color_picker), "color_set", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - gtk_table_attach_defaults (GTK_TABLE (wtable), prop->color_picker, 1, 3, - 1, 2); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropBC * prop) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (prop), prop_bc_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_bc_get_params (glPropBC * prop, - gdouble * scale, - guint * color) -{ - guint8 r, g, b, a; - - /* ------- Get updated scale ------ */ - *scale = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (prop->scale_spin)); - *scale /= 100.0; - - /* ------- Get updated line color ------ */ - gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (prop->color_picker), - &r, &g, &b, &a); - *color = GNOME_CANVAS_COLOR_A (r, g, b, a); - -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_bc_set_params (glPropBC * prop, - gdouble scale, - guint color) -{ - scale *= 100.0; - gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop->scale_spin), scale); - - gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (prop->color_picker), - RED (color), GREEN (color), BLUE (color), - ALPHA (color)); - -} diff --git a/glabels1/src/prop_bc.h b/glabels1/src/prop_bc.h deleted file mode 100644 index f009b1f..0000000 --- a/glabels1/src/prop_bc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc.h: barcode properties widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_BC_H__ -#define __PROP_BC_H__ - -#include <gnome.h> -#include "bc.h" - -#define GL_TYPE_PROP_BC (gl_prop_bc_get_type ()) -#define GL_PROP_BC(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_BC, glPropBC )) -#define GL_PROP_BC_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_BC, glPropBCClass)) -#define GL_IS_PROP_BC(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_BC)) -#define GL_IS_PROP_BC_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_BC)) - -typedef struct _glPropBC glPropBC; -typedef struct _glPropBCClass glPropBCClass; - -struct _glPropBC { - GtkVBox parent_widget; - - GtkWidget *scale_spin; - GtkWidget *color_picker; -}; - -struct _glPropBCClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropBC * prop, gpointer user_data); -}; - -extern guint gl_prop_bc_get_type (void); - -extern GtkWidget *gl_prop_bc_new (gchar * label); - -extern void gl_prop_bc_get_params (glPropBC * prop, - gdouble * scale, - guint * color); - -extern void gl_prop_bc_set_params (glPropBC * prop, - gdouble scale, - guint color); - -#endif diff --git a/glabels1/src/prop_bc_data.c b/glabels1/src/prop_bc_data.c deleted file mode 100644 index 7464bea..0000000 --- a/glabels1/src/prop_bc_data.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc_data.c: barcode data widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_bc_data.h" -#include "merge.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropBCDataSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_bc_data_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_bc_data_class_init (glPropBCDataClass * class); -static void gl_prop_bc_data_init (glPropBCData * bc_data); -static void gl_prop_bc_data_destroy (GtkObject * object); -static void gl_prop_bc_data_construct (glPropBCData * bc_data, - gchar * label, GList * field_defs); - -static void changed_cb (glPropBCData * bc_data); -static void radio_toggled_cb (GtkToggleButton * togglebutton, - glPropBCData * bc_data); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_bc_data_get_type (void) -{ - static guint prop_bc_data_type = 0; - - if (!prop_bc_data_type) { - GtkTypeInfo prop_bc_data_info = { - "glPropBCData", - sizeof (glPropBCData), - sizeof (glPropBCDataClass), - (GtkClassInitFunc) gl_prop_bc_data_class_init, - (GtkObjectInitFunc) gl_prop_bc_data_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_bc_data_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_bc_data_info); - } - - return prop_bc_data_type; -} - -static void -gl_prop_bc_data_class_init (glPropBCDataClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_bc_data_destroy; - - prop_bc_data_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropBCDataClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - prop_bc_data_signals, LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_bc_data_init (glPropBCData * bc_data) -{ - bc_data->literal_radio = NULL; - bc_data->literal_entry = NULL; - - bc_data->key_radio = NULL; - bc_data->key_entry = NULL; -} - -static void -gl_prop_bc_data_destroy (GtkObject * object) -{ - glPropBCData *bc_data; - glPropBCDataClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_BC_DATA (object)); - - bc_data = GL_PROP_BC_DATA (object); - class = GL_PROP_BC_DATA_CLASS (GTK_OBJECT (bc_data)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_bc_data_new (gchar * label, - GList * field_defs) -{ - glPropBCData *bc_data; - - bc_data = gtk_type_new (gl_prop_bc_data_get_type ()); - - gl_prop_bc_data_construct (bc_data, label, field_defs); - - return GTK_WIDGET (bc_data); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_bc_data_construct (glPropBCData * bc_data, - gchar * label, - GList * field_defs) -{ - GtkWidget *wvbox, *wframe, *wtable, *wcombo; - GSList *radio_group = NULL; - GList *keys; - - wvbox = GTK_WIDGET (bc_data); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 2, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Literal radio */ - bc_data->literal_radio = gtk_radio_button_new_with_label (radio_group, - _ - ("Literal:")); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (bc_data->literal_radio)); - gtk_signal_connect (GTK_OBJECT (bc_data->literal_radio), "toggled", - GTK_SIGNAL_FUNC (radio_toggled_cb), - GTK_OBJECT (bc_data)); - gtk_table_attach_defaults (GTK_TABLE (wtable), bc_data->literal_radio, - 0, 1, 0, 1); - - /* Literal entry widget */ - bc_data->literal_entry = gtk_entry_new (); - gtk_widget_set_usize (bc_data->literal_entry, 200, 0); - gtk_signal_connect_object (GTK_OBJECT (bc_data->literal_entry), - "changed", GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (bc_data)); - gtk_table_attach_defaults (GTK_TABLE (wtable), bc_data->literal_entry, - 1, 2, 0, 1); - - /* Key radio */ - bc_data->key_radio = gtk_radio_button_new_with_label (radio_group, - _("Key:")); - gtk_signal_connect (GTK_OBJECT (bc_data->key_radio), "toggled", - GTK_SIGNAL_FUNC (radio_toggled_cb), - GTK_OBJECT (bc_data)); - gtk_table_attach_defaults (GTK_TABLE (wtable), bc_data->key_radio, - 0, 1, 1, 2); - - /* Key entry widget */ - wcombo = gtk_combo_new (); - keys = gl_merge_get_key_list (field_defs); - if (keys != NULL) - gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), keys); - gl_merge_free_key_list (&keys); - bc_data->key_entry = GTK_COMBO (wcombo)->entry; - gtk_entry_set_editable (GTK_ENTRY (bc_data->key_entry), FALSE); - gtk_widget_set_usize (wcombo, 200, 0); - gtk_signal_connect_object (GTK_OBJECT (bc_data->key_entry), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (bc_data)); - gtk_table_attach_defaults (GTK_TABLE (wtable), wcombo, 1, 2, 1, 2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropBCData * bc_data) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (bc_data), prop_bc_data_signals[CHANGED]); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback to handle toggling of radio buttons */ -/*--------------------------------------------------------------------------*/ -static void -radio_toggled_cb (GtkToggleButton * togglebutton, - glPropBCData * bc_data) -{ - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (bc_data->literal_radio))) { - gtk_widget_set_sensitive (bc_data->literal_entry, TRUE); - gtk_widget_set_sensitive (bc_data->key_entry, FALSE); - } else { - gtk_widget_set_sensitive (bc_data->literal_entry, FALSE); - gtk_widget_set_sensitive (bc_data->key_entry, TRUE); - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (bc_data), prop_bc_data_signals[CHANGED]); -} - -/*--------------------------------------------------------------------------*/ -/* Get widget data. */ -/*--------------------------------------------------------------------------*/ -void -gl_prop_bc_data_get_data (glPropBCData * bc_data, - gboolean * field_flag, - gchar ** data, - gchar ** key) -{ - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (bc_data->literal_radio))) { - *field_flag = FALSE; - *data = - gtk_editable_get_chars (GTK_EDITABLE - (bc_data->literal_entry), 0, -1); - *key = NULL; - } else { - *field_flag = TRUE; - *data = NULL; - *key = - gtk_editable_get_chars (GTK_EDITABLE (bc_data->key_entry), - 0, -1); - } -} - -/*--------------------------------------------------------------------------*/ -/* Set widget data. */ -/*--------------------------------------------------------------------------*/ -void -gl_prop_bc_data_set_data (glPropBCData * bc_data, - gboolean merge_flag, - gboolean field_flag, - gchar * data, - gchar * key) -{ - gint pos; - - gtk_widget_set_sensitive (bc_data->key_radio, merge_flag); - - if (!field_flag) { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (bc_data->literal_radio), TRUE); - - gtk_widget_set_sensitive (bc_data->literal_entry, TRUE); - gtk_widget_set_sensitive (bc_data->key_entry, FALSE); - - gtk_signal_handler_block_by_func (GTK_OBJECT - (bc_data->literal_entry), - GTK_SIGNAL_FUNC (changed_cb), - bc_data); - gtk_editable_delete_text (GTK_EDITABLE (bc_data->literal_entry), - 0, -1); - gtk_signal_handler_unblock_by_func (GTK_OBJECT - (bc_data->literal_entry), - GTK_SIGNAL_FUNC - (changed_cb), bc_data); - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (bc_data->literal_entry), - data, strlen (data), &pos); - } else { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (bc_data->key_radio), TRUE); - - gtk_widget_set_sensitive (bc_data->literal_entry, FALSE); - gtk_widget_set_sensitive (bc_data->key_entry, TRUE); - - gtk_signal_handler_block_by_func (GTK_OBJECT - (bc_data->key_entry), - GTK_SIGNAL_FUNC (changed_cb), - bc_data); - gtk_editable_delete_text (GTK_EDITABLE (bc_data->key_entry), 0, - -1); - gtk_signal_handler_unblock_by_func (GTK_OBJECT - (bc_data->key_entry), - GTK_SIGNAL_FUNC - (changed_cb), bc_data); - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (bc_data->key_entry), - data, strlen (data), &pos); - } - -} diff --git a/glabels1/src/prop_bc_data.h b/glabels1/src/prop_bc_data.h deleted file mode 100644 index 0f59e3d..0000000 --- a/glabels1/src/prop_bc_data.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc_data.h: barcode data widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_BC_DATA_H__ -#define __PROP_BC_DATA_H__ - -#include <gnome.h> - -#define GL_TYPE_PROP_BC_DATA (gl_prop_bc_data_get_type ()) -#define GL_PROP_BC_DATA(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_BC_DATA, glPropBCData )) -#define GL_PROP_BC_DATA_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_BC_DATA, glPropBCDataClass)) -#define GL_IS_PROP_BC_DATA(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_BC_DATA)) -#define GL_IS_PROP_BC_DATA_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_BC_DATA)) - -typedef struct _glPropBCData glPropBCData; -typedef struct _glPropBCDataClass glPropBCDataClass; - -struct _glPropBCData { - GtkVBox parent_widget; - - GtkWidget *literal_radio; - GtkWidget *literal_entry; - - GtkWidget *key_radio; - GtkWidget *key_entry; -}; - -struct _glPropBCDataClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropBCData * bc_data, gpointer user_data); -}; - -extern guint gl_prop_bc_data_get_type (void); - -extern GtkWidget *gl_prop_bc_data_new (gchar * label, GList * field_defs); - -extern void gl_prop_bc_data_get_data (glPropBCData * bc_data, - gboolean * field_flag, - gchar ** data, - gchar ** key); - -extern void gl_prop_bc_data_set_data (glPropBCData * bc_data, - gboolean merge_flag, - gboolean field_flag, - gchar * data, - gchar * key); - -#endif diff --git a/glabels1/src/prop_bc_style.c b/glabels1/src/prop_bc_style.c deleted file mode 100644 index 07432ef..0000000 --- a/glabels1/src/prop_bc_style.c +++ /dev/null @@ -1,460 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc_style.c: barcode style selection widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_bc_style.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropBCStyleSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_bc_style_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_bc_style_class_init (glPropBCStyleClass * class); -static void gl_prop_bc_style_init (glPropBCStyle * prop_style); -static void gl_prop_bc_style_destroy (GtkObject * object); -static void gl_prop_bc_style_construct (glPropBCStyle * prop_style, - gchar * label); -static void changed_cb (glPropBCStyle * prop_style); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_bc_style_get_type (void) -{ - static guint prop_bc_style_type = 0; - - if (!prop_bc_style_type) { - GtkTypeInfo prop_bc_style_info = { - "glPropBCStyle", - sizeof (glPropBCStyle), - sizeof (glPropBCStyleClass), - (GtkClassInitFunc) gl_prop_bc_style_class_init, - (GtkObjectInitFunc) gl_prop_bc_style_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_bc_style_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_bc_style_info); - } - - return prop_bc_style_type; -} - -static void -gl_prop_bc_style_class_init (glPropBCStyleClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_bc_style_destroy; - - prop_bc_style_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropBCStyleClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_bc_style_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_bc_style_init (glPropBCStyle * prop_style) -{ - prop_style->postnet_radio = NULL; - prop_style->ean_radio = NULL; - prop_style->upc_radio = NULL; - prop_style->isbn_radio = NULL; - prop_style->code39_radio = NULL; - prop_style->code128_radio = NULL; - prop_style->code128c_radio = NULL; - prop_style->code128b_radio = NULL; - prop_style->i25_radio = NULL; - prop_style->cbr_radio = NULL; - prop_style->msi_radio = NULL; - prop_style->pls_radio = NULL; -} - -static void -gl_prop_bc_style_destroy (GtkObject * object) -{ - glPropBCStyle *prop_style; - glPropBCStyleClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_BC_STYLE (object)); - - prop_style = GL_PROP_BC_STYLE (object); - class = GL_PROP_BC_STYLE_CLASS (GTK_OBJECT (prop_style)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_bc_style_new (gchar * label) -{ - glPropBCStyle *prop_style; - - prop_style = gtk_type_new (gl_prop_bc_style_get_type ()); - - gl_prop_bc_style_construct (prop_style, label); - - return GTK_WIDGET (prop_style); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_bc_style_construct (glPropBCStyle * prop, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wvbox1, *whbox2, *wvbox2; - GSList *radio_group = NULL; - - wvbox = GTK_WIDGET (prop); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wvbox1 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox1), 10); - gtk_container_add (GTK_CONTAINER (wframe), wvbox1); - - whbox2 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_container_add (GTK_CONTAINER (wvbox1), whbox2); - - /* ... Start column ... */ - wvbox2 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox2), 10); - gtk_box_pack_start (GTK_BOX (whbox2), wvbox2, FALSE, FALSE, 0); - - /* POSTNET button */ - prop->postnet_radio = - gtk_radio_button_new_with_label (radio_group, "POSTNET"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->postnet_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->postnet_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->postnet_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* EAN button */ - prop->ean_radio = gtk_radio_button_new_with_label (radio_group, "EAN"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->ean_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->ean_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->ean_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* UPC button */ - prop->upc_radio = gtk_radio_button_new_with_label (radio_group, "UPC"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->upc_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->upc_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->upc_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* ISBN button */ - prop->isbn_radio = - gtk_radio_button_new_with_label (radio_group, "ISBN"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->isbn_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->isbn_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->isbn_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* CODE39 button */ - prop->code39_radio = - gtk_radio_button_new_with_label (radio_group, "Code 39"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->code39_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->code39_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->code39_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* CODE128 button */ - prop->code128_radio = - gtk_radio_button_new_with_label (radio_group, "Code 128"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->code128_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->code128_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->code128_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* ... Start column ... */ - wvbox2 = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (wvbox2), 10); - gtk_box_pack_start (GTK_BOX (whbox2), wvbox2, FALSE, FALSE, 0); - - /* CODE128B button */ - prop->code128b_radio = - gtk_radio_button_new_with_label (radio_group, "Code 128-B"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->code128b_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->code128b_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->code128b_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* CODE128C button */ - prop->code128c_radio = - gtk_radio_button_new_with_label (radio_group, "Code 128-C"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->code128c_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->code128c_radio, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->code128c_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* I25 button */ - prop->i25_radio = - gtk_radio_button_new_with_label (radio_group, "Interleaved 2 of 5"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->i25_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->i25_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->i25_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* CBR button */ - prop->cbr_radio = - gtk_radio_button_new_with_label (radio_group, "Codabar"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->cbr_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->cbr_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->cbr_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* MSI button */ - prop->msi_radio = gtk_radio_button_new_with_label (radio_group, "MSI"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->msi_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->msi_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->msi_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* PLS button */ - prop->pls_radio = - gtk_radio_button_new_with_label (radio_group, "Plessey"); - radio_group = - gtk_radio_button_group (GTK_RADIO_BUTTON (prop->pls_radio)); - gtk_box_pack_start (GTK_BOX (wvbox2), prop->pls_radio, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->pls_radio), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - - /* ... Separator ... */ - gtk_box_pack_start (GTK_BOX (wvbox1), gtk_hseparator_new (), FALSE, - FALSE, 0); - - /* Text checkbox widget */ - prop->text_check = - gtk_check_button_new_with_label (_("Show text with barcode")); - gtk_box_pack_start (GTK_BOX (wvbox1), prop->text_check, - FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (prop->text_check), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (prop)); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropBCStyle * prop_style) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (prop_style), - prop_bc_style_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_bc_style_get_params (glPropBCStyle * prop, - glBarcodeStyle * style, - gboolean * text_flag) -{ - *text_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prop->text_check)); - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->postnet_radio))) { - *style = GL_BARCODE_STYLE_POSTNET; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->ean_radio))) { - *style = GL_BARCODE_STYLE_EAN; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->upc_radio))) { - *style = GL_BARCODE_STYLE_UPC; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->isbn_radio))) { - *style = GL_BARCODE_STYLE_ISBN; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->code39_radio))) { - *style = GL_BARCODE_STYLE_39; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->code128_radio))) { - *style = GL_BARCODE_STYLE_128; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->code128c_radio))) { - *style = GL_BARCODE_STYLE_128C; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->code128b_radio))) { - *style = GL_BARCODE_STYLE_128B; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->i25_radio))) { - *style = GL_BARCODE_STYLE_I25; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->cbr_radio))) { - *style = GL_BARCODE_STYLE_CBR; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->msi_radio))) { - *style = GL_BARCODE_STYLE_MSI; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (prop->pls_radio))) { - *style = GL_BARCODE_STYLE_PLS; - } - -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_bc_style_set_params (glPropBCStyle * prop, - glBarcodeStyle style, - gboolean text_flag) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prop->text_check), - text_flag); - - switch (style) { - case GL_BARCODE_STYLE_POSTNET: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->postnet_radio), TRUE); - break; - case GL_BARCODE_STYLE_EAN: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->ean_radio), TRUE); - break; - case GL_BARCODE_STYLE_UPC: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->upc_radio), TRUE); - break; - case GL_BARCODE_STYLE_ISBN: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->isbn_radio), TRUE); - break; - case GL_BARCODE_STYLE_39: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->code39_radio), TRUE); - break; - case GL_BARCODE_STYLE_128: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->code128_radio), TRUE); - break; - case GL_BARCODE_STYLE_128C: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->code128c_radio), TRUE); - break; - case GL_BARCODE_STYLE_128B: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->code128b_radio), TRUE); - break; - case GL_BARCODE_STYLE_I25: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->i25_radio), TRUE); - break; - case GL_BARCODE_STYLE_CBR: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->cbr_radio), TRUE); - break; - case GL_BARCODE_STYLE_MSI: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->msi_radio), TRUE); - break; - case GL_BARCODE_STYLE_PLS: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->pls_radio), TRUE); - break; - default: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (prop->postnet_radio), TRUE); - break; - } -} diff --git a/glabels1/src/prop_bc_style.h b/glabels1/src/prop_bc_style.h deleted file mode 100644 index 13065e4..0000000 --- a/glabels1/src/prop_bc_style.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_bc_style.h: barcode style selection widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_BC_STYLE_H__ -#define __PROP_BC_STYLE_H__ - -#include <gnome.h> -#include "bc.h" - -#define GL_TYPE_PROP_BC_STYLE (gl_prop_bc_style_get_type ()) -#define GL_PROP_BC_STYLE(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_BC_STYLE, glPropBCStyle )) -#define GL_PROP_BC_STYLE_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_BC_STYLE, glPropBCStyleClass)) -#define GL_IS_PROP_BC_STYLE(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_BC_STYLE)) -#define GL_IS_PROP_BC_STYLE_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_BC_STYLE)) - -typedef struct _glPropBCStyle glPropBCStyle; -typedef struct _glPropBCStyleClass glPropBCStyleClass; - -struct _glPropBCStyle { - GtkVBox parent_widget; - - GtkWidget *postnet_radio; - GtkWidget *ean_radio; - GtkWidget *upc_radio; - GtkWidget *isbn_radio; - GtkWidget *code39_radio; - GtkWidget *code128_radio; - GtkWidget *code128c_radio; - GtkWidget *code128b_radio; - GtkWidget *i25_radio; - GtkWidget *cbr_radio; - GtkWidget *msi_radio; - GtkWidget *pls_radio; - - GtkWidget *text_check; -}; - -struct _glPropBCStyleClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropBCStyle * prop, gpointer user_data); -}; - -extern guint gl_prop_bc_style_get_type (void); - -extern GtkWidget *gl_prop_bc_style_new (gchar * label); - -extern void gl_prop_bc_style_get_params (glPropBCStyle * prop_style, - glBarcodeStyle * style, - gboolean * text_flag); - -extern void gl_prop_bc_style_set_params (glPropBCStyle * prop_style, - glBarcodeStyle style, - gboolean text_flag); - -#endif diff --git a/glabels1/src/prop_fill.c b/glabels1/src/prop_fill.c deleted file mode 100644 index f9f5151..0000000 --- a/glabels1/src/prop_fill.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_fill.c: fill properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_fill.h" - -#include "debug.h" - -#define RED(x) ( ((x)>>24) & 0xff ) -#define GREEN(x) ( ((x)>>16) & 0xff ) -#define BLUE(x) ( ((x)>>8) & 0xff ) -#define ALPHA(x) ( (x) & 0xff ) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropFillSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_fill_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_fill_class_init (glPropFillClass * class); -static void gl_prop_fill_init (glPropFill * fill); -static void gl_prop_fill_destroy (GtkObject * object); -static void gl_prop_fill_construct (glPropFill * fill, gchar * label); -static void changed_cb (glPropFill * fill); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_fill_get_type (void) -{ - static guint prop_fill_type = 0; - - if (!prop_fill_type) { - GtkTypeInfo prop_fill_info = { - "glPropFill", - sizeof (glPropFill), - sizeof (glPropFillClass), - (GtkClassInitFunc) gl_prop_fill_class_init, - (GtkObjectInitFunc) gl_prop_fill_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_fill_type = - gtk_type_unique (gtk_vbox_get_type (), &prop_fill_info); - } - - return prop_fill_type; -} - -static void -gl_prop_fill_class_init (glPropFillClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_fill_destroy; - - prop_fill_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropFillClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_fill_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_fill_init (glPropFill * fill) -{ - fill->color_picker = NULL; -} - -static void -gl_prop_fill_destroy (GtkObject * object) -{ - glPropFill *fill; - glPropFillClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_FILL (object)); - - fill = GL_PROP_FILL (object); - class = GL_PROP_FILL_CLASS (GTK_OBJECT (fill)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_fill_new (gchar * label) -{ - glPropFill *fill; - - fill = gtk_type_new (gl_prop_fill_get_type ()); - - gl_prop_fill_construct (fill, label); - - return GTK_WIDGET (fill); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_fill_construct (glPropFill * fill, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - - wvbox = GTK_WIDGET (fill); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (1, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Fill Color Label */ - wlabel = gtk_label_new (_("Color:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - - /* Fill Color picker widget */ - fill->color_picker = gnome_color_picker_new (); - gtk_signal_connect_object (GTK_OBJECT (fill->color_picker), "color_set", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (fill)); - gtk_table_attach_defaults (GTK_TABLE (wtable), fill->color_picker, 1, 3, - 0, 1); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropFill * fill) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (fill), prop_fill_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_fill_get_params (glPropFill * fill, - guint * color) -{ - guint8 r, g, b, a; - - gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (fill->color_picker), - &r, &g, &b, &a); - *color = GNOME_CANVAS_COLOR_A (r, g, b, a); -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_fill_set_params (glPropFill * fill, - guint color) -{ - gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (fill->color_picker), - RED (color), GREEN (color), BLUE (color), - ALPHA (color)); -} diff --git a/glabels1/src/prop_fill.h b/glabels1/src/prop_fill.h deleted file mode 100644 index 0605e20..0000000 --- a/glabels1/src/prop_fill.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_fill.h: fill properties widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_FILL_H__ -#define __PROP_FILL_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_FILL (gl_prop_fill_get_type ()) -#define GL_PROP_FILL(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_FILL, glPropFill )) -#define GL_PROP_FILL_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_FILL, glPropFillClass)) -#define GL_IS_PROP_FILL(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_FILL)) -#define GL_IS_PROP_FILL_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_FILL)) - -typedef struct _glPropFill glPropFill; -typedef struct _glPropFillClass glPropFillClass; - -struct _glPropFill { - GtkVBox parent_widget; - - GtkWidget *color_picker; -}; - -struct _glPropFillClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropFill * fill, gpointer user_data); -}; - -extern guint gl_prop_fill_get_type (void); - -extern GtkWidget *gl_prop_fill_new (gchar * label); - -extern void gl_prop_fill_get_params (glPropFill * fill, guint * color); - -extern void gl_prop_fill_set_params (glPropFill * fill, guint color); - -#endif diff --git a/glabels1/src/prop_line.c b/glabels1/src/prop_line.c deleted file mode 100644 index a73811e..0000000 --- a/glabels1/src/prop_line.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_line.c: line properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_line.h" - -#include "debug.h" - -#define RED(x) ( ((x)>>24) & 0xff ) -#define GREEN(x) ( ((x)>>16) & 0xff ) -#define BLUE(x) ( ((x)>>8) & 0xff ) -#define ALPHA(x) ( (x) & 0xff ) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropLineSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_line_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_line_class_init (glPropLineClass * class); -static void gl_prop_line_init (glPropLine * line); -static void gl_prop_line_destroy (GtkObject * object); -static void gl_prop_line_construct (glPropLine * line, gchar * label); -static void changed_cb (glPropLine * line); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_line_get_type (void) -{ - static guint prop_line_type = 0; - - if (!prop_line_type) { - GtkTypeInfo prop_line_info = { - "glPropLine", - sizeof (glPropLine), - sizeof (glPropLineClass), - (GtkClassInitFunc) gl_prop_line_class_init, - (GtkObjectInitFunc) gl_prop_line_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_line_type = - gtk_type_unique (gtk_vbox_get_type (), &prop_line_info); - } - - return prop_line_type; -} - -static void -gl_prop_line_class_init (glPropLineClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_line_destroy; - - prop_line_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropLineClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_line_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_line_init (glPropLine * line) -{ - line->width_spin = NULL; - line->color_picker = NULL; - line->units_label = NULL; -} - -static void -gl_prop_line_destroy (GtkObject * object) -{ - glPropLine *line; - glPropLineClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_LINE (object)); - - line = GL_PROP_LINE (object); - class = GL_PROP_LINE_CLASS (GTK_OBJECT (line)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_line_new (gchar * label) -{ - glPropLine *line; - - line = gtk_type_new (gl_prop_line_get_type ()); - - gl_prop_line_construct (line, label); - - return GTK_WIDGET (line); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_line_construct (glPropLine * line, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - GtkObject *adjust; - - wvbox = GTK_WIDGET (line); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Line Width Label */ - wlabel = gtk_label_new (_("Width:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - /* Line Width widget */ - adjust = gtk_adjustment_new (1.0, 0.25, 4.0, 0.25, 1.0, 1.0); - line->width_spin = - gtk_spin_button_new (GTK_ADJUSTMENT (adjust), 0.25, 2); - gtk_signal_connect_object (GTK_OBJECT (line->width_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (line)); - gtk_table_attach_defaults (GTK_TABLE (wtable), line->width_spin, 1, 2, - 0, 1); - /* Line Width units */ - line->units_label = gtk_label_new (_("points")); - gtk_misc_set_alignment (GTK_MISC (line->units_label), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), line->units_label, - 2, 3, 0, 1); - - /* Line Color Label */ - wlabel = gtk_label_new (_("Color:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - /* Line Color picker widget */ - line->color_picker = gnome_color_picker_new (); - gtk_signal_connect_object (GTK_OBJECT (line->color_picker), "color_set", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (line)); - gtk_table_attach_defaults (GTK_TABLE (wtable), line->color_picker, 1, 3, - 1, 2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropLine * line) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (line), prop_line_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_line_get_params (glPropLine * line, - gdouble * width, - guint * color) -{ - guint8 r, g, b, a; - - *width = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON - (line->width_spin)); - - gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (line->color_picker), - &r, &g, &b, &a); - *color = GNOME_CANVAS_COLOR_A (r, g, b, a); -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_line_set_params (glPropLine * line, - gdouble width, - guint color) -{ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (line->width_spin), width); - - gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (line->color_picker), - RED (color), GREEN (color), BLUE (color), - ALPHA (color)); -} diff --git a/glabels1/src/prop_line.h b/glabels1/src/prop_line.h deleted file mode 100644 index 1350fac..0000000 --- a/glabels1/src/prop_line.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_line.h: line properties widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_LINE_H__ -#define __PROP_LINE_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_LINE (gl_prop_line_get_type ()) -#define GL_PROP_LINE(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_LINE, glPropLine )) -#define GL_PROP_LINE_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_LINE, glPropLineClass)) -#define GL_IS_PROP_LINE(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_LINE)) -#define GL_IS_PROP_LINE_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_LINE)) - -typedef struct _glPropLine glPropLine; -typedef struct _glPropLineClass glPropLineClass; - -struct _glPropLine { - GtkVBox parent_widget; - - GtkWidget *width_spin; - GtkWidget *color_picker; - GtkWidget *units_label; -}; - -struct _glPropLineClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropLine * line, gpointer user_data); -}; - -extern guint gl_prop_line_get_type (void); - -extern GtkWidget *gl_prop_line_new (gchar * label); - -extern void gl_prop_line_get_params (glPropLine * line, - gdouble * width, - guint * color); - -extern void gl_prop_line_set_params (glPropLine * line, - gdouble width, - guint color); - -#endif diff --git a/glabels1/src/prop_position.c b/glabels1/src/prop_position.c deleted file mode 100644 index 039afe6..0000000 --- a/glabels1/src/prop_position.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_position.c: position properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_position.h" -#include "prefs.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropPositionSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_position_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_position_class_init (glPropPositionClass * class); -static void gl_prop_position_init (glPropPosition * position); -static void gl_prop_position_destroy (GtkObject * object); -static void gl_prop_position_construct (glPropPosition * position, - gchar * label); -static void changed_cb (glPropPosition * position); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_position_get_type (void) -{ - static guint prop_position_type = 0; - - if (!prop_position_type) { - GtkTypeInfo prop_position_info = { - "glPropPosition", - sizeof (glPropPosition), - sizeof (glPropPositionClass), - (GtkClassInitFunc) gl_prop_position_class_init, - (GtkObjectInitFunc) gl_prop_position_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_position_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_position_info); - } - - return prop_position_type; -} - -static void -gl_prop_position_class_init (glPropPositionClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_position_destroy; - - prop_position_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropPositionClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_position_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_position_init (glPropPosition * position) -{ - position->x_spin = NULL; - position->y_spin = NULL; -} - -static void -gl_prop_position_destroy (GtkObject * object) -{ - glPropPosition *position; - glPropPositionClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_POSITION (object)); - - position = GL_PROP_POSITION (object); - class = GL_PROP_POSITION_CLASS (GTK_OBJECT (position)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_position_new (gchar * label) -{ - glPropPosition *position; - - position = gtk_type_new (gl_prop_position_get_type ()); - - gl_prop_position_construct (position, label); - - return GTK_WIDGET (position); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_position_construct (glPropPosition * position, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - GtkObject *x_adjust, *y_adjust; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - wvbox = GTK_WIDGET (position); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* X label */ - wlabel = gtk_label_new (_("X:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - /* X spin */ - x_adjust = gtk_adjustment_new (0.0, 0.0, 100.0, climb_rate, 10.0, 10.0); - position->x_spin = gtk_spin_button_new (GTK_ADJUSTMENT (x_adjust), - climb_rate, digits); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (position->x_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (position->x_spin), TRUE); - gtk_signal_connect_object (GTK_OBJECT (position->x_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (position)); - gtk_table_attach_defaults (GTK_TABLE (wtable), position->x_spin, - 1, 2, 0, 1); - - /* Y label */ - wlabel = gtk_label_new (_("Y:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - /* Y spin */ - y_adjust = gtk_adjustment_new (0.0, 0.0, 100.0, climb_rate, 10.0, 10.0); - position->y_spin = gtk_spin_button_new (GTK_ADJUSTMENT (y_adjust), - climb_rate, digits); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (position->y_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (position->y_spin), TRUE); - gtk_signal_connect_object (GTK_OBJECT (position->y_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (position)); - gtk_table_attach_defaults (GTK_TABLE (wtable), position->y_spin, - 1, 2, 1, 2); - - /* Units */ - position->units_label = gtk_label_new (units_string); - gtk_misc_set_alignment (GTK_MISC (position->units_label), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), - position->units_label, 2, 3, 1, 2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropPosition * position) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (position), prop_position_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_position_get_position (glPropPosition * position, - gdouble * x, - gdouble * y) -{ - gdouble units_per_point; - - units_per_point = gl_prefs_get_units_per_point (); - - *x = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (position->x_spin)); - *y = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (position->y_spin)); - - /* convert everything back to our internal units (points) */ - *x /= units_per_point; - *y /= units_per_point; -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_position_set_params (glPropPosition * position, - gdouble x, - gdouble y, - gdouble x_max, - gdouble y_max) -{ - GtkObject *x_adjust, *y_adjust; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Put everything into our display units */ - x *= units_per_point; - y *= units_per_point; - x_max *= units_per_point; - y_max *= units_per_point; - - /* update X/Y spin controls */ - x_adjust = gtk_adjustment_new (x, 0.0, x_max, climb_rate, 10.0, 10.0); - gtk_spin_button_configure (GTK_SPIN_BUTTON (position->x_spin), - GTK_ADJUSTMENT (x_adjust), climb_rate, - digits); - y_adjust = gtk_adjustment_new (y, 0.0, y_max, climb_rate, 10.0, 10.0); - gtk_spin_button_configure (GTK_SPIN_BUTTON (position->y_spin), - GTK_ADJUSTMENT (y_adjust), climb_rate, - digits); - - /* Units */ - gtk_label_set_text (GTK_LABEL (position->units_label), units_string); - -} diff --git a/glabels1/src/prop_position.h b/glabels1/src/prop_position.h deleted file mode 100644 index c0637a5..0000000 --- a/glabels1/src/prop_position.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_position.h: position properties widget module header file - * - * Copyright (C) 2000, 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_POSITION_H__ -#define __PROP_POSITION_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_POSITION (gl_prop_position_get_type ()) -#define GL_PROP_POSITION(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_POSITION, glPropPosition )) -#define GL_PROP_POSITION_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_POSITION, glPropPositionClass)) -#define GL_IS_PROP_POSITION(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_POSITION)) -#define GL_IS_PROP_POSITION_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_POSITION)) - -typedef struct _glPropPosition glPropPosition; -typedef struct _glPropPositionClass glPropPositionClass; - -struct _glPropPosition { - GtkVBox parent_widget; - - GtkWidget *x_spin; - GtkWidget *y_spin; - GtkWidget *units_label; -}; - -struct _glPropPositionClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropPosition * prop, gpointer user_data); -}; - -extern guint gl_prop_position_get_type (void); - -extern GtkWidget *gl_prop_position_new (gchar * label); - -extern void gl_prop_position_get_position (glPropPosition * position, - gdouble * x, gdouble * y); - -extern void gl_prop_position_set_params (glPropPosition * position, - gdouble x, gdouble y, - gdouble x_max, gdouble y_max); - -#endif diff --git a/glabels1/src/prop_size.c b/glabels1/src/prop_size.c deleted file mode 100644 index 1f8d094..0000000 --- a/glabels1/src/prop_size.c +++ /dev/null @@ -1,459 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_size.c: size properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_size.h" -#include "prefs.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropSizeSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_size_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_size_class_init (glPropSizeClass * class); -static void gl_prop_size_init (glPropSize * size); -static void gl_prop_size_destroy (GtkObject * object); -static void gl_prop_size_construct (glPropSize * size, gchar * label); - -static void aspect_toggle_cb (GtkToggleButton * togglebutton, - gpointer user_data); -static void w_spin_cb (GtkSpinButton * spinbutton, gpointer user_data); -static void h_spin_cb (GtkSpinButton * spinbutton, gpointer user_data); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_size_get_type (void) -{ - static guint prop_size_type = 0; - - if (!prop_size_type) { - GtkTypeInfo prop_size_info = { - "glPropSize", - sizeof (glPropSize), - sizeof (glPropSizeClass), - (GtkClassInitFunc) gl_prop_size_class_init, - (GtkObjectInitFunc) gl_prop_size_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_size_type = - gtk_type_unique (gtk_vbox_get_type (), &prop_size_info); - } - - return prop_size_type; -} - -static void -gl_prop_size_class_init (glPropSizeClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_size_destroy; - - prop_size_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropSizeClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_size_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_size_init (glPropSize * size) -{ - size->aspect_ratio = 1.0; - - size->w_spin = NULL; - size->h_spin = NULL; - - size->units_label = NULL; - - size->aspect_checkbox = NULL; -} - -static void -gl_prop_size_destroy (GtkObject * object) -{ - glPropSize *size; - glPropSizeClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_SIZE (object)); - - size = GL_PROP_SIZE (object); - class = GL_PROP_SIZE_CLASS (GTK_OBJECT (size)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_size_new (gchar * label) -{ - glPropSize *size; - - size = gtk_type_new (gl_prop_size_get_type ()); - - gl_prop_size_construct (size, label); - - return GTK_WIDGET (size); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_size_construct (glPropSize * size, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - GtkObject *w_adjust, *h_adjust; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - wvbox = GTK_WIDGET (size); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (3, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* W Label */ - wlabel = gtk_label_new (_("Width:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - /* W spin */ - w_adjust = gtk_adjustment_new (climb_rate, climb_rate, 100.0, - climb_rate, 10.0, 10.0); - size->w_spin = gtk_spin_button_new (GTK_ADJUSTMENT (w_adjust), - climb_rate, digits); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (size->w_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (size->w_spin), TRUE); - gtk_table_attach_defaults (GTK_TABLE (wtable), size->w_spin, - 1, 2, 0, 1); - - /* H label */ - wlabel = gtk_label_new (_("Height:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - /* H spin */ - h_adjust = gtk_adjustment_new (climb_rate, climb_rate, - 100.0, climb_rate, 10.0, 10.0); - size->h_spin = gtk_spin_button_new (GTK_ADJUSTMENT (h_adjust), - climb_rate, digits); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (size->h_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (size->h_spin), TRUE); - gtk_table_attach_defaults (GTK_TABLE (wtable), size->h_spin, - 1, 2, 1, 2); - - /* Units */ - size->units_label = gtk_label_new (units_string); - gtk_misc_set_alignment (GTK_MISC (size->units_label), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), - size->units_label, 2, 3, 1, 2); - - /* Maintain aspect ratio checkbox */ - size->aspect_checkbox = - gtk_check_button_new_with_label (_ - ("Maintain current aspect ratio")); - gtk_table_attach_defaults (GTK_TABLE (wtable), size->aspect_checkbox, 0, - 3, 2, 3); - - /* Connect signals to controls */ - gtk_signal_connect (GTK_OBJECT (size->aspect_checkbox), "toggled", - GTK_SIGNAL_FUNC (aspect_toggle_cb), size); - gtk_signal_connect (GTK_OBJECT (size->w_spin), "changed", - GTK_SIGNAL_FUNC (w_spin_cb), size); - gtk_signal_connect (GTK_OBJECT (size->h_spin), "changed", - GTK_SIGNAL_FUNC (h_spin_cb), size); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Maintain aspect ratio checkbox callback. */ -/*--------------------------------------------------------------------------*/ -static void -aspect_toggle_cb (GtkToggleButton * togglebutton, - gpointer user_data) -{ - glPropSize *size = GL_PROP_SIZE (user_data); - GtkAdjustment *w_adjust, *h_adjust; - - if (gtk_toggle_button_get_active (togglebutton)) { - - size->w = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (size->w_spin)); - size->h = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (size->h_spin)); - - size->aspect_ratio = size->h / size->w; - - /* We have a new aspect ratio, adjust one of the maxes accordingly */ - if ((size->h_max_orig / size->w_max_orig) < size->aspect_ratio) { - size->w_max = size->h_max_orig / size->aspect_ratio; - size->h_max = size->h_max_orig; - } else { - size->w_max = size->w_max_orig; - size->h_max = size->w_max_orig * size->aspect_ratio; - } - - } else { - - /* Reset maximums */ - size->w_max = size->w_max_orig; - size->h_max = size->h_max_orig; - - } - - gtk_signal_handler_block_by_func (GTK_OBJECT (size->w_spin), - GTK_SIGNAL_FUNC (w_spin_cb), - user_data); - gtk_signal_handler_block_by_func (GTK_OBJECT (size->h_spin), - GTK_SIGNAL_FUNC (h_spin_cb), - user_data); - w_adjust = - gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (size->w_spin)); - w_adjust->upper = size->w_max; - gtk_spin_button_update (GTK_SPIN_BUTTON (size->w_spin)); - h_adjust = - gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (size->h_spin)); - h_adjust->upper = size->h_max; - gtk_spin_button_update (GTK_SPIN_BUTTON (size->h_spin)); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (size->w_spin), - GTK_SIGNAL_FUNC (w_spin_cb), - user_data); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (size->h_spin), - GTK_SIGNAL_FUNC (h_spin_cb), - user_data); - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (size), prop_size_signals[CHANGED]); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. W spin button changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -w_spin_cb (GtkSpinButton * spinbutton, - gpointer user_data) -{ - glPropSize *size = GL_PROP_SIZE (user_data); - GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (size->aspect_checkbox); - - size->w = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (size->w_spin)); - - if (gtk_toggle_button_get_active (toggle)) { - - size->h = size->w * size->aspect_ratio; - - /* Update our sibling control, blocking recursion. */ - gtk_signal_handler_block_by_func (GTK_OBJECT (size->h_spin), - GTK_SIGNAL_FUNC (h_spin_cb), - user_data); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (size->h_spin), - size->h); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (size->h_spin), - GTK_SIGNAL_FUNC (h_spin_cb), - user_data); - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (size), prop_size_signals[CHANGED]); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. H spin button changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -h_spin_cb (GtkSpinButton * spinbutton, - gpointer user_data) -{ - glPropSize *size = GL_PROP_SIZE (user_data); - GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (size->aspect_checkbox); - - size->h = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (size->h_spin)); - - if (gtk_toggle_button_get_active (toggle)) { - - size->w = size->h / size->aspect_ratio; - - /* Update our sibling control, blocking recursion. */ - gtk_signal_handler_block_by_func (GTK_OBJECT (size->w_spin), - GTK_SIGNAL_FUNC (w_spin_cb), - user_data); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (size->w_spin), - size->w); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (size->w_spin), - GTK_SIGNAL_FUNC (w_spin_cb), - user_data); - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (size), prop_size_signals[CHANGED]); - -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_size_get_size (glPropSize * size, - gdouble * w, - gdouble * h, - gboolean * keep_aspect_ratio_flag) -{ - gdouble units_per_point; - - units_per_point = gl_prefs_get_units_per_point (); - - *w = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (size->w_spin)); - *h = gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (size->h_spin)); - - *keep_aspect_ratio_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (size->aspect_checkbox)); - - /* convert everything back to our internal units (points) */ - *w /= units_per_point; - *h /= units_per_point; -} - -/*====================================================================*/ -/* set values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_size_set_params (glPropSize * size, - gdouble w, - gdouble h, - gboolean keep_aspect_ratio_flag, - gdouble w_max, - gdouble h_max) -{ - GtkObject *w_adjust, *h_adjust; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Put everything into our display units */ - size->w = w * units_per_point; - size->h = h * units_per_point; - size->w_max = w_max * units_per_point; - size->h_max = h_max * units_per_point; - - /* Squirrel away copies of our original maximums */ - size->w_max_orig = size->w_max; - size->h_max_orig = size->h_max; - - size->aspect_ratio = size->h / size->w; - if (keep_aspect_ratio_flag) { - - /* When tracking aspect ratio, adjust one of the maxes */ - if ((size->h_max / size->w_max) < size->aspect_ratio) { - size->w_max = size->h_max / size->aspect_ratio; - } else { - size->h_max = size->w_max * size->aspect_ratio; - } - - /* before adjusting w & h, limit to max values */ - if (size->w > size->w_max) - size->w = size->w_max; - if (size->h > size->h_max) - size->h = size->h_max; - - } - - /* update W/H spin controls */ - w_adjust = gtk_adjustment_new (size->w, climb_rate, size->w_max, - climb_rate, 10.0, 10.0); - gtk_spin_button_configure (GTK_SPIN_BUTTON (size->w_spin), - GTK_ADJUSTMENT (w_adjust), climb_rate, - digits); - h_adjust = - gtk_adjustment_new (size->h, climb_rate, size->h_max, climb_rate, - 10.0, 10.0); - gtk_spin_button_configure (GTK_SPIN_BUTTON (size->h_spin), - GTK_ADJUSTMENT (h_adjust), climb_rate, - digits); - - gtk_label_set_text (GTK_LABEL (size->units_label), units_string); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (size->aspect_checkbox), - keep_aspect_ratio_flag); - -} diff --git a/glabels1/src/prop_size.h b/glabels1/src/prop_size.h deleted file mode 100644 index 550e93f..0000000 --- a/glabels1/src/prop_size.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_size.h: size properties widget module header file - * - * Copyright (C) 2000, 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_SIZE_H__ -#define __PROP_SIZE_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_SIZE (gl_prop_size_get_type ()) -#define GL_PROP_SIZE(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_SIZE, glPropSize )) -#define GL_PROP_SIZE_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_SIZE, glPropSizeClass)) -#define GL_IS_PROP_SIZE(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_SIZE)) -#define GL_IS_PROP_SIZE_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_SIZE)) - -typedef struct _glPropSize glPropSize; -typedef struct _glPropSizeClass glPropSizeClass; - -struct _glPropSize { - GtkVBox parent_widget; - - gdouble w, h; - gdouble aspect_ratio; - gdouble w_max, h_max; - gdouble w_max_orig, h_max_orig; - - GtkWidget *w_spin; - GtkWidget *h_spin; - GtkWidget *units_label; - GtkWidget *aspect_checkbox; -}; - -struct _glPropSizeClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropSize * size, gpointer user_data); -}; - -extern guint gl_prop_size_get_type (void); - -extern GtkWidget *gl_prop_size_new (gchar * label); - -extern void gl_prop_size_get_size (glPropSize * size, - gdouble * w, gdouble * h, - gboolean * keep_aspect_ratio_flag); - -extern void gl_prop_size_set_params (glPropSize * size, - gdouble w, gdouble h, - gboolean keep_aspect_ratio_flag, - gdouble w_max, gdouble h_max); - -#endif diff --git a/glabels1/src/prop_text.c b/glabels1/src/prop_text.c deleted file mode 100644 index c7f6a2a..0000000 --- a/glabels1/src/prop_text.c +++ /dev/null @@ -1,426 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_text.c: text properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_text.h" - -#include "debug.h" - -#define RED(x) ( ((x)>>24) & 0xff ) -#define GREEN(x) ( ((x)>>16) & 0xff ) -#define BLUE(x) ( ((x)>>8) & 0xff ) -#define ALPHA(x) ( (x) & 0xff ) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropTextSignal) (GtkObject * object, - gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_text_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_text_class_init (glPropTextClass * class); -static void gl_prop_text_init (glPropText * text); -static void gl_prop_text_destroy (GtkObject * object); -static void gl_prop_text_construct (glPropText * text, gchar * label); - -static void changed_cb (glPropText * text); -static void just_toggled_cb (GtkToggleButton * togglebutton, - gpointer user_data); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_text_get_type (void) -{ - static guint prop_text_type = 0; - - if (!prop_text_type) { - GtkTypeInfo prop_text_info = { - "glPropText", - sizeof (glPropText), - sizeof (glPropTextClass), - (GtkClassInitFunc) gl_prop_text_class_init, - (GtkObjectInitFunc) gl_prop_text_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_text_type = - gtk_type_unique (gtk_vbox_get_type (), &prop_text_info); - } - - return prop_text_type; -} - -static void -gl_prop_text_class_init (glPropTextClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_text_destroy; - - prop_text_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropTextClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_text_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_text_init (glPropText * text) -{ - text->font_family_entry = NULL; - text->font_size_spin = NULL; - text->font_b_button = NULL; - text->font_i_button = NULL; - - text->color_picker = NULL; - - text->left_button = NULL; - text->right_button = NULL; - text->center_button = NULL; -} - -static void -gl_prop_text_destroy (GtkObject * object) -{ - glPropText *text; - glPropTextClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_TEXT (object)); - - text = GL_PROP_TEXT (object); - class = GL_PROP_TEXT_CLASS (GTK_OBJECT (text)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_text_new (gchar * label) -{ - glPropText *text; - - text = gtk_type_new (gl_prop_text_get_type ()); - - gl_prop_text_construct (text, label); - - return GTK_WIDGET (text); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_text_construct (glPropText * text, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel, *whbox1, *wcombo; - GList *family_names = NULL; - GtkObject *adjust; - - wvbox = GTK_WIDGET (text); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (3, 3, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Font label */ - wlabel = gtk_label_new (_("Font:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - - /* Pack these widgets into an inner hbox */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_table_attach_defaults (GTK_TABLE (wtable), whbox1, 1, 3, 0, 1); - - /* Font family entry widget */ - wcombo = gtk_combo_new (); - family_names = gnome_font_family_list (); - gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), family_names); - gnome_font_family_list_free (family_names); - text->font_family_entry = GTK_COMBO (wcombo)->entry; - gtk_entry_set_editable (GTK_ENTRY (text->font_family_entry), FALSE); - gtk_widget_set_usize (wcombo, 200, 0); - gtk_box_pack_start (GTK_BOX (whbox1), wcombo, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (text->font_family_entry), - "changed", GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text)); - - /* Font size entry widget */ - adjust = gtk_adjustment_new (1.0, 1.0, 250.0, 1.0, 10.0, 10.0); - text->font_size_spin = - gtk_spin_button_new (GTK_ADJUSTMENT (adjust), 1.0, 0); - gtk_box_pack_start (GTK_BOX (whbox1), text->font_size_spin, FALSE, - FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (text->font_size_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text)); - - /* Font weight/italic button widgets */ - text->font_b_button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (text->font_b_button), - gnome_stock_new_with_icon - (GNOME_STOCK_PIXMAP_TEXT_BOLD)); - gtk_box_pack_start (GTK_BOX (whbox1), text->font_b_button, FALSE, FALSE, - 0); - gtk_signal_connect_object (GTK_OBJECT (text->font_b_button), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text)); - text->font_i_button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (text->font_i_button), - gnome_stock_new_with_icon - (GNOME_STOCK_PIXMAP_TEXT_ITALIC)); - gtk_box_pack_start (GTK_BOX (whbox1), text->font_i_button, FALSE, FALSE, - 0); - gtk_signal_connect_object (GTK_OBJECT (text->font_i_button), "toggled", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text)); - - /* Text Color Label */ - wlabel = gtk_label_new (_("Color:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - - /* Text Color picker widget */ - text->color_picker = gnome_color_picker_new (); - gtk_signal_connect_object (GTK_OBJECT (text->color_picker), "color_set", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text)); - gtk_table_attach_defaults (GTK_TABLE (wtable), text->color_picker, 1, 2, - 1, 2); - - /* Alignment label */ - wlabel = gtk_label_new (_("Alignment:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 2, 3); - - /* Pack these widgets into an inner hbox */ - whbox1 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_table_attach_defaults (GTK_TABLE (wtable), whbox1, 1, 2, 2, 3); - - /* Justification entry widget */ - text->left_button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (text->left_button), - gnome_stock_new_with_icon - (GNOME_STOCK_PIXMAP_ALIGN_LEFT)); - gtk_box_pack_start (GTK_BOX (whbox1), text->left_button, FALSE, FALSE, - 0); - text->center_button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (text->center_button), - gnome_stock_new_with_icon - (GNOME_STOCK_PIXMAP_ALIGN_CENTER)); - gtk_box_pack_start (GTK_BOX (whbox1), text->center_button, FALSE, FALSE, - 0); - text->right_button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (text->right_button), - gnome_stock_new_with_icon - (GNOME_STOCK_PIXMAP_ALIGN_RIGHT)); - gtk_box_pack_start (GTK_BOX (whbox1), text->right_button, FALSE, FALSE, - 0); - - /* Now connect a callback that makes these toggles mutually exclusive */ - gtk_signal_connect (GTK_OBJECT (text->left_button), "toggled", - GTK_SIGNAL_FUNC (just_toggled_cb), text); - gtk_signal_connect (GTK_OBJECT (text->center_button), "toggled", - GTK_SIGNAL_FUNC (just_toggled_cb), text); - gtk_signal_connect (GTK_OBJECT (text->right_button), "toggled", - GTK_SIGNAL_FUNC (just_toggled_cb), text); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropText * text) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (text), prop_text_signals[CHANGED]); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Justify toggle button callback. */ -/*--------------------------------------------------------------------------*/ -static void -just_toggled_cb (GtkToggleButton * togglebutton, - gpointer user_data) -{ - glPropText *text = GL_PROP_TEXT (user_data); - - if (gtk_toggle_button_get_active (togglebutton)) { - - if (GTK_WIDGET (togglebutton) == GTK_WIDGET (text->left_button)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->center_button), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->right_button), - FALSE); - } else if (GTK_WIDGET (togglebutton) == - GTK_WIDGET (text->center_button)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->left_button), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->right_button), - FALSE); - } else if (GTK_WIDGET (togglebutton) == - GTK_WIDGET (text->right_button)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->left_button), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (text->center_button), - FALSE); - } - - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (text), prop_text_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_text_get_params (glPropText * text, - gchar ** font_family, - gdouble * font_size, - GnomeFontWeight * font_weight, - gboolean * font_italic_flag, - guint * color, - GtkJustification * just) -{ - guint8 r, g, b, a; - - /* ------ Get updated font information ------ */ - *font_family = - gtk_editable_get_chars (GTK_EDITABLE (text->font_family_entry), 0, - -1); - *font_size = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (text->font_size_spin)); - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (text->font_b_button))) { - *font_weight = GNOME_FONT_BOLD; - } else { - *font_weight = GNOME_FONT_BOOK; - } - *font_italic_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (text->font_i_button)); - - /* ------ Get updated color ------ */ - gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (text->color_picker), - &r, &g, &b, &a); - *color = GNOME_CANVAS_COLOR_A (r, g, b, a); - - /* ------- Get updated justification ------ */ - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (text->left_button))) { - *just = GTK_JUSTIFY_LEFT; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (text->right_button))) { - *just = GTK_JUSTIFY_RIGHT; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (text->center_button))) { - *just = GTK_JUSTIFY_CENTER; - } else { - *just = GTK_JUSTIFY_LEFT; /* Should not happen. */ - } - -} - -/*====================================================================*/ -/* fill in values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_text_set_params (glPropText * text, - gchar * font_family, - gdouble font_size, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - guint color, - GtkJustification just) -{ - gtk_entry_set_text (GTK_ENTRY (text->font_family_entry), font_family); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (text->font_size_spin), - font_size); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text->font_b_button), - (font_weight == GNOME_FONT_BOLD)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text->font_i_button), - font_italic_flag); - - gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (text->color_picker), - RED (color), GREEN (color), BLUE (color), - ALPHA (color)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text->left_button), - (just == GTK_JUSTIFY_LEFT)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text->center_button), - (just == GTK_JUSTIFY_CENTER)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text->right_button), - (just == GTK_JUSTIFY_RIGHT)); -} diff --git a/glabels1/src/prop_text.h b/glabels1/src/prop_text.h deleted file mode 100644 index 8d3b02a..0000000 --- a/glabels1/src/prop_text.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_text.h: text properties widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_TEXT_H__ -#define __PROP_TEXT_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_TEXT (gl_prop_text_get_type ()) -#define GL_PROP_TEXT(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_TEXT, glPropText )) -#define GL_PROP_TEXT_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_TEXT, glPropTextClass)) -#define GL_IS_PROP_TEXT(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_TEXT)) -#define GL_IS_PROP_TEXT_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_TEXT)) - -typedef struct _glPropText glPropText; -typedef struct _glPropTextClass glPropTextClass; - -struct _glPropText { - GtkVBox parent_widget; - - GtkWidget *font_family_entry; - GtkWidget *font_size_spin; - GtkWidget *font_b_button; - GtkWidget *font_i_button; - - GtkWidget *color_picker; - - GtkWidget *left_button, *right_button, *center_button; -}; - -struct _glPropTextClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropText * text, gpointer user_data); -}; - -extern guint gl_prop_text_get_type (void); - -extern GtkWidget *gl_prop_text_new (gchar * label); - -extern void gl_prop_text_get_params (glPropText * text, - gchar ** font_family, - gdouble * font_size, - GnomeFontWeight * font_weight, - gboolean * font_italic_flag, - guint * color, - GtkJustification * just); - -extern void gl_prop_text_set_params (glPropText * text, - gchar * font_family, - gdouble font_size, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - guint color, - GtkJustification just); - -#endif diff --git a/glabels1/src/prop_text_entry.c b/glabels1/src/prop_text_entry.c deleted file mode 100644 index e82e6d1..0000000 --- a/glabels1/src/prop_text_entry.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_text_entry.c: text entry widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_text_entry.h" -#include "merge.h" -#include "text_node.h" - -#include "debug.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropTextEntrySignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_text_entry_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_text_entry_class_init (glPropTextEntryClass * class); -static void gl_prop_text_entry_init (glPropTextEntry * text_entry); -static void gl_prop_text_entry_destroy (GtkObject * object); -static void gl_prop_text_entry_construct (glPropTextEntry * text_entry, - gchar * label, GList * field_defs); - -static void changed_cb (glPropTextEntry * text_entry); -static void insert_cb (glPropTextEntry * text_entry); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_text_entry_get_type (void) -{ - static guint prop_text_entry_type = 0; - - if (!prop_text_entry_type) { - GtkTypeInfo prop_text_entry_info = { - "glPropTextEntry", - sizeof (glPropTextEntry), - sizeof (glPropTextEntryClass), - (GtkClassInitFunc) gl_prop_text_entry_class_init, - (GtkObjectInitFunc) gl_prop_text_entry_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_text_entry_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_text_entry_info); - } - - return prop_text_entry_type; -} - -static void -gl_prop_text_entry_class_init (glPropTextEntryClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_text_entry_destroy; - - prop_text_entry_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropTextEntryClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, - prop_text_entry_signals, LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_text_entry_init (glPropTextEntry * text_entry) -{ - text_entry->text_entry = NULL; - text_entry->key_entry = NULL; - text_entry->insert_button = NULL; -} - -static void -gl_prop_text_entry_destroy (GtkObject * object) -{ - glPropTextEntry *text_entry; - glPropTextEntryClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_TEXT_ENTRY (object)); - - text_entry = GL_PROP_TEXT_ENTRY (object); - class = GL_PROP_TEXT_ENTRY_CLASS (GTK_OBJECT (text_entry)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_text_entry_new (gchar * label, - GList * field_defs) -{ - glPropTextEntry *text_entry; - - text_entry = gtk_type_new (gl_prop_text_entry_get_type ()); - - gl_prop_text_entry_construct (text_entry, label, field_defs); - - return GTK_WIDGET (text_entry); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_text_entry_construct (glPropTextEntry * text_entry, - gchar * label, - GList * field_defs) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel, *wcombo; - GList *keys; - - wvbox = GTK_WIDGET (text_entry); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 3, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Actual text entry widget */ - text_entry->text_entry = gtk_text_new (NULL, NULL); - gtk_text_set_editable (GTK_TEXT (text_entry->text_entry), TRUE); - gtk_signal_connect_object (GTK_OBJECT (text_entry->text_entry), - "changed", GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (text_entry)); - gtk_table_attach_defaults (GTK_TABLE (wtable), text_entry->text_entry, - 0, 3, 0, 1); - - /* Insert merge field label */ - wlabel = gtk_label_new (_("Key:")); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - - /* Key entry widget */ - wcombo = gtk_combo_new (); - keys = gl_merge_get_key_list (field_defs); - if (keys != NULL) - gtk_combo_set_popdown_strings (GTK_COMBO (wcombo), keys); - gl_merge_free_key_list (&keys); - text_entry->key_entry = GTK_COMBO (wcombo)->entry; - gtk_entry_set_editable (GTK_ENTRY (text_entry->key_entry), FALSE); - gtk_widget_set_usize (wcombo, 200, 0); - gtk_table_attach_defaults (GTK_TABLE (wtable), wcombo, 1, 2, 1, 2); - - /* Insert button */ - text_entry->insert_button = - gtk_button_new_with_label (_("Insert merge field")); - gtk_signal_connect_object (GTK_OBJECT (text_entry->insert_button), - "clicked", GTK_SIGNAL_FUNC (insert_cb), - GTK_OBJECT (text_entry)); - gtk_table_attach_defaults (GTK_TABLE (wtable), - text_entry->insert_button, 2, 3, 1, 2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropTextEntry * text_entry) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (text_entry), - prop_text_entry_signals[CHANGED]); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -insert_cb (glPropTextEntry * text_entry) -{ - gchar *key, *field; - gint pos; - - key = - gtk_editable_get_chars (GTK_EDITABLE (text_entry->key_entry), 0, - -1); - field = g_strdup_printf ("FIELD{%s}", key); - - pos = gtk_editable_get_position (GTK_EDITABLE (text_entry->text_entry)); - gtk_editable_insert_text (GTK_EDITABLE (text_entry->text_entry), - field, strlen (field), &pos); - - g_free (field); - g_free (key); - -} - -/*--------------------------------------------------------------------------*/ -/* Get widget data. */ -/*--------------------------------------------------------------------------*/ -GList * -gl_prop_text_entry_get_text (glPropTextEntry * text_entry) -{ - gchar *text; - GList *lines; - - text = - gtk_editable_get_chars (GTK_EDITABLE (text_entry->text_entry), 0, - -1); - - lines = gl_text_node_lines_new_from_text (text); - - g_free (text); - return lines; -} - -/*--------------------------------------------------------------------------*/ -/* Set widget data. */ -/*--------------------------------------------------------------------------*/ -void -gl_prop_text_entry_set_text (glPropTextEntry * text_entry, - gboolean merge_flag, - GList * lines) -{ - gint pos; - gchar *text; - - gtk_widget_set_sensitive (text_entry->key_entry, merge_flag); - gtk_widget_set_sensitive (text_entry->insert_button, merge_flag); - - gtk_signal_handler_block_by_func (GTK_OBJECT (text_entry->text_entry), - GTK_SIGNAL_FUNC (changed_cb), - text_entry); - gtk_editable_delete_text (GTK_EDITABLE (text_entry->text_entry), 0, -1); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (text_entry->text_entry), - GTK_SIGNAL_FUNC (changed_cb), - text_entry); - - text = gl_text_node_lines_expand (lines, NULL); - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (text_entry->text_entry), - text, strlen (text), &pos); - -} diff --git a/glabels1/src/prop_text_entry.h b/glabels1/src/prop_text_entry.h deleted file mode 100644 index 06c5dee..0000000 --- a/glabels1/src/prop_text_entry.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_text_entry.h: text entry widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_TEXT_ENTRY_H__ -#define __PROP_TEXT_ENTRY_H__ - -#include <gnome.h> - -#include "merge.h" - -#define GL_TYPE_PROP_TEXT_ENTRY (gl_prop_text_entry_get_type ()) -#define GL_PROP_TEXT_ENTRY(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_TEXT_ENTRY, glPropTextEntry )) -#define GL_PROP_TEXT_ENTRY_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_TEXT_ENTRY, glPropTextEntryClass)) -#define GL_IS_PROP_TEXT_ENTRY(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_TEXT_ENTRY)) -#define GL_IS_PROP_TEXT_ENTRY_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_TEXT_ENTRY)) - -typedef struct _glPropTextEntry glPropTextEntry; -typedef struct _glPropTextEntryClass glPropTextEntryClass; - -struct _glPropTextEntry { - GtkVBox parent_widget; - - GtkWidget *text_entry; - GtkWidget *key_entry; - GtkWidget *insert_button; -}; - -struct _glPropTextEntryClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropTextEntry * text_entry, gpointer user_data); -}; - -extern guint gl_prop_text_entry_get_type (void); - -extern GtkWidget *gl_prop_text_entry_new (gchar * label, GList * field_defs); - -extern GList *gl_prop_text_entry_get_text (glPropTextEntry * text_entry); - -extern void gl_prop_text_entry_set_text (glPropTextEntry * text_entry, - gboolean merge_flag, - GList * lines); - -#endif diff --git a/glabels1/src/prop_vector.c b/glabels1/src/prop_vector.c deleted file mode 100644 index 303aefa..0000000 --- a/glabels1/src/prop_vector.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_vector.c: vector properties widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "prop_vector.h" -#include "prefs.h" - -#include "debug.h" - -#include <math.h> - -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif - -#define LENGTH(x,y) sqrt( (x)*(x) + (y)*(y) ) -#define ANGLE(x,y) ( (180.0/M_PI)*atan2( -(y), (x) ) ) -#define COMP_X(l,a) ( (l) * cos( (M_PI/180.0)*(a) ) ) -#define COMP_Y(l,a) ( -(l) * sin( (M_PI/180.0)*(a) ) ) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glPropVectorSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint prop_vector_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_prop_vector_class_init (glPropVectorClass * class); -static void gl_prop_vector_init (glPropVector * vector); -static void gl_prop_vector_destroy (GtkObject * object); -static void gl_prop_vector_construct (glPropVector * vector, gchar * label); -static void changed_cb (glPropVector * vector); - -/*================================================================*/ -/* Boilerplate Object stuff. */ -/*================================================================*/ -guint -gl_prop_vector_get_type (void) -{ - static guint prop_vector_type = 0; - - if (!prop_vector_type) { - GtkTypeInfo prop_vector_info = { - "glPropVector", - sizeof (glPropVector), - sizeof (glPropVectorClass), - (GtkClassInitFunc) gl_prop_vector_class_init, - (GtkObjectInitFunc) gl_prop_vector_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - prop_vector_type = gtk_type_unique (gtk_vbox_get_type (), - &prop_vector_info); - } - - return prop_vector_type; -} - -static void -gl_prop_vector_class_init (glPropVectorClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->destroy = gl_prop_vector_destroy; - - prop_vector_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glPropVectorClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, prop_vector_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_prop_vector_init (glPropVector * vector) -{ - vector->len_spin = NULL; - vector->angle_spin = NULL; -} - -static void -gl_prop_vector_destroy (GtkObject * object) -{ - glPropVector *vector; - glPropVectorClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROP_VECTOR (object)); - - vector = GL_PROP_VECTOR (object); - class = GL_PROP_VECTOR_CLASS (GTK_OBJECT (vector)->klass); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_prop_vector_new (gchar * label) -{ - glPropVector *vector; - - vector = gtk_type_new (gl_prop_vector_get_type ()); - - gl_prop_vector_construct (vector, label); - - return GTK_WIDGET (vector); -} - -/*============================================================*/ -/* Construct composite widget. */ -/*============================================================*/ -static void -gl_prop_vector_construct (glPropVector * vector, - gchar * label) -{ - GtkWidget *wvbox, *wframe, *wtable, *wlabel; - GtkObject *adjust; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - wvbox = GTK_WIDGET (vector); - - wframe = gtk_frame_new (label); - gtk_box_pack_start (GTK_BOX (wvbox), wframe, FALSE, FALSE, 0); - - wtable = gtk_table_new (2, 3, TRUE); - gtk_container_set_border_width (GTK_CONTAINER (wtable), 10); - gtk_table_set_row_spacings (GTK_TABLE (wtable), 5); - gtk_table_set_col_spacings (GTK_TABLE (wtable), 5); - gtk_container_add (GTK_CONTAINER (wframe), wtable); - - /* Length label */ - wlabel = gtk_label_new (_("Length:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_label_set_justify (GTK_LABEL (wlabel), GTK_JUSTIFY_RIGHT); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 0, 1); - /* Length spin */ - adjust = gtk_adjustment_new (climb_rate, climb_rate, 100.0, climb_rate, - 10.0, 10.0); - vector->len_spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjust), - climb_rate, digits); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (vector->len_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (vector->len_spin), TRUE); - gtk_signal_connect_object (GTK_OBJECT (vector->len_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (vector)); - gtk_table_attach_defaults (GTK_TABLE (wtable), vector->len_spin, 1, 2, - 0, 1); - /* Length units label */ - vector->len_units_label = gtk_label_new (units_string); - gtk_misc_set_alignment (GTK_MISC (vector->len_units_label), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), vector->len_units_label, - 2, 3, 0, 1); - - /* Angle label */ - wlabel = gtk_label_new (_("Angle:")); - gtk_misc_set_alignment (GTK_MISC (wlabel), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), wlabel, 0, 1, 1, 2); - /* Angle spin */ - adjust = gtk_adjustment_new (0.0, -180.0, +180.0, 1.0, 10.0, 10.0); - vector->angle_spin = - gtk_spin_button_new (GTK_ADJUSTMENT (adjust), 1.0, 0); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (vector->angle_spin), - TRUE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (vector->angle_spin), - TRUE); - gtk_signal_connect_object (GTK_OBJECT (vector->angle_spin), "changed", - GTK_SIGNAL_FUNC (changed_cb), - GTK_OBJECT (vector)); - gtk_table_attach_defaults (GTK_TABLE (wtable), vector->angle_spin, 1, 2, - 1, 2); - /* Angle units label */ - vector->angle_units_label = gtk_label_new (_("degrees")); - gtk_misc_set_alignment (GTK_MISC (vector->angle_units_label), 0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (wtable), - vector->angle_units_label, 2, 3, 1, 2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when any control in the widget has changed. */ -/*--------------------------------------------------------------------------*/ -static void -changed_cb (glPropVector * vector) -{ - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (vector), prop_vector_signals[CHANGED]); -} - -/*====================================================================*/ -/* query values from controls. */ -/*====================================================================*/ -void -gl_prop_vector_get_params (glPropVector * vector, - gdouble * dx, - gdouble * dy) -{ - gdouble length, angle; - gdouble units_per_point; - - units_per_point = gl_prefs_get_units_per_point (); - - length = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (vector->len_spin)); - angle = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON - (vector->angle_spin)); - - length /= units_per_point; - - *dx = COMP_X (length, angle); - *dy = COMP_Y (length, angle); -} - -/*====================================================================*/ -/* set values and ranges for controls. */ -/*====================================================================*/ -void -gl_prop_vector_set_params (glPropVector * vector, - gdouble dx, - gdouble dy, - gdouble x_max, - gdouble y_max) -{ - GtkObject *length_adjust; - gdouble length, angle; - const gchar *units_string; - gdouble units_per_point, climb_rate; - gint digits; - - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Put everything into our display units */ - dx *= units_per_point; - dy *= units_per_point; - x_max *= units_per_point; - y_max *= units_per_point; - - length = LENGTH (dx, dy); - angle = ANGLE (dx, dy); - - length_adjust = gtk_adjustment_new (length, 0.0, LENGTH (x_max, y_max), - climb_rate, 10.0, 10.0); - gtk_spin_button_configure (GTK_SPIN_BUTTON (vector->len_spin), - GTK_ADJUSTMENT (length_adjust), - climb_rate, digits); - gtk_spin_button_update (GTK_SPIN_BUTTON (vector->len_spin)); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (vector->angle_spin), angle); -} diff --git a/glabels1/src/prop_vector.h b/glabels1/src/prop_vector.h deleted file mode 100644 index e8197ad..0000000 --- a/glabels1/src/prop_vector.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * prop_vector.h: vector properties widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __PROP_VECTOR_H__ -#define __PROP_VECTOR_H__ - -#include <gnome.h> -#include "label.h" - -#define GL_TYPE_PROP_VECTOR (gl_prop_vector_get_type ()) -#define GL_PROP_VECTOR(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_PROP_VECTOR, glPropVector )) -#define GL_PROP_VECTOR_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROP_VECTOR, glPropVectorClass)) -#define GL_IS_PROP_VECTOR(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_PROP_VECTOR)) -#define GL_IS_PROP_VECTOR_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROP_VECTOR)) - -typedef struct _glPropVector glPropVector; -typedef struct _glPropVectorClass glPropVectorClass; - -struct _glPropVector { - GtkVBox parent_widget; - - GtkWidget *len_spin; - GtkWidget *len_units_label; - GtkWidget *angle_spin; - GtkWidget *angle_units_label; -}; - -struct _glPropVectorClass { - GtkVBoxClass parent_class; - - void (*changed) (glPropVector * vector, gpointer user_data); -}; - -extern guint gl_prop_vector_get_type (void); - -extern GtkWidget *gl_prop_vector_new (gchar * label); - -extern void gl_prop_vector_get_params (glPropVector * vector, - gdouble * dx, gdouble * dy); - -extern void gl_prop_vector_set_params (glPropVector * vector, - gdouble dx, gdouble dy, - gdouble x_max, gdouble y_max); - -#endif diff --git a/glabels1/src/propertybox.c b/glabels1/src/propertybox.c deleted file mode 100644 index b8fe294..0000000 --- a/glabels1/src/propertybox.c +++ /dev/null @@ -1,428 +0,0 @@ -/* Modified version of gnome-propertybox from gnome-libs-1.4 */ -/* Primarily removed the "help" button and changed the names.*/ -/* -Jim Evins 11/25/2001 */ - -/* gnome-propertybox.c - Property dialog box. - - Copyright (C) 1998 Tom Tromey - - This 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, 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. */ - -/* Note that the property box is constructed so that we could later - change how the buttons work. For instance, we could put an Apply - button inside each page; this kind of Apply button would only - affect the current page. Please do not change the API in a way - that would violate this goal. */ - -#include <config.h> - -#include "propertybox.h" -#include <libgnome/gnome-util.h> -#include <libgnomeui/gnome-stock.h> -#include <libgnome/gnome-config.h> -#include <gtk/gtk.h> -#include <libgnomeui/gnome-preferences.h> - -enum { - APPLY, - LAST_SIGNAL -}; - -typedef void (*glPropertyBoxSignal) (GtkObject * object, - gint arg, - gpointer data); - -static void gl_property_box_class_init (glPropertyBoxClass * klass); -static void gl_property_box_init (glPropertyBox * property_box); -static void gl_property_box_marshal_signal (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, - GtkArg * args); -static void gl_property_box_destroy (GtkObject * object); - -/* - * These four are called from dialog_clicked_cb(), depending - * on which button was clicked. - */ -static void global_apply (glPropertyBox * property_box); -static void apply_and_close (glPropertyBox * property_box); -static void just_close (glPropertyBox * property_box); - -static void dialog_clicked_cb (GnomeDialog * dialog, - gint button, - gpointer data); - -static GnomeDialogClass *parent_class = NULL; - -static gint property_box_signals[LAST_SIGNAL] = { 0 }; - -/** - * gl_property_box_get_type: - * - * Internal routine that returns the GtkType of the - * glPropertyBox widget - */ -guint -gl_property_box_get_type (void) -{ - static guint property_box_type = 0; - - if (!property_box_type) { - GtkTypeInfo property_box_info = { - "glPropertyBox", - sizeof (glPropertyBox), - sizeof (glPropertyBoxClass), - (GtkClassInitFunc) gl_property_box_class_init, - (GtkObjectInitFunc) gl_property_box_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - property_box_type = gtk_type_unique (gnome_dialog_get_type (), - &property_box_info); - } - - return property_box_type; -} - -static void -gl_property_box_class_init (glPropertyBoxClass * klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkWindowClass *window_class; - - object_class = (GtkObjectClass *) klass; - widget_class = (GtkWidgetClass *) klass; - window_class = (GtkWindowClass *) klass; - - object_class->destroy = gl_property_box_destroy; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - property_box_signals[APPLY] = - gtk_signal_new ("apply", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (glPropertyBoxClass, - apply), - gl_property_box_marshal_signal, - GTK_TYPE_NONE, 1, GTK_TYPE_INT); - - gtk_object_class_add_signals (object_class, property_box_signals, - LAST_SIGNAL); - - klass->apply = NULL; -} - -static void -gl_property_box_marshal_signal (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, - GtkArg * args) -{ - glPropertyBoxSignal rfunc; - - rfunc = (glPropertyBoxSignal) func; - (*rfunc) (object, GTK_VALUE_INT (args[0]), func_data); -} - -static void -gl_property_box_init (glPropertyBox * property_box) -{ - GList *button_list; - - property_box->notebook = gtk_notebook_new (); - - if (gnome_preferences_get_property_box_apply ()) { - gnome_dialog_append_buttons (GNOME_DIALOG (property_box), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_APPLY, - GNOME_STOCK_BUTTON_CLOSE, NULL); - } else { - gnome_dialog_append_buttons (GNOME_DIALOG (property_box), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, NULL); - } - - gnome_dialog_set_default (GNOME_DIALOG (property_box), 0); - - /* This is sort of unattractive */ - - button_list = GNOME_DIALOG (property_box)->buttons; - - property_box->ok_button = GTK_WIDGET (button_list->data); - button_list = button_list->next; - - if (gnome_preferences_get_property_box_apply ()) { - property_box->apply_button = GTK_WIDGET (button_list->data); - button_list = button_list->next; - gtk_widget_set_sensitive (property_box->apply_button, FALSE); - } else - property_box->apply_button = 0; - - property_box->cancel_button = GTK_WIDGET (button_list->data); - button_list = button_list->next; - - gtk_signal_connect (GTK_OBJECT (property_box), "clicked", - GTK_SIGNAL_FUNC (dialog_clicked_cb), NULL); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (property_box)->vbox), - property_box->notebook, TRUE, TRUE, 0); - - gtk_widget_show (property_box->notebook); -} - -static void -gl_property_box_destroy (GtkObject * object) -{ - glPropertyBox *property_box; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PROPERTY_BOX (object)); - - property_box = GL_PROPERTY_BOX (object); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -/** - * gl_property_box_new: [constructor] - * - * Creates a new glPropertyBox widget. The PropertyBox widget - * is useful for making consistent configuration dialog boxes. - * - * When a setting has been made to a property in the PropertyBox - * your program needs to invoke the gl_property_box_changed to signal - * a change (this will enable the Ok/Apply buttons). - * - * Returns a newly created glPropertyBox widget. - */ -GtkWidget * -gl_property_box_new (void) -{ - return gtk_type_new (gl_property_box_get_type ()); -} - -static void -dialog_clicked_cb (GnomeDialog * dialog, - gint button, - gpointer data) -{ - glPropertyBox *pbox; - GtkWidget *page; - GList *list; - gboolean dirty = FALSE; - - g_return_if_fail (dialog != NULL); - g_return_if_fail (GL_IS_PROPERTY_BOX (dialog)); - - pbox = GL_PROPERTY_BOX (dialog); - - if (GTK_NOTEBOOK (pbox->notebook)->cur_page != NULL) { - - for (list = GTK_NOTEBOOK (pbox->notebook)->children; - list != NULL; list = list->next) { - GtkNotebookPage *page = list->data; - g_assert (page != NULL); - - dirty = - GPOINTER_TO_INT (gtk_object_get_data - (GTK_OBJECT (page->child), - GL_PROPERTY_BOX_DIRTY)); - - if (dirty) - break; - } - } else { - page = NULL; - dirty = FALSE; - } - - /* Choose which style we did */ - if (pbox->apply_button) { - switch (button) { - case 0: - if (dirty) - apply_and_close (GL_PROPERTY_BOX (dialog)); - else - just_close (GL_PROPERTY_BOX (dialog)); - break; - case 1: - global_apply (GL_PROPERTY_BOX (dialog)); - break; - case 2: - just_close (GL_PROPERTY_BOX (dialog)); - break; - default: - g_assert_not_reached (); - } - } else { - switch (button) { - case 0: - if (dirty) - apply_and_close (GL_PROPERTY_BOX (dialog)); - else - just_close (GL_PROPERTY_BOX (dialog)); - break; - case 1: - just_close (GL_PROPERTY_BOX (dialog)); - break; - default: - g_assert_not_reached (); - } - } -} - -static void -set_sensitive (glPropertyBox * property_box, - gint dirty) -{ - if (property_box->apply_button) - gtk_widget_set_sensitive (property_box->apply_button, dirty); -} - -/** - * gl_property_box_changed: - * @property_box: The glPropertyBox that contains the changed data - * - * When a setting has changed, the code needs to invoke this routine - * to make the Ok/Apply buttons sensitive. - */ -void -gl_property_box_changed (glPropertyBox * property_box) -{ - GtkWidget *page; - - g_return_if_fail (property_box != NULL); - g_return_if_fail (GL_IS_PROPERTY_BOX (property_box)); - g_return_if_fail (property_box->notebook); - g_return_if_fail (GTK_NOTEBOOK (property_box->notebook)->cur_page); - - page = GTK_NOTEBOOK (property_box->notebook)->cur_page->child; - g_assert (page != NULL); - - gtk_object_set_data (GTK_OBJECT (page), - GL_PROPERTY_BOX_DIRTY, GINT_TO_POINTER (1)); - - set_sensitive (property_box, 1); -} - -/** - * gl_property_box_set_modified: - * @property_box: The glPropertyBox that contains the changed data - * @state: The state. TRUE means modified, FALSE means unmodified. - * - * This sets the modified flag of the glPropertyBox to the value in @state. - * Affects whether the OK/Apply buttons are sensitive. - */ -void -gl_property_box_set_modified (glPropertyBox * property_box, - gboolean state) -{ - GtkWidget *page; - - g_return_if_fail (property_box != NULL); - g_return_if_fail (GL_IS_PROPERTY_BOX (property_box)); - g_return_if_fail (property_box->notebook); - g_return_if_fail (GTK_NOTEBOOK (property_box->notebook)->cur_page); - - page = GTK_NOTEBOOK (property_box->notebook)->cur_page->child; - g_assert (page != NULL); - - gtk_object_set_data (GTK_OBJECT (page), - GL_PROPERTY_BOX_DIRTY, - GINT_TO_POINTER (state ? 1 : 0)); - - set_sensitive (property_box, state); -} - -static void -global_apply (glPropertyBox * property_box) -{ - GList *list; - gint n; - - g_return_if_fail (GTK_NOTEBOOK (property_box->notebook)->children != - NULL); - - for (list = GTK_NOTEBOOK (property_box->notebook)->children, n = 0; - list != NULL; list = g_list_next (list), n++) { - /* FIXME: there should be a way to report an error - during Apply. That way we could prevent closing - the window if there were a problem. */ - GtkNotebookPage *page = list->data; - if (gtk_object_get_data (GTK_OBJECT (page->child), - GL_PROPERTY_BOX_DIRTY)) { - gtk_signal_emit (GTK_OBJECT (property_box), - property_box_signals[APPLY], n); - gtk_object_set_data (GTK_OBJECT (page->child), - GL_PROPERTY_BOX_DIRTY, - GINT_TO_POINTER (0)); - } - } - - /* Emit an apply signal with a button of -1. This means we - just finished a global apply. Is this a hack? */ - gtk_signal_emit (GTK_OBJECT (property_box), - property_box_signals[APPLY], (gint) - 1); - - /* Doesn't matter which item we use. */ - set_sensitive (property_box, 0); -} - -static void -just_close (glPropertyBox * property_box) -{ - gnome_dialog_close (GNOME_DIALOG (property_box)); -} - -static void -apply_and_close (glPropertyBox * property_box) -{ - global_apply (property_box); - just_close (property_box); -} - -/** - * gl_property_box_append_page: - * @property_box: The property box where we are inserting a new page - * @child: The widget that is being inserted - * @tab_label: The widget used as the label for this confiugration page - * - * Appends a new page to the glPropertyBox. - * - * Returns the assigned index of the page inside the glPropertyBox or - * -1 if one of the arguments is invalid. - */ -gint -gl_property_box_append_page (glPropertyBox * property_box, - GtkWidget * child, - GtkWidget * tab_label) -{ - g_return_val_if_fail (property_box != NULL, -1); - g_return_val_if_fail (GL_IS_PROPERTY_BOX (property_box), -1); - g_return_val_if_fail (child != NULL, -1); - g_return_val_if_fail (GTK_IS_WIDGET (child), -1); - g_return_val_if_fail (tab_label != NULL, -1); - g_return_val_if_fail (GTK_IS_WIDGET (tab_label), -1); - - gtk_notebook_append_page (GTK_NOTEBOOK (property_box->notebook), - child, tab_label); - - return g_list_length (GTK_NOTEBOOK (property_box->notebook)->children) - - 1; -} diff --git a/glabels1/src/propertybox.h b/glabels1/src/propertybox.h deleted file mode 100644 index 403ebf0..0000000 --- a/glabels1/src/propertybox.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Modified version of gnome-propertybox from gnome-libs-1.4 */ -/* Primarily removed the "help" button and changed the names.*/ -/* -Jim Evins 11/25/2001 */ - -/* gnome-propertybox.h - Property dialog box. - - Copyright (C) 1998 Tom Tromey - - This 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, 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 __PROPERTY_BOX_H__ -#define __PROPERTY_BOX_H__ - -#include <libgnomeui/gnome-dialog.h> -#include <libgnome/gnome-defs.h> - -BEGIN_GNOME_DECLS -#define GL_TYPE_PROPERTY_BOX (gl_property_box_get_type ()) -#define GL_PROPERTY_BOX(obj) (GTK_CHECK_CAST ((obj), GL_TYPE_PROPERTY_BOX, glPropertyBox)) -#define GL_PROPERTY_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_PROPERTY_BOX, glPropertyBoxClass)) -#define GL_IS_PROPERTY_BOX(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_PROPERTY_BOX)) -#define GL_IS_PROPERTY_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_PROPERTY_BOX)) -/*the flag used on the notebook pages to see if a change happened on a certain page or not*/ -#define GL_PROPERTY_BOX_DIRTY "gl_property_box_dirty" -typedef struct _glPropertyBox glPropertyBox; -typedef struct _glPropertyBoxClass glPropertyBoxClass; - -struct _glPropertyBox { - GnomeDialog dialog; - - GtkWidget *notebook; /* The notebook widget. */ - GtkWidget *ok_button; /* OK button. */ - GtkWidget *apply_button; /* Apply button. */ - GtkWidget *cancel_button; /* Cancel/Close button. */ -}; - -struct _glPropertyBoxClass { - GnomeDialogClass parent_class; - - void (*apply) (glPropertyBox * propertybox, - gint page_num); -}; - -guint gl_property_box_get_type (void); -GtkWidget *gl_property_box_new (void); - -/* - * Call this when the user changes something in the current page of - * the notebook. - */ -void gl_property_box_changed (glPropertyBox * property_box); - -void gl_property_box_set_modified (glPropertyBox * property_box, - gboolean state); - -gint gl_property_box_append_page (glPropertyBox * property_box, - GtkWidget * child, - GtkWidget * tab_label); - -END_GNOME_DECLS -#endif /* __PROPERTY_BOX_H__ */ diff --git a/glabels1/src/rotate_select.c b/glabels1/src/rotate_select.c deleted file mode 100644 index 29e0a9e..0000000 --- a/glabels1/src/rotate_select.c +++ /dev/null @@ -1,348 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * rotate_select.c: label rotate selection widget module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "rotate_select.h" -#include "template.h" - -#include "debug.h" - -#define MINI_PREVIEW_MAX_PIXELS 48 - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glRotateSelectSignal) (GtkObject * object, gpointer data); - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GtkContainerClass *parent_class; - -static gint rotate_select_signals[LAST_SIGNAL] = { 0 }; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_rotate_select_class_init (glRotateSelectClass * class); -static void gl_rotate_select_init (glRotateSelect * rotate_select); -static void gl_rotate_select_destroy (GtkObject * object); - -static void gl_rotate_select_construct (glRotateSelect * rotate_select); - -static void entry_changed_cb (GtkToggleButton * toggle, gpointer user_data); - -static GtkWidget *mini_preview_canvas_new (void); - -static void mini_preview_canvas_update (GnomeCanvas * canvas, - glTemplate * template, - gboolean rotate_flag); - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -guint -gl_rotate_select_get_type (void) -{ - static guint rotate_select_type = 0; - - if (!rotate_select_type) { - GtkTypeInfo rotate_select_info = { - "glRotateSelect", - sizeof (glRotateSelect), - sizeof (glRotateSelectClass), - (GtkClassInitFunc) gl_rotate_select_class_init, - (GtkObjectInitFunc) gl_rotate_select_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - rotate_select_type = gtk_type_unique (gtk_hbox_get_type (), - &rotate_select_info); - } - - return rotate_select_type; -} - -static void -gl_rotate_select_class_init (glRotateSelectClass * class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - object_class->destroy = gl_rotate_select_destroy; - - rotate_select_signals[CHANGED] = - gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (glRotateSelectClass, changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, rotate_select_signals, - LAST_SIGNAL); - - class->changed = NULL; -} - -static void -gl_rotate_select_init (glRotateSelect * rotate_select) -{ - rotate_select->rotate_check = NULL; - - rotate_select->canvas = NULL; - - rotate_select->template = NULL; -} - -static void -gl_rotate_select_destroy (GtkObject * object) -{ - glRotateSelect *rotate_select; - glRotateSelectClass *class; - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_ROTATE_SELECT (object)); - - rotate_select = GL_ROTATE_SELECT (object); - class = GL_ROTATE_SELECT_CLASS (GTK_OBJECT (rotate_select)->klass); - - gl_template_free (&rotate_select->template); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -GtkWidget * -gl_rotate_select_new (void) -{ - glRotateSelect *rotate_select; - - rotate_select = gtk_type_new (gl_rotate_select_get_type ()); - - gl_rotate_select_construct (rotate_select); - - return GTK_WIDGET (rotate_select); -} - -/*--------------------------------------------------------------------------*/ -/* Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_rotate_select_construct (glRotateSelect * rotate_select) -{ - GtkWidget *whbox; - - whbox = GTK_WIDGET (rotate_select); - - /* Actual selection control */ - rotate_select->rotate_check = - gtk_check_button_new_with_label (_("Rotate")); - gtk_box_pack_start (GTK_BOX (whbox), rotate_select->rotate_check, TRUE, - TRUE, GNOME_PAD); - - /* mini_preview canvas */ - rotate_select->canvas = mini_preview_canvas_new (); - gtk_box_pack_start (GTK_BOX (whbox), rotate_select->canvas, - TRUE, TRUE, GNOME_PAD); - - /* Connect signals to controls */ - gtk_signal_connect (GTK_OBJECT (rotate_select->rotate_check), "toggled", - GTK_SIGNAL_FUNC (entry_changed_cb), rotate_select); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change of check button */ -/*--------------------------------------------------------------------------*/ -static void -entry_changed_cb (GtkToggleButton * toggle, - gpointer user_data) -{ - glRotateSelect *rotate_select = GL_ROTATE_SELECT (user_data); - - if (rotate_select->template != NULL) { - /* Update mini_preview canvas & details with template */ - mini_preview_canvas_update (GNOME_CANVAS - (rotate_select->canvas), - rotate_select->template, - gtk_toggle_button_get_active - (toggle)); - } - - /* Emit our "changed" signal */ - gtk_signal_emit (GTK_OBJECT (user_data), - rotate_select_signals[CHANGED]); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw a mini-preview canvas. */ -/*--------------------------------------------------------------------------*/ -static GtkWidget * -mini_preview_canvas_new (void) -{ - GtkWidget *wcanvas = NULL; - - /* Create a canvas */ - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - wcanvas = gnome_canvas_new_aa (); - gtk_widget_pop_colormap (); - gtk_widget_pop_visual (); - - gtk_widget_set_usize (GTK_WIDGET (wcanvas), - MINI_PREVIEW_MAX_PIXELS + 4, - MINI_PREVIEW_MAX_PIXELS + 4); - - gtk_object_set_data (GTK_OBJECT (wcanvas), "label_item", NULL); - - return wcanvas; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update mini-preview canvas from new template. */ -/*--------------------------------------------------------------------------*/ -static void -mini_preview_canvas_update (GnomeCanvas * canvas, - glTemplate * template, - gboolean rotate_flag) -{ - gdouble canvas_scale; - GnomeCanvasGroup *group = NULL; - GnomeCanvasItem *label_item = NULL; - gdouble m, w, h; - - /* Fetch our data from canvas */ - label_item = gtk_object_get_data (GTK_OBJECT (canvas), "label_item"); - - m = MAX (template->label_width, template->label_height); - canvas_scale = (MINI_PREVIEW_MAX_PIXELS) / m; - - /* scale and size canvas */ - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (canvas), canvas_scale); - group = gnome_canvas_root (GNOME_CANVAS (canvas)); - gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), - -m / 2.0, -m / 2.0, +m / 2.0, +m / 2.0); - - /* remove old label outline */ - if (label_item != NULL) { - gtk_object_destroy (GTK_OBJECT (label_item)); - } - - /* draw mini label outline */ - if (!rotate_flag) { - w = template->label_width; - h = template->label_height; - } else { - w = template->label_height; - h = template->label_width; - } - switch (template->style) { - case GL_TEMPLATE_STYLE_RECT: - label_item = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type(), - "x1", -w / 2.0, - "y1", -h / 2.0, - "x2", +w / 2.0, - "y2", +h / 2.0, - "width_pixels", 1, - "outline_color", "black", - "fill_color", "white", - NULL); - break; - case GL_TEMPLATE_STYLE_ROUND: - case GL_TEMPLATE_STYLE_CD: - label_item = gnome_canvas_item_new (group, - gnome_canvas_ellipse_get_type(), - "x1", -w / 2.0, - "y1", -h / 2.0, - "x2", +w / 2.0, - "y2", +h / 2.0, - "width_pixels", 1, - "outline_color", "black", - "fill_color", "white", - NULL); - break; - default: - WARN ("Unknown label style"); - break; - } - - gtk_object_set_data (GTK_OBJECT (canvas), "label_item", label_item); - -} - -/****************************************************************************/ -/* query state of widget. */ -/****************************************************************************/ -gboolean -gl_rotate_select_get_state (glRotateSelect * rotate_select) -{ - return - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (rotate_select->rotate_check)); -} - -/****************************************************************************/ -/* set state of widget. */ -/****************************************************************************/ -void -gl_rotate_select_set_state (glRotateSelect * rotate_select, - gboolean state) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (rotate_select->rotate_check), state); -} - -/****************************************************************************/ -/* set template for widget. */ -/****************************************************************************/ -void -gl_rotate_select_set_template_name (glRotateSelect * rotate_select, - gchar * name) -{ - glTemplate *template; - - template = gl_template_from_name (name); - rotate_select->template = template; - - if (template->label_width != template->label_height) { - gtk_widget_set_sensitive (rotate_select->rotate_check, TRUE); - } else { - gtk_widget_set_sensitive (rotate_select->rotate_check, FALSE); - } - - mini_preview_canvas_update (GNOME_CANVAS (rotate_select->canvas), - template, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (rotate_select->rotate_check), FALSE); -} diff --git a/glabels1/src/rotate_select.h b/glabels1/src/rotate_select.h deleted file mode 100644 index 7204c83..0000000 --- a/glabels1/src/rotate_select.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * rotate_select.h: label rotate selection widget module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __ROTATE_SELECT_H__ -#define __ROTATE_SELECT_H__ - -#include <gnome.h> -#include "template.h" - -#define GL_TYPE_ROTATE_SELECT (gl_rotate_select_get_type ()) -#define GL_ROTATE_SELECT(obj) \ - (GTK_CHECK_CAST((obj), GL_TYPE_ROTATE_SELECT, glRotateSelect )) -#define GL_ROTATE_SELECT_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_ROTATE_SELECT, glRotateSelectClass)) -#define GL_IS_ROTATE_SELECT(obj) \ - (GTK_CHECK_TYPE ((obj), GL_TYPE_ROTATE_SELECT)) -#define GL_IS_ROTATE_SELECT_CLASS(klass) \ - (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_ROTATE_SELECT)) - -typedef struct _glRotateSelect glRotateSelect; -typedef struct _glRotateSelectClass glRotateSelectClass; - -struct _glRotateSelect { - GtkHBox parent_widget; - - GtkWidget *rotate_check; - - GtkWidget *canvas; - - glTemplate *template; -}; - -struct _glRotateSelectClass { - GtkHBoxClass parent_class; - - void (*changed) (glRotateSelect * rotate_select, gpointer user_data); -}; - -extern guint gl_rotate_select_get_type (void); - -extern GtkWidget *gl_rotate_select_new (void); - -extern gboolean gl_rotate_select_get_state (glRotateSelect * rotate_select); - -extern void gl_rotate_select_set_state (glRotateSelect * rotate_select, - gboolean state); - -extern void gl_rotate_select_set_template_name (glRotateSelect * rotate_select, - gchar * name); - -#endif diff --git a/glabels1/src/splash.c b/glabels1/src/splash.c deleted file mode 100644 index 92bb9aa..0000000 --- a/glabels1/src/splash.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * splash.c: Splash screen module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include "config.h" - -#include <gnome.h> - -#include "debug.h" -#include "splash.h" - -#ifdef PACKAGE_DATA_DIR -#define SPLASH_PIXMAP (PACKAGE_DATA_DIR "/pixmaps/glabels/glabels-logo.png") -#else -#define SPLASH_PIXMAP gnome_pixmap_file("glabels/glabels-logo.png") -#endif - -#define SPLASH_TIMEOUT 2000 - -static GtkWidget *splash = NULL; - -static gint splash_timeout (gpointer not_used); - - -/***************************************************************************/ -/* Create splash screen. */ -/***************************************************************************/ -void -gl_splash (void) -{ - GtkWidget *wpixmap, *wvbox, *whbox, *wframe1, *wframe2; - gchar *label; - - if (splash) - return; - - splash = gtk_window_new (GTK_WINDOW_POPUP); - gtk_window_set_position (GTK_WINDOW (splash), GTK_WIN_POS_CENTER); - - wframe1 = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (wframe1), GTK_SHADOW_OUT); - wframe2 = gtk_frame_new (NULL); - - wvbox = gtk_vbox_new (FALSE, 5); - gtk_container_set_border_width (GTK_CONTAINER (wvbox), 2); - - whbox = gtk_hbox_new (FALSE, 5); - - if (!g_file_exists (SPLASH_PIXMAP)) { - WARN ("Could not find %s", SPLASH_PIXMAP); - } - wpixmap = gnome_pixmap_new_from_file (SPLASH_PIXMAP); - if (!wpixmap) { - WARN ("can't find splash pixmap"); - gtk_widget_destroy (splash); - return; - } - - gtk_container_add (GTK_CONTAINER (splash), wframe1); - gtk_container_add (GTK_CONTAINER (wframe1), wframe2); - gtk_container_add (GTK_CONTAINER (wframe2), wvbox); - - gtk_box_pack_start (GTK_BOX (wvbox), wpixmap, TRUE, TRUE, 0); - - label = g_strdup_printf ("Version %s", VERSION); - gtk_box_pack_start (GTK_BOX (wvbox), - gtk_label_new (label), TRUE, TRUE, 0); - g_free (label); - - gtk_widget_show_all (splash); - - gtk_timeout_add (SPLASH_TIMEOUT, splash_timeout, NULL); - - while (gtk_events_pending ()) { - gtk_main_iteration (); - } -} - -/*-------------------------------------------------------------------------*/ -/* PRIVATE. Callback to tear-down splash screen once timer has expired. */ -/*-------------------------------------------------------------------------*/ -static gint -splash_timeout (gpointer not_used) -{ - if (splash) { - gtk_widget_destroy (splash); - splash = NULL; - } - - return FALSE; -} - diff --git a/glabels1/src/splash.h b/glabels1/src/splash.h deleted file mode 100644 index 25cd5b6..0000000 --- a/glabels1/src/splash.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * splash.c: Splash screen module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __SPLASH_H__ -#define __SPLASH_H__ - -void gl_splash (void); - -#endif diff --git a/glabels1/src/stock.c b/glabels1/src/stock.c deleted file mode 100644 index f352300..0000000 --- a/glabels1/src/stock.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * stock.h: Stock image module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> -#include <gnome.h> -#include "stock.h" -#include "pixmaps/arrow.xpm" -#include "pixmaps/text.xpm" -#include "pixmaps/line.xpm" -#include "pixmaps/box.xpm" -#include "pixmaps/ellipse.xpm" -#include "pixmaps/image.xpm" -#include "pixmaps/barcode.xpm" -#include "pixmaps/zoomin.xpm" -#include "pixmaps/zoomout.xpm" -#include "pixmaps/zoom1to1.xpm" -#include "pixmaps/merge.xpm" - -void -gl_stock_init (void) -{ - static GnomeStockPixmapEntry entries[11]; - - entries[0].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[0].data.width = 24; - entries[0].data.height = 24; - entries[0].data.xpm_data = arrow_xpm; - - entries[1].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[1].data.width = 24; - entries[1].data.height = 24; - entries[1].data.xpm_data = text_xpm; - - entries[2].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[2].data.width = 24; - entries[2].data.height = 24; - entries[2].data.xpm_data = line_xpm; - - entries[3].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[3].data.width = 24; - entries[3].data.height = 24; - entries[3].data.xpm_data = box_xpm; - - entries[4].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[4].data.width = 24; - entries[4].data.height = 24; - entries[4].data.xpm_data = ellipse_xpm; - - entries[5].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[5].data.width = 24; - entries[5].data.height = 24; - entries[5].data.xpm_data = image_xpm; - - entries[6].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[6].data.width = 24; - entries[6].data.height = 24; - entries[6].data.xpm_data = barcode_xpm; - - entries[7].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[7].data.width = 24; - entries[7].data.height = 24; - entries[7].data.xpm_data = zoomin_xpm; - - entries[8].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[8].data.width = 24; - entries[8].data.height = 24; - entries[8].data.xpm_data = zoomout_xpm; - - entries[9].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[9].data.width = 24; - entries[9].data.height = 24; - entries[9].data.xpm_data = zoom1to1_xpm; - - entries[10].data.type = GNOME_STOCK_PIXMAP_TYPE_DATA; - entries[10].data.width = 24; - entries[10].data.height = 24; - entries[10].data.xpm_data = merge_xpm; - - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_ARROW, - GNOME_STOCK_PIXMAP_REGULAR, &entries[0]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_TEXT, - GNOME_STOCK_PIXMAP_REGULAR, &entries[1]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_LINE, - GNOME_STOCK_PIXMAP_REGULAR, &entries[2]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_BOX, - GNOME_STOCK_PIXMAP_REGULAR, &entries[3]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_ELLIPSE, - GNOME_STOCK_PIXMAP_REGULAR, &entries[4]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_IMAGE, - GNOME_STOCK_PIXMAP_REGULAR, &entries[5]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_BARCODE, - GNOME_STOCK_PIXMAP_REGULAR, &entries[6]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_ZOOMIN, - GNOME_STOCK_PIXMAP_REGULAR, &entries[7]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_ZOOMOUT, - GNOME_STOCK_PIXMAP_REGULAR, &entries[8]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_ZOOM1TO1, - GNOME_STOCK_PIXMAP_REGULAR, &entries[9]); - gnome_stock_pixmap_register (GL_STOCK_PIXMAP_MERGE, - GNOME_STOCK_PIXMAP_REGULAR, &entries[10]); - -} diff --git a/glabels1/src/stock.h b/glabels1/src/stock.h deleted file mode 100644 index 4b2b20c..0000000 --- a/glabels1/src/stock.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * stock.h: Stock image module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __STOCK_H__ -#define __STOCK_H__ - -/* Stock names */ - -#define GL_STOCK_PIXMAP_ARROW "GL_stock_arrow" -#define GL_STOCK_PIXMAP_TEXT "GL_stock_text" -#define GL_STOCK_PIXMAP_LINE "GL_stock_line" -#define GL_STOCK_PIXMAP_BOX "GL_stock_box" -#define GL_STOCK_PIXMAP_ELLIPSE "GL_stock_ellipse" -#define GL_STOCK_PIXMAP_IMAGE "GL_stock_image" -#define GL_STOCK_PIXMAP_BARCODE "GL_stock_barcode" -#define GL_STOCK_PIXMAP_ZOOMIN "GL_stock_zoomin" -#define GL_STOCK_PIXMAP_ZOOMOUT "GL_stock_zoomout" -#define GL_STOCK_PIXMAP_ZOOM1TO1 "GL_stock_zoom1to1" -#define GL_STOCK_PIXMAP_MERGE "GL_stock_merge" - -void gl_stock_init (void); - -#endif diff --git a/glabels1/src/template.c b/glabels1/src/template.c deleted file mode 100644 index aae0a89..0000000 --- a/glabels1/src/template.c +++ /dev/null @@ -1,584 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * template.c: template module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <sys/stat.h> -#include <sys/types.h> -#include <dirent.h> -#include <fcntl.h> -#include <unistd.h> - - -#include "template.h" - -#include "debug.h" - -#ifdef PACKAGE_DATA_DIR -#define GL_DATA_DIR (PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "glabels") -#else -#define GL_DATA_DIR gnome_datadir_file("glabels") -#endif - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GList *templates = NULL; - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static GList *read_templates (void); - -static gchar *get_home_data_dir (void); -static GList *read_template_files_from_dir (GList * templates, - const gchar * dirname); -static GList *read_templates_from_file (GList * templates, - gchar * xml_filename); - -static void xml_parse_label (xmlNodePtr label_node, glTemplate * template); -static void xml_parse_layout (xmlNodePtr layout_node, glTemplate * template); -static void xml_parse_alias (xmlNodePtr alias_node, glTemplate * template); - -static void xml_add_label (glTemplate *template, xmlNodePtr root, xmlNsPtr ns); -static void xml_add_layout (glTemplate *template, xmlNodePtr root, xmlNsPtr ns); -static void xml_add_alias (gchar *name, xmlNodePtr root, xmlNsPtr ns); - -/*****************************************************************************/ -/* Initialize module. */ -/*****************************************************************************/ -void -gl_template_init (void) -{ - templates = read_templates (); -} - -/*****************************************************************************/ -/* Get a list of valid template names for given page size */ -/*****************************************************************************/ -GList * -gl_template_get_name_list (const gchar * page_size) -{ - GList *p_tmplt, *p_name; - glTemplate *template; - gchar *str; - GList *names = NULL; - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) { - template = (glTemplate *) p_tmplt->data; - if (g_strcasecmp (page_size, template->page_size) == 0) { - for (p_name = template->name; p_name != NULL; - p_name = p_name->next) { - str = g_strdup_printf("%s: %s", - (gchar *) p_name->data, - template->description); - names = g_list_insert_sorted (names, str, - (GCompareFunc)g_strcasecmp); - } - } - } - - return names; -} - -/*****************************************************************************/ -/* Free a list of template names. */ -/*****************************************************************************/ -void -gl_template_free_name_list (GList ** names) -{ - GList *p_name; - - for (p_name = *names; p_name != NULL; p_name = p_name->next) { - g_free (p_name->data); - p_name->data = NULL; - } - - g_list_free (*names); - *names = NULL; -} - -/*****************************************************************************/ -/* Return a template structure from a name. */ -/*****************************************************************************/ -glTemplate * -gl_template_from_name (const gchar * name) -{ - GList *p_tmplt, *p_name; - glTemplate *template; - gchar **split_name; - - if (name == NULL) { - /* If no name, return first template as a default */ - return (glTemplate *) templates->data; - } - - split_name = g_strsplit (name, ":", 2); - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) { - template = (glTemplate *) p_tmplt->data; - for (p_name = template->name; p_name != NULL; - p_name = p_name->next) { - if (g_strcasecmp (p_name->data, split_name[0]) == 0) { - g_strfreev (split_name); - return gl_template_copy(template); - } - } - } - - g_strfreev (split_name); - - return NULL; -} - -/*****************************************************************************/ -/* Copy a template. */ -/*****************************************************************************/ -glTemplate *gl_template_copy (const glTemplate *orig_template) -{ - glTemplate *template; - GList *p; - - template = g_new0 (glTemplate,1); - - /* Shallow copy first */ - *template = *orig_template; - - /* Now the deep stuff */ - template->name = NULL; - for ( p=orig_template->name; p != NULL; p=p->next ) { - template->name = g_list_append (template->name, - g_strdup (p->data)); - } - template->description = g_strdup (orig_template->description); - template->page_size = g_strdup (orig_template->page_size); - - return template; -} - -/*****************************************************************************/ -/* Free up a template. */ -/*****************************************************************************/ -void gl_template_free (glTemplate **template) -{ - GList *p; - - for ( p=(*template)->name; p != NULL; p=p->next ) { - g_free (p->data); - p->data = NULL; - } - g_list_free ((*template)->name); - (*template)->name = NULL; - - g_free ((*template)->description); - (*template)->description = NULL; - - g_free ((*template)->page_size); - (*template)->page_size = NULL; - - g_free (*template); - *template = NULL; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Read templates from various files. */ -/*--------------------------------------------------------------------------*/ -static GList * -read_templates (void) -{ - gchar *home_data_dir = get_home_data_dir (); - GList *templates = NULL; - - LIBXML_TEST_VERSION; - - templates = read_template_files_from_dir (templates, GL_DATA_DIR); - templates = read_template_files_from_dir (templates, home_data_dir); - - g_free (home_data_dir); - - if (templates == NULL) { - WARN (_("No template files found!")); - } - - return templates; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. get '~/.glabels' directory path. */ -/*--------------------------------------------------------------------------*/ -static gchar * -get_home_data_dir (void) -{ - gchar *dir = gnome_util_prepend_user_home (".glabels"); - - /* Try to create ~/.glabels directory. If it exists, no problem. */ - mkdir (dir, 0775); - - return dir; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Read all template files from given directory. Append to list. */ -/*--------------------------------------------------------------------------*/ -static GList * -read_template_files_from_dir (GList * templates, - const gchar * dirname) -{ - DIR *dp; - struct dirent *d_entry; - gchar *filename, *extension; - gchar *full_filename = NULL; - - if (dirname == NULL) - return templates; - - dp = opendir (dirname); - if (dp == NULL) - return templates; - - while ((d_entry = readdir (dp)) != NULL) { - - filename = d_entry->d_name; - extension = strrchr (filename, '.'); - - if (extension != NULL) { - - if (strcasecmp (extension, ".template") == 0) { - - full_filename = - g_concat_dir_and_file (dirname, filename); - templates = - read_templates_from_file (templates, - full_filename); - g_free (full_filename); - - } - - } - - } - - closedir (dp); - - return templates; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Read templates from template file. */ -/*--------------------------------------------------------------------------*/ -static GList * -read_templates_from_file (GList * templates, - gchar * xml_filename) -{ - xmlDocPtr doc; - xmlNodePtr root, node; - glTemplate *template; - - doc = xmlParseFile (xml_filename); - if (!doc) { - WARN ("\"%s\" is not a glabels template file (not XML)", - xml_filename); - return templates; - } - - root = xmlDocGetRootElement (doc); - if (!root || !root->name) { - WARN ("\"%s\" is not a glabels template file (no root node)", - xml_filename); - xmlFreeDoc (doc); - return templates; - } - if (g_strcasecmp (root->name, "glabels-templates") != 0) { - WARN ("\"%s\" is not a glabels template file (wrong root node)", - xml_filename); - xmlFreeDoc (doc); - return templates; - } - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - if (g_strcasecmp (node->name, "Sheet") == 0) { - template = g_new0 (glTemplate, 1); - gl_template_xml_parse_sheet (template, node); - templates = g_list_append (templates, template); - } else { - if (g_strcasecmp (node->name, "text") != 0) { - WARN ("bad node = \"%s\"", node->name); - } - } - } - - xmlFreeDoc (doc); - - return templates; -} - -/*****************************************************************************/ -/* Parse XML template Node. */ -/*****************************************************************************/ -void -gl_template_xml_parse_sheet (glTemplate * template, - xmlNodePtr sheet_node) -{ - xmlNodePtr node; - - template->name = g_list_append (template->name, - xmlGetProp (sheet_node, "name")); - template->page_size = xmlGetProp (sheet_node, "size"); - template->description = xmlGetProp (sheet_node, "description"); - - for (node = sheet_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (g_strcasecmp (node->name, "Label") == 0) { - xml_parse_label (node, template); - } else if (g_strcasecmp (node->name, "Alias") == 0) { - xml_parse_alias (node, template); - } else { - if (g_strcasecmp (node->name, "text") != 0) { - WARN ("bad node = \"%s\"", node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Sheet->Label Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_label (xmlNodePtr label_node, - glTemplate * template) -{ - xmlNodePtr node; - gchar *style; - - style = xmlGetProp (label_node, "style"); - if (g_strcasecmp (style, "rectangle") == 0) { - template->style = GL_TEMPLATE_STYLE_RECT; - } else if (g_strcasecmp (style, "round") == 0) { - template->style = GL_TEMPLATE_STYLE_ROUND; - } else if (g_strcasecmp (style, "cd") == 0) { - template->style = GL_TEMPLATE_STYLE_CD; - } else { - WARN ("Unknown label style in template"); - } - - if (template->style == GL_TEMPLATE_STYLE_RECT) { - template->label_width = - g_strtod (xmlGetProp (label_node, "width"), NULL); - template->label_height = - g_strtod (xmlGetProp (label_node, "height"), NULL); - template->label_round = - g_strtod (xmlGetProp (label_node, "round"), NULL); - } else if (template->style == GL_TEMPLATE_STYLE_ROUND) { - template->label_radius = - g_strtod (xmlGetProp (label_node, "radius"), NULL); - template->label_width = 2.0 * template->label_radius; - template->label_height = 2.0 * template->label_radius; - } else if (template->style == GL_TEMPLATE_STYLE_CD) { - template->label_radius = - g_strtod (xmlGetProp (label_node, "radius"), NULL); - template->label_hole = - g_strtod (xmlGetProp (label_node, "hole"), NULL); - template->label_width = 2.0 * template->label_radius; - template->label_height = 2.0 * template->label_radius; - } - - template->label_margin = - g_strtod (xmlGetProp (label_node, "margin"), NULL); - - for (node = label_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (g_strcasecmp (node->name, "Layout") == 0) { - xml_parse_layout (node, template); - } else { - if (g_strcasecmp (node->name, "text") != 0) { - WARN ("bad node = \"%s\"", node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Sheet->Label->Layout Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_layout (xmlNodePtr layout_node, - glTemplate * template) -{ - xmlNodePtr node; - - sscanf (xmlGetProp (layout_node, "nx"), "%d", &(template->nx)); - sscanf (xmlGetProp (layout_node, "ny"), "%d", &(template->ny)); - template->x0 = g_strtod (xmlGetProp (layout_node, "x0"), NULL); - template->y0 = g_strtod (xmlGetProp (layout_node, "y0"), NULL); - template->dx = g_strtod (xmlGetProp (layout_node, "dx"), NULL); - template->dy = g_strtod (xmlGetProp (layout_node, "dy"), NULL); - - for (node = layout_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (g_strcasecmp (node->name, "text") != 0) { - WARN ("bad node = \"%s\"", node->name); - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Sheet->Alias Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_alias (xmlNodePtr alias_node, - glTemplate * template) -{ - template->name = g_list_append (template->name, - xmlGetProp (alias_node, "name")); -} - -/****************************************************************************/ -/* Add XML Template Node */ -/****************************************************************************/ -void -gl_template_xml_add_sheet (glTemplate * template, - xmlNodePtr root, - xmlNsPtr ns) -{ - xmlNodePtr node; - GList *p; - - node = xmlNewChild (root, ns, "Sheet", NULL); - - xmlSetProp (node, "name", template->name->data); - xmlSetProp (node, "size", template->page_size); - xmlSetProp (node, "description", template->description); - - xml_add_label (template, node, ns); - - for ( p=template->name->next; p != NULL; p=p->next ) { - xml_add_alias( p->data, node, ns ); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Sheet->Label Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_add_label (glTemplate *template, - xmlNodePtr root, - xmlNsPtr ns) -{ - xmlNodePtr node; - gchar *string; - - node = xmlNewChild(root, ns, "Label", NULL); - string = g_strdup_printf ("%g", template->label_margin); - xmlSetProp (node, "margin", string); - g_free (string); - switch (template->style) { - case GL_TEMPLATE_STYLE_RECT: - xmlSetProp (node, "style", "rectangle"); - string = g_strdup_printf ("%g", template->label_width); - xmlSetProp (node, "width", string); - g_free (string); - string = g_strdup_printf ("%g", template->label_height); - xmlSetProp (node, "height", string); - g_free (string); - string = g_strdup_printf ("%g", template->label_round); - xmlSetProp (node, "round", string); - g_free (string); - break; - case GL_TEMPLATE_STYLE_ROUND: - xmlSetProp (node, "style", "round"); - string = g_strdup_printf ("%g", template->label_radius); - xmlSetProp (node, "radius", string); - g_free (string); - break; - case GL_TEMPLATE_STYLE_CD: - xmlSetProp (node, "style", "cd"); - string = g_strdup_printf ("%g", template->label_radius); - xmlSetProp (node, "radius", string); - g_free (string); - string = g_strdup_printf ("%g", template->label_hole); - xmlSetProp (node, "hole", string); - g_free (string); - break; - default: - WARN ("Unknown label style"); - break; - } - - xml_add_layout (template, node, ns); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Sheet->Label->Layout Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_add_layout (glTemplate *template, - xmlNodePtr root, - xmlNsPtr ns) -{ - xmlNodePtr node; - gchar *string; - - node = xmlNewChild(root, ns, "Layout", NULL); - string = g_strdup_printf ("%d", template->nx); - xmlSetProp (node, "nx", string); - g_free (string); - string = g_strdup_printf ("%d", template->ny); - xmlSetProp (node, "ny", string); - g_free (string); - string = g_strdup_printf ("%g", template->x0); - xmlSetProp (node, "x0", string); - g_free (string); - string = g_strdup_printf ("%g", template->y0); - xmlSetProp (node, "y0", string); - g_free (string); - string = g_strdup_printf ("%g", template->dx); - xmlSetProp (node, "dx", string); - g_free (string); - string = g_strdup_printf ("%g", template->dy); - xmlSetProp (node, "dy", string); - g_free (string); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Sheet->Alias Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_add_alias (gchar *name, - xmlNodePtr root, - xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild (root, ns, "Alias", NULL); - xmlSetProp (node, "name", name); -} - diff --git a/glabels1/src/template.h b/glabels1/src/template.h deleted file mode 100644 index 9e72c6b..0000000 --- a/glabels1/src/template.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * template.h: template module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __TEMPLATE_H__ -#define __TEMPLATE_H__ - -#include <gnome.h> - -/* LibXML */ -#include <tree.h> -#include <parser.h> - -typedef enum { - GL_TEMPLATE_STYLE_RECT, - GL_TEMPLATE_STYLE_ROUND, - GL_TEMPLATE_STYLE_CD, -} glTemplateStyle; - -typedef struct { - GList *name; - gchar *description; - gchar *page_size; - glTemplateStyle style; - - /* Suggested margin */ - gdouble label_margin; - - /* Simple and rounded rectangles. */ - gdouble label_width, label_height, label_round; - - /* CD/DVD labels */ - gdouble label_radius, label_hole; - - /* Layout */ - gint nx, ny; - gdouble x0, y0, dx, dy; -} glTemplate; - -extern void gl_template_init (void); - -extern GList *gl_template_get_name_list (const gchar * page_size); -extern void gl_template_free_name_list (GList ** names); - -extern glTemplate *gl_template_from_name (const gchar * name); - -extern glTemplate *gl_template_copy(const glTemplate *orig_template); -extern void gl_template_free(glTemplate **template); - -extern void gl_template_xml_parse_sheet (glTemplate * template, - xmlNodePtr sheet_node); -extern void gl_template_xml_add_sheet (glTemplate * template, - xmlNodePtr root, xmlNsPtr ns); -#endif diff --git a/glabels1/src/text_node.c b/glabels1/src/text_node.c deleted file mode 100644 index c32ab72..0000000 --- a/glabels1/src/text_node.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * text_node.c: text node module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "text_node.h" - -#include "merge.h" - -#include "debug.h" - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static glTextNode *extract_text_node (gchar * text, gint * n); - - -/*--------------------------------------------------------------------------*/ -/* Expand single node into representative string. */ -/*--------------------------------------------------------------------------*/ -gchar * -gl_text_node_expand (glTextNode * text_node, - glMergeRecord * record) -{ - gchar *text; - - if (text_node->field_flag) { - text = gl_merge_eval_key (text_node->data, record); - if (text != NULL) { - return text; - } else { - return g_strdup_printf ("FIELD{%s}", text_node->data); - } - } else { - return g_strdup (text_node->data); - } -} - -/*--------------------------------------------------------------------------*/ -/* Create a single text node from given text. */ -/*--------------------------------------------------------------------------*/ -glTextNode * -gl_text_node_new_from_text (gchar * text) -{ - gint n; - - return extract_text_node (text, &n); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create a single text node from given text. n = characters used */ -/*--------------------------------------------------------------------------*/ -static glTextNode * -extract_text_node (gchar * text, - gint * n) -{ - glTextNode *text_node; - gchar *p; - gint m; - - text_node = g_new0 (glTextNode, 1); - - if (strncmp (text, "FIELD{", strlen ("FIELD{")) == 0) { - /* We are at the beginning of a "FIELD" node */ - text_node->field_flag = TRUE; - *n = strlen ("FIELD{"); - text += *n; - for (p = text, m = 0; *p != 0; p++, m++, (*n)++) { - if (*p == '}') { - (*n)++; - break; - } - } - text_node->data = g_strndup (text, m); - } else { - /* We are at the beginning of a literal node */ - text_node->field_flag = FALSE; - for (p = text, *n = 0; *p != 0; p++, (*n)++) { - if (strncmp (p, "FIELD{", strlen ("FIELD{")) == 0) - break; - if (*p == '\n') - break; - } - text_node->data = g_strndup (text, *n); - } - - return text_node; -} - -/*--------------------------------------------------------------------------*/ -/* Free a single text node. */ -/*--------------------------------------------------------------------------*/ -void -gl_text_node_free (glTextNode ** text_node) -{ - g_free ((*text_node)->data); - (*text_node)->data = NULL; - g_free (*text_node); - *text_node = NULL; -} - -/*--------------------------------------------------------------------------*/ -/* Expand text lines into single string. */ -/*--------------------------------------------------------------------------*/ -gchar * -gl_text_node_lines_expand (GList * lines, - glMergeRecord * record) -{ - GList *p_line, *p_node; - glTextNode *text_node; - gchar *text, *old_text, *expanded_node; - - text = g_strdup (""); /* prime pointer for concatenation */ - for (p_line = lines; p_line != NULL; p_line = p_line->next) { - for (p_node = (GList *) p_line->data; p_node != NULL; - p_node = p_node->next) { - text_node = (glTextNode *) p_node->data; - old_text = text; - expanded_node = gl_text_node_expand (text_node, record); - text = g_strconcat (text, expanded_node, NULL); - g_free (old_text); - g_free (expanded_node); - } - old_text = text; - text = g_strconcat (text, "\n", NULL); - g_free (old_text); - } - - return text; -} - -/*--------------------------------------------------------------------------*/ -/* Parse a string back into text lines. */ -/*--------------------------------------------------------------------------*/ -GList * -gl_text_node_lines_new_from_text (gchar * text) -{ - GList *lines, *nodes; - glTextNode *text_node; - gchar *p; - gint n; - - lines = NULL; - nodes = NULL; - for (p = text; *p != 0; p += n) { - if (*p != '\n') { - text_node = extract_text_node (p, &n); - nodes = g_list_append (nodes, text_node); - } else { - n = 1; - lines = g_list_append (lines, nodes); - nodes = NULL; - } - } - if (*(p - 1) != '\n') { - lines = g_list_append (lines, nodes); - } - - return lines; -} - -/*--------------------------------------------------------------------------*/ -/* Free a list of text lines. */ -/*--------------------------------------------------------------------------*/ -void -gl_text_node_lines_free (GList ** lines) -{ - GList *p_line, *p_node; - - for (p_line = *lines; p_line != NULL; p_line = p_line->next) { - for (p_node = (GList *) p_line->data; p_node != NULL; - p_node = p_node->next) { - gl_text_node_free ( (glTextNode **) &(p_node->data) ); - } - g_list_free ((GList *) p_line->data); - p_line->data = NULL; - } - - g_list_free (*lines); - *lines = NULL; -} - -/****************************************************************************/ -/* For debugging: descend and print lines list. */ -/****************************************************************************/ -void -gl_text_node_lines_print (GList * lines ) -{ - GList *p_line, *p_node; - glTextNode *text_node; - gint i_line, i_node; - - for (p_line=lines, i_line=0; p_line != NULL; p_line=p_line->next, i_line++) { - for (p_node = (GList *) p_line->data, i_node=0; p_node != NULL; - p_node = p_node->next, i_node++) { - text_node = (glTextNode *) p_node->data; - g_print( "LINE[%d], NODE[%d] = { %d, \"%s\" }\n", - i_line, i_node, - text_node->field_flag, text_node->data ); - - } - } - -} - diff --git a/glabels1/src/text_node.h b/glabels1/src/text_node.h deleted file mode 100644 index 97adbf0..0000000 --- a/glabels1/src/text_node.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * text_node.h: text node module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __TEXT_NODE_H__ -#define __TEXT_NODE_H__ - -#include <gnome.h> -#include "merge.h" - -typedef struct { - gboolean field_flag; - gchar *data; -} glTextNode; - -extern gchar *gl_text_node_expand (glTextNode * text_node, - glMergeRecord * record); -extern glTextNode *gl_text_node_new_from_text (gchar * text); -extern void gl_text_node_free (glTextNode ** text_node); - -extern gchar *gl_text_node_lines_expand (GList * lines, - glMergeRecord * record); -extern GList *gl_text_node_lines_new_from_text (gchar * text); -extern void gl_text_node_lines_free (GList ** lines); - -/* debug function */ -extern void gl_text_node_lines_print (GList * lines ); - -#endif diff --git a/glabels1/src/tools.c b/glabels1/src/tools.c deleted file mode 100644 index ede7625..0000000 --- a/glabels1/src/tools.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * tools.c: toolbar module - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include "tools.h" -#include "mdi.h" -#include "display.h" -#include "merge_properties.h" - -/*===========================================*/ -/* Private types. */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals. */ -/*===========================================*/ - -/*===========================================*/ -/* Private function prototypes. */ -/*===========================================*/ - - - -/*****************************************************************************/ -/* arrow callback. */ -/*****************************************************************************/ -void -gl_tools_arrow_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_arrow_mode (display); - } -} - -/*****************************************************************************/ -/* text callback. */ -/*****************************************************************************/ -void -gl_tools_text_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, GL_LABEL_OBJECT_TEXT); - } -} - -/*****************************************************************************/ -/* box callback. */ -/*****************************************************************************/ -void -gl_tools_box_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, GL_LABEL_OBJECT_BOX); - } -} - -/*****************************************************************************/ -/* line callback. */ -/*****************************************************************************/ -void -gl_tools_line_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, GL_LABEL_OBJECT_LINE); - } -} - -/*****************************************************************************/ -/* ellipse callback. */ -/*****************************************************************************/ -void -gl_tools_ellipse_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, - GL_LABEL_OBJECT_ELLIPSE); - } -} - -/*****************************************************************************/ -/* image callback. */ -/*****************************************************************************/ -void -gl_tools_image_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, GL_LABEL_OBJECT_IMAGE); - } -} - -/*****************************************************************************/ -/* barcode callback. */ -/*****************************************************************************/ -void -gl_tools_barcode_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_object_create_mode (display, - GL_LABEL_OBJECT_BARCODE); - } -} - -/*****************************************************************************/ -/* zoom in callback. */ -/*****************************************************************************/ -void -gl_tools_zoomin_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_zoom_in (display); - } -} - -/*****************************************************************************/ -/* zoom out callback. */ -/*****************************************************************************/ -void -gl_tools_zoomout_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_zoom_out (display); - } -} - -/*****************************************************************************/ -/* zoom 1:1 callback. */ -/*****************************************************************************/ -void -gl_tools_zoom1to1_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_display_set_zoom (display, 1.0); - } -} - -/*****************************************************************************/ -/* edit merge properties callback. */ -/*****************************************************************************/ -void -gl_tools_merge_properties_cb (GtkWidget * widget, - gpointer data) -{ - GnomeMDIChild *child = gnome_mdi_get_active_child (GNOME_MDI (data)); - glDisplay *display; - - display = gl_mdi_get_display (child); - if (display != NULL) { - gl_merge_properties_dialog (display, child->name); - } -} - diff --git a/glabels1/src/tools.h b/glabels1/src/tools.h deleted file mode 100644 index 814c4dd..0000000 --- a/glabels1/src/tools.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * tools.h: toolbar module header file - * - * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. - * - * 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 - */ -#ifndef __TOOLS_H__ -#define __TOOLS_H__ - -#include <gnome.h> - -extern void gl_tools_arrow_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_text_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_box_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_line_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_ellipse_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_image_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_barcode_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_zoomin_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_zoomout_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_zoom1to1_cb (GtkWidget * widget, gpointer data); -extern void gl_tools_merge_properties_cb (GtkWidget * widget, gpointer data); - -#endif diff --git a/glabels1/src/util.c b/glabels1/src/util.c deleted file mode 100644 index 9e75110..0000000 --- a/glabels1/src/util.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * util.c: various small utility functions - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#include <config.h> - -#include <string.h> -#include <glib.h> -#include <math.h> - -#include "util.h" - -#define FRAC_DELTA 0.00005 - - -/****************************************************************************/ -/* Append ".glabels" extension to filename if needed. */ -/****************************************************************************/ -gchar * -gl_util_add_extension (const gchar * orig_filename) -{ - gchar *new_filename, *extension; - - extension = strrchr (orig_filename, '.'); - if (extension == NULL) { - new_filename = g_strconcat (orig_filename, ".glabels", NULL); - } else { - if (g_strcasecmp (extension, ".glabels") != 0) { - new_filename = - g_strconcat (orig_filename, ".glabels", NULL); - } else { - new_filename = g_strdup (orig_filename); - } - } - - return new_filename; -} - -/****************************************************************************/ -/* Make sure we have an absolute path to filename. */ -/****************************************************************************/ -gchar * -gl_util_make_absolute (const gchar * filename) -{ - gchar *pwd, *absolute_filename; - - if (g_path_is_absolute (filename)) { - absolute_filename = g_strdup (filename); - } else { - pwd = g_get_current_dir (); - absolute_filename = - g_strjoin (G_DIR_SEPARATOR_S, pwd, filename, NULL); - g_free (pwd); - } - - return absolute_filename; -} - -/****************************************************************************/ -/* Create fractional representation of number, if possible. */ -/****************************************************************************/ -gchar * -gl_util_fraction( gdouble x ) -{ - static gdouble denom[] = { 1., 2., 3., 4., 8., 16., 32., 0. }; - gint i; - gdouble product, remainder; - gint n, d; - - for ( i=0; denom[i] != 0.0; i++ ) { - product = x * denom[i]; - remainder = fabs(product - ((gint)(product+0.5))); - if ( remainder < FRAC_DELTA ) break; - } - - if ( denom[i] == 0.0 ) { - /* None of our denominators work. */ - return g_strdup_printf ("%.5g", x); - } - if ( denom[i] == 1.0 ) { - /* Simple integer. */ - return g_strdup_printf ("%d", (gint)x); - } - n = (gint)( x * denom[i] + 0.5 ); - d = (gint)denom[i]; - if ( n > d ) { - return g_strdup_printf ("%d_%d/%d", (n/d), (n%d), d); - } else { - return g_strdup_printf ("%d/%d", (n%d), d); - } -} - diff --git a/glabels1/src/util.h b/glabels1/src/util.h deleted file mode 100644 index b3e188d..0000000 --- a/glabels1/src/util.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * (GLABELS) Label and Business Card Creation program for GNOME - * - * util.h: various small utility functions - * - * Copyright (C) 2001 Jim Evins <evins@snaught.com>. - * - * 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 - */ - -#ifndef __UTIL_H__ -#define __UTIL_H__ - -#include <glib.h> - -gchar *gl_util_add_extension (const gchar * orig_filename); - -gchar *gl_util_make_absolute (const gchar * filename); - -gchar *gl_util_fraction( gdouble x ); - -#endif /* __UTIL_H__ */ diff --git a/glabels1/stamp-h.in b/glabels1/stamp-h.in deleted file mode 100644 index 9788f70..0000000 --- a/glabels1/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp |